-
Notifications
You must be signed in to change notification settings - Fork 66
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
intermediate work on #159 #172
Conversation
From @bhunut-adobe: adding keyring and using it to get ldap passwords from the Windows credential manager.
* allow specifying private key data in UMAPI config, using `priv_key_data` config setting (requires the YAML `|` convention with indented PEM key data on following lines) * get LDAP password from keyring, using `secure_password_key` config setting * get UMAPI client secret from keyring, using `secure_client_secret_key` config setting * get UMAPI private key data from keyring, using `secure_priv_key_data_key` config setting * remove the credential manager * clean up conventions around if parens and None comparisons in config.py * get rid of all PEP8 style warnings in config.py and the directory modules.
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 think api_key should be considered a secure value for umapi access also.
* Add get_credential accessor to DictConfig, and integrate all use of keyring there. * Refactor ldap and umapi connectors to use get_credential. * move to consistent naming of connector configs. * catch a duplicated function definition in umapi connector.
* added a counter to the excluded_stray case in rules.py * while I was there, cleaned up all PEP 8 style warnings (mostly redundant parentheses and better comparisons with None). * make the umapi api_key setting a credential (a 1-line change, thanks to the refactoring done in my last commit! :)
I've made api_key into a credential as per review. (Thanks to the refactoring, this was a 1-line change.) I also found and fixed a bug (#173) while I was testing the change. @phil-levy I would appreciate a second review of the later commits. |
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.
Looks good. Refactor makes reading much easier.
The work on #159 will be in two pieces:
This PR is for the first bullet. It removes the notion of an external credential manager class and instead integrates the use of
keyring
directly into the directory connectors. It also cleans up a lot of PEP8 style violations and puts a bunch of extra parens inif
statements and rewritesNone
comparisons into their correct form.I am submitting this PR to get some code review in advance of the second change, but in addition I wanted to let @phil-levy get started on the documentation. So I have emailed an encrypted ZIP file to all reviewers (as well as the password) that has configuration files with live (Adobe-internal) credentials in all the different ways you can specify them.