1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides/source
Dirkjan Bussink 0f6c9bc786
Add an ActiveSupport option to allow setting a digest class
Right now it's already possible to set a digest class manually, but this
is not through a publicly supported and approved API. With these
configuration options, it is possible to configure a digest class to use
for digests inside Rails.

The reason for this is that it allows configuring other classes in
certain conditions like running in FIPS mode. FIPS disallows MD5 and
discourages SHA1. Even though this isn't used in Rails for security
related things, using newer hash algorithms means not having to explain
it to auditors which always makes life easier.

That's not the only reason though. If today Ruby is built and running
for example in an Ubuntu 18.04 FIPS approved environment, the default
Digest classes break, see https://bugs.ruby-lang.org/issues/13681 as
well.

By allowing a class to be configured, the following can be used so that
things work properly (using the new API proposed here):

```
Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256
```

This would then use the OpenSSL certified FIPS implementation as well.
2020-09-23 17:47:35 +02:00
..
kindle
2_2_release_notes.md Use bash code fences and prompts for shell code [ci skip] 2020-06-13 19:27:30 -05:00
2_3_release_notes.md Use bash code fences and prompts for shell code [ci skip] 2020-06-13 19:27:30 -05:00
3_0_release_notes.md Update the Rails mailing list URLs to new discuss discourse URL [ci skip] 2020-04-02 22:00:28 +05:30
3_1_release_notes.md
3_2_release_notes.md Use appropriate code fences [ci skip] 2020-07-08 14:51:57 -05:00
4_0_release_notes.md Use bash code fences and prompts for shell code [ci skip] 2020-06-13 19:27:30 -05:00
4_1_release_notes.md Use bash code fences and prompts for shell code [ci skip] 2020-06-13 19:27:30 -05:00
4_2_release_notes.md [ci skip] Update link to autoloading guide to classic mode guide instead of Zeitwerk guide 2020-06-10 10:43:05 -05:00
5_0_release_notes.md
5_1_release_notes.md
5_2_release_notes.md
6_0_release_notes.md
6_1_release_notes.md Revert "Remove deprecated ActionMailer::DeliveryJob and ActionMailer::Parameterized::DeliveryJob" 2020-05-12 15:20:07 -04:00
_license.html.erb
_welcome.html.erb
action_cable_overview.md Remove editorializing in ActionCable guide 2020-09-19 18:31:22 -07:00
action_controller_overview.md Merge pull request #39736 from mehagar/docs-cookie 2020-07-31 08:52:12 +05:30
action_mailbox_basics.md Use appropriate code fences [ci skip] 2020-07-08 14:51:57 -05:00
action_mailer_basics.md Pass over the "Calling the Mailer" AM guide [ci skip] (#39402) 2020-05-23 23:32:45 +05:30
action_text_overview.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
action_view_helpers.md Add label attribute to <option> from include_blank 2020-07-24 15:45:18 -05:00
action_view_overview.md Move Actionview Helpers guides to seperate guide [skip ci] 2020-06-18 21:26:00 +02:00
active_job_basics.md fix grammar - ci skip 2020-03-28 19:38:01 -07:00
active_model_basics.md Use Rouge for guides code highlighting [ci skip] 2020-07-08 09:05:08 +02:00
active_record_basics.md
active_record_callbacks.md Add #delete_by into skipping callback methods [skip ci] 2020-08-24 00:26:58 +09:00
active_record_migrations.md Combine and deprecate rails db:structure:{dump,load} tasks into rails db:schema:{dump,load} 2020-08-03 19:08:41 +03:00
active_record_multiple_databases.md Make role required when using shard in connected_to 2020-09-17 08:07:03 -04:00
active_record_postgresql.md Remove the unnessecary default: 'gen_random_uuid()' (#40012) 2020-08-08 15:11:34 +05:30
active_record_querying.md Whitespaces ✂️ 2020-08-25 23:52:12 +00:00
active_record_validations.md Change belongs_to example to has_one [ci skip] 2020-08-31 13:21:52 -04:00
active_storage_overview.md Fix spelling of DigitalOcean in docs 2020-08-14 14:11:47 -04:00
active_support_core_extensions.md fix typos in active support docs 2020-07-17 11:25:35 -05:00
active_support_instrumentation.md Document how exceptions are handled in instrumentation 2020-07-18 18:00:35 +02:00
api_app.md Update GitHub gist api link and fix documentation in api_app page [ci skip] 2020-08-06 21:47:45 +05:30
api_documentation_guidelines.md Use bash code fences and prompts for shell code [ci skip] 2020-06-13 19:27:30 -05:00
asset_pipeline.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
association_basics.md Clarify exists? and find query only in the table 2020-09-02 22:07:36 -07:00
autoloading_and_reloading_constants.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
autoloading_and_reloading_constants_classic_mode.md Fix strange sentence in classic_mode guide [skip ci] 2020-09-03 11:55:19 +02:00
caching_with_rails.md
command_line.md Merge branch 'master' into combine-structure-and-schema-tasks 2020-08-17 08:47:51 -04:00
configuring.md Add an ActiveSupport option to allow setting a digest class 2020-09-23 17:47:35 +02:00
contributing_to_ruby_on_rails.md Add a note about PR approvals [ci skip] 2020-09-22 18:50:15 -04:00
debugging_rails_applications.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
development_dependencies_install.md Fix highlighting for mostly SQL block 2020-07-26 18:27:07 +02:00
documents.yaml change typo 6.0 to 6.1 in the documents.yml (#39664) [ci skip] 2020-06-19 06:19:29 +05:30
engines.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
form_helpers.md Unify coverage of collection helpers [ci skip] 2020-06-04 01:13:04 -05:00
generators.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
getting_started.md Fix formatting error in concerns doc 2020-09-22 19:22:17 -05:00
i18n.md fix minor typos 2020-07-22 08:01:10 -05:00
index.html.erb
initialization.md update global rails commands to bundled rails i.e. bin/rails 2020-04-11 17:32:26 +01:00
layout.html.erb Merge pull request #39777 from p8/guides/rouge-highlighting 2020-07-08 13:59:30 +01:00
layouts_and_rendering.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
maintenance_policy.md Clarify subheadline of maintenance policy 2020-05-20 00:02:04 +02:00
plugins.md fix markdown syntax error 2020-08-14 14:01:55 -05:00
rails_application_templates.md Use bash code fences and prompts for shell code [ci skip] 2020-06-13 19:27:30 -05:00
rails_on_rack.md [ci skip] Add ActionDispatch::ActionableExceptions to default middleware docs 2020-05-20 13:55:13 -04:00
routing.md [ci skip] Append some description about advance constraints in block form. 2020-07-29 17:19:09 +08:00
ruby_on_rails_guides_guidelines.md Remove references to WARNINGS environment variable [ci skip] 2020-07-05 16:40:52 +01:00
security.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
testing.md epsilon invert 2020-08-14 17:06:21 -05:00
threading_and_code_execution.md Fix minor formatting issue 2020-08-21 05:28:38 +05:30
upgrading_ruby_on_rails.md Formats code blocks for better syntax highlighting 2020-08-21 15:47:32 +05:30
working_with_javascript_in_rails.md