-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add encryption key validation rake task #17149
Conversation
This task will use the currently configured encryption key to attempt to decrypt the seeded values from the miq_datbases entry. If the database is not migrated and seeded yet, it will return true https://bugzilla.redhat.com/show_bug.cgi?id=1544854
268b7ee
to
6fa1bf5
Compare
Some comments on commits carbonin/manageiq@9bd0f5d~...6fa1bf5 lib/tasks/evm.rake
|
Checked commits carbonin/manageiq@9bd0f5d~...6fa1bf5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@@ -56,6 +56,12 @@ namespace :evm do | |||
puts inventory.tableize if inventory.present? | |||
end | |||
|
|||
desc "Determine if the configured encryption key is valid" | |||
task :validate_encryption_key => :environment do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would loading environment as a prerequisite possibly blow up due to a bad encryption key before we get to this task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can run bundle exec rake environment
with the wrong key, so I think this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Put the wrong BZ link here ... oops The correct one is https://bugzilla.redhat.com/show_bug.cgi?id=1519312 |
Updated in description as well. |
This task will use the currently configured encryption key to
attempt to decrypt the seeded values from the miq_databases entry.
If the database is not migrated and seeded yet, it will return true
https://bugzilla.redhat.com/show_bug.cgi?id=1519312