Skip to content
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

Add support for additional configuration options #270

Closed
wants to merge 10 commits into from
Closed

Add support for additional configuration options #270

wants to merge 10 commits into from

Conversation

mmmduft
Copy link

@mmmduft mmmduft commented Jan 15, 2024

Adds support for additional options

LDAP_AUTH_TLS_VALIDATE_CERT - Can allow ldap3 connections to be better secured with certificate validation required.
LDAP_AUTH_TLS_CIPHERS - Supports customisation of allowable SSL ciphers.
LDAP_AUTH_TLS_CA_CERTS_FILE - Allows the use of internal CA issued certificates.
LDAP_AUTH_ATTRIBUTES - Can be used to reduce the data returned from a remote LDAP server to improve performance.

All values, when set, are pass unmodified through to ldap3 where they are implemented. Defaults follow ldap3 behaviours.

Adds support for additional configuration options.

LDAP_AUTH_TLS_CA_CERTS_FILE
LDAP_AUTH_TLS_VALIDATE_CERT
LDAP_AUTH_TLS_CIPHERS
LDAP_AUTH_ATTRIBUTES

It may be wise to set the default of LDAP_AUTH_TLS_VALIDATE_CERT  to ssl.CERT_REQUIRED in the future, however this would be a breaking change.
Attributes listed in LDAP_AUTH_SYNC_ATTRIBUTES without values are returned as empty lists. Prevent IndexError
Add documentation for  LDAP_AUTH_TLS_CA_CERTS_FILE
Do set validate=None when LDAP_AUTH_TLS_VALIDATE_CERT is not set.  Removed log message, as this may not be right place for configuration checks.
Remove incorrect test.
@etianen
Copy link
Owner

etianen commented Jan 15, 2024

Thanks for this!
The lints are currently failing. I've fixed the lints and some README formatting here: #271

But even then, the unittests are failing. I'd suggest merging my branch into yours, then fixing the tests. 🙇

@mmmduft mmmduft closed this by deleting the head repository Apr 24, 2024
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