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

Add encryption key validation rake task #17149

Merged
merged 2 commits into from
Mar 13, 2018

Conversation

carbonin
Copy link
Member

@carbonin carbonin commented Mar 13, 2018

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

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
@miq-bot
Copy link
Member

miq-bot commented Mar 13, 2018

Some comments on commits carbonin/manageiq@9bd0f5d~...6fa1bf5

lib/tasks/evm.rake

  • ⚠️ - 62 - Detected puts. Remove all debugging statements.

@miq-bot
Copy link
Member

miq-bot commented Mar 13, 2018

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
3 files checked, 0 offenses detected
Everything looks fine. 🍰

@@ -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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

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

LGTM

@bdunne bdunne merged commit 9d11818 into ManageIQ:master Mar 13, 2018
@bdunne bdunne added this to the Sprint 82 Ending Mar 26, 2018 milestone Mar 13, 2018
@carbonin
Copy link
Member Author

carbonin commented Apr 4, 2018

Put the wrong BZ link here ... oops

The correct one is https://bugzilla.redhat.com/show_bug.cgi?id=1519312

@carbonin
Copy link
Member Author

carbonin commented Apr 4, 2018

Updated in description as well.

@carbonin carbonin deleted the encryption_key_validation branch August 16, 2019 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants