-
Notifications
You must be signed in to change notification settings - Fork 1
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
Easier unencrypted keys access. #41
Conversation
8be3338
to
de3eb54
Compare
end | ||
end | ||
|
||
describe ".with_deep_deundescored_keys" 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.
thought: I'm wondering what would happen if we define _underscored_secret
and underscored_secret
in YAML?
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.
Previously it would raise
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.
It seems reasonable to raise? Why are we changing it? We are likely to replace one value with another - and if we forgot to remove encrypted or non-encrypted value - would be great to know about it.
Maybe at least log this?
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 removed it because else you can never have an encrypted and unencrypted key with the same name, which is something you could want. It's up to the user to decide what value they need.
and don't raise on duplicate key
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 🚢
Added a with_deep_deundescored_keys util method that iterates over all keys in a secrets hash and duplicates the underscored ones as de-underscored. This so we can more eassily access the unencrypted secrets without having to call it with an underscore in our rails application.