Skip to content

Comments

Fix boolean value check on KMSAUTH_SECTION options#85

Merged
russell-lewis merged 2 commits intoNetflix:masterfrom
paolodedios:boolean-config-option-check-fix
May 20, 2019
Merged

Fix boolean value check on KMSAUTH_SECTION options#85
russell-lewis merged 2 commits intoNetflix:masterfrom
paolodedios:boolean-config-option-check-fix

Conversation

@paolodedios
Copy link
Contributor

@paolodedios paolodedios commented Feb 14, 2019

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

…n-config-option-check-fix

* 'master' of https://github.com/Netflix/bless:
  Add link to Amazon Linux repository
@russell-lewis russell-lewis merged commit a7b454a into Netflix:master May 20, 2019
russell-lewis added a commit to russell-lewis/bless that referenced this pull request May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants