Skip to content

Conversation

ccl0326
Copy link

@ccl0326 ccl0326 commented Sep 12, 2017

as title.

root = os.path.abspath('./')
self.ldap_url = config['auth']['ldap_url']
self.cert_path = os.path.join(root, config['auth']['ldap_cert_path'])
self.start_tls = config['auth']['start_tls']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update the sample config to add the new usage of this?


def ldap_auth(self, username, password):
ldap.set_option(ldap.OPT_X_TLS_CACERTFILE, self.cert_path)
if not self.start_tls:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is start tls mutually exclusive with passing a cacert file?

root = os.path.abspath('./')
self.ldap_url = config['auth']['ldap_url']
self.cert_path = os.path.join(root, config['auth']['ldap_cert_path'])
self.start_tls = config['auth']['start_tls']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to config['auth'].get('start_tls') to maintain existing behavior without need for config change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ agreed :)

@baryluk
Copy link
Contributor

baryluk commented Nov 3, 2021

I can pick this up and address the remaining issues. I agree, it should use .get() so it works with existing config.

I also would like an option to ignore server certs / name. I have a prototype code to do that.

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.

4 participants