Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rails secrets deprecation warning #2271

Merged
merged 1 commit into from
Jan 4, 2024
Merged

Conversation

ryanb-gds
Copy link
Contributor

Rails 7.1 deprecates the use of Rails.application.secrets in favour of Rails.application.credentials.

The credentials system introduces the burden of master encryption key administration at no benefit to us, because we manage our production secrets using environment variables instead of committing them to Git.

This commit loads the existing secret values and merges them into the credentials object. This approach was copied from commit 8937b172be530a5d91bd999f4538e5a722dcab19 on the GOV.UK account-api project.

Rails 7.1 deprecates the use of Rails.application.secrets in favour of Rails.application.credentials.

The credentials system introduces the burden of master encryption key administration at no benefit to us, because we manage our production secrets using environment variables instead of committing them to Git.

This commit loads the existing secret values and merges them into the credentials object. This approach was copied from commit 8937b172be530a5d91bd999f4538e5a722dcab19 on the GOV.UK account-api project.
@ryanb-gds ryanb-gds force-pushed the fix-secrets-deprecations branch from 89dd952 to 42a17e7 Compare January 4, 2024 09:28
Copy link
Contributor

@davidgisbey davidgisbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ryanb-gds ryanb-gds merged commit 78f09ba into main Jan 4, 2024
13 checks passed
@ryanb-gds ryanb-gds deleted the fix-secrets-deprecations branch January 4, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants