Fix boolean value check on KMSAUTH_SECTION options#85
Merged
russell-lewis merged 2 commits intoNetflix:masterfrom May 20, 2019
paolodedios:boolean-config-option-check-fix
Merged
Fix boolean value check on KMSAUTH_SECTION options#85russell-lewis merged 2 commits intoNetflix:masterfrom paolodedios:boolean-config-option-check-fix
russell-lewis merged 2 commits intoNetflix:masterfrom
paolodedios:boolean-config-option-check-fix
Conversation
…n-config-option-check-fix * 'master' of https://github.com/Netflix/bless: Add link to Amazon Linux repository
russell-lewis
added a commit
to russell-lewis/bless
that referenced
this pull request
May 20, 2019
russell-lewis
added a commit
that referenced
this pull request
May 20, 2019
This file contains hidden or 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
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.
Fix a logical error when checking the value of the KMSAUTH_USEKMSAUTH_OPTION and VALIDATE_REMOTE_USERNAMES_AGAINST_IAM_GROUPS_OPTION configuration variables.
The current implementation uses config.get(), which simply returns a string, and the logical test that follows becomes a test for a non-empty string as a result. A configuration value of 'false' or 'true' falls through.
This fix updates the if-condition to use config.getboolean() instead of config.get(), which seems to be the recommended method enforced by the unit test.
@see https://github.com/Netflix/bless/blob/master/tests/config/test_bless_config.py#L150