-
Notifications
You must be signed in to change notification settings - Fork 900
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
Set secret_key_base early enough for rails processes #23351
Merged
agrare
merged 1 commit into
ManageIQ:master
from
jrafanie:set-secret-token-globally-earlier-after-eager-load-hook
Feb 24, 2025
Merged
Set secret_key_base early enough for rails processes #23351
agrare
merged 1 commit into
ManageIQ:master
from
jrafanie:set-secret-token-globally-earlier-after-eager-load-hook
Feb 24, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@miq-bot cross-repo-test /all |
miq-bot
pushed a commit
to ManageIQ/manageiq-cross_repo-tests
that referenced
this pull request
Feb 24, 2025
From Pull Request: ManageIQ/manageiq#23351
365fa19
to
839fc1a
Compare
@jrafanie this method is still called but not defined
Looks like just a couple more ✂️ 🔥 😜 |
839fc1a
to
1d3dfee
Compare
We don't use secret_key_base like vanilla rails. We implemented secrets through MiqPassword before any of this existed in rails. Our only things currently going through rails secrets perhaps is the provider vcr cassette information. Rails 7.1 asserts secret_key_base is now set and set during rails boot fairly early. So, now, we can't only set this for puma based workers, but all rails processes. We also, must move this logic to be done earlier during boot. It was found that after eager load allows us to leverage autoload and access the database, both are required in order to fetch the secrets from the database. Move over the logic for rails console so it can use a dummy secret key base. Move the tests to a vmdb/initializer test. Co-Authored-By: Jason Frey <fryguy9@gmail.com>
1d3dfee
to
e6d6cd7
Compare
thanks... more 🔴 deletions |
I was able to re-record a VCR cassette with this patch applied |
agrare
approved these changes
Feb 24, 2025
jrafanie
added a commit
to jrafanie/manageiq-rpm_build
that referenced
this pull request
Feb 24, 2025
See: ManageIQ/manageiq#23351 We no longer need to do the change in ManageIQ#545 because it is set in core for all rails processes in the new pull request above.
jrafanie
added a commit
to jrafanie/manageiq-rpm_build
that referenced
this pull request
Feb 24, 2025
See: ManageIQ/manageiq#23351 We no longer need to do the change in ManageIQ#545 because it is set in core for all rails processes in the new pull request above.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We don't use secret_key_base like vanilla rails. We implemented secrets through MiqPassword before any of this existed in rails. Our only things currently going through rails secrets perhaps is the provider vcr cassette information.
Rails 7.1 asserts secret_key_base is now set and set during rails boot fairly early.
So, now, we can't only set this for puma based workers, but all rails processes. We also, must move this logic to be done earlier during boot. It was found that after eager load allows us to leverage autoload and access the database, both are required in order to fetch the secrets from the database.
Move over the logic for rails console so it can use a dummy secret key base.
Move the tests to a vmdb/initializer test.
Co-Authored-By: Jason Frey fryguy9@gmail.com