-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ldap: Add client certificate support #6668
Conversation
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.
Thanks for your contribution!
Please also modify the modules so that they pass required_together=[('client_cert', 'client_key')]
to AnsibleModule()
. That way the argument spec validation ensures that the user gets a nice error message if they only provide one of the two.
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.
Will merge if nobody objects in ~a week.
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #6696 🤖 @patchback |
* Set up secure ldap server * ldap: Added client cert options Shamelessly copied from https://github.com/andrewshulgin/ldap_search * Added tests for ldap client authentication * Add changelog fragment * Make sure the openssl commands work on older versions of openssl * Apply suggestions from code review Co-authored-by: Felix Fontein <[email protected]> * Remove aliases for new arguments * Add required_together to ldap module declerations --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f3ecf4c)
@Gnonthgol thanks for implementing this! |
…upport (#6696) ldap: Add client certificate support (#6668) * Set up secure ldap server * ldap: Added client cert options Shamelessly copied from https://github.com/andrewshulgin/ldap_search * Added tests for ldap client authentication * Add changelog fragment * Make sure the openssl commands work on older versions of openssl * Apply suggestions from code review Co-authored-by: Felix Fontein <[email protected]> * Remove aliases for new arguments * Add required_together to ldap module declerations --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f3ecf4c) Co-authored-by: Gnonthgol <[email protected]>
SUMMARY
Add new arguments
client_cert
andclient_key
to the ldap modules in order to allow certificate authentication.Fixes #4066
ISSUE TYPE
COMPONENT NAME
plugins/module_utils/ldap.py
ADDITIONAL INFORMATION
The functional part of the code is copied from work by @andrewshulgin with tests added by myself.