awx-operator
awx-operator copied to clipboard
Import all ldap config classes in settings.py
As discovered in #642 , if you are using AUTH_LDAP_GROUP_SEARCH, you also need to specify AUTH_LDAP_GROUP_TYPE (since different LDAP providers have different ways of representing groups). However, AUTH_LDAP_GROUP_TYPE needs to reference an object of type django_auth_ldap.config.LDAPGroupType
, which means those classes must be imported at the top of the settings file (discovered in #925 ).
Are there any known workarounds?
It is possible to workaround this, but it's pretty gnarly:
extra_settings:
- setting: AUTH_LDAP_SERVER_URI
value: '"ldaps://example.com"; from django_auth_ldap.config import GroupOfNamesType'
...
- setting: AUTH_LDAP_GROUP_TYPE
value: "GroupOfNamesType(name_attr='cn')"
Thank you ! I was stuck for ever on this issue and the work around work. This need to be merge asap as it is failing fresh install I think
Apologies for the wait on this one. Thank you for the contribution!