Closed hasculdr closed 1 month ago
Sorry folks, it looks like i messed up while creating containers with "docker-compose up". That time there weren't basedn data in override-file, and these values weren't in container's env. Next, i wrote them into ldap-config.py and restart container, so there was mounted modified config, and the auth started work this way. I expected compose start/restart always uses compose(override).yml, not only when creates containers.
Current Behavior
All settings are according to the wiki, in debug log i receive such messages: DEBUG Binding as CN=netboxsa,OU=,DC=,DC=,DC= netbox_1 | DEBUG Invoking search_s('', 2, '(sAMAccountName=my_user)') netbox_1 | ERROR search_s('', 2, '(sAMAccountName=my_user)') raised NO_SUCH_OBJECT({'msgtype': 101, 'msgid': 2, 'result': 32, 'desc': 'No such object', 'ctrls': [], 'info': "0000208D: NameErr: DSID-0310021F, problem 2001 (NO_OBJECT), data 0, best match of:\n\t''\n"}) netbox_1 | DEBUG search_s('', 2, '(sAMAccountName=%(user)s)') returned 0 objects: netbox_1 | DEBUG Authentication failed for my_user: failed to map the username to a DN. here basedn argument is empty
But when i copy USER(GROUP)_SEARCH_BASEDN values from docker-compose.override.yml right into my_fs/configuration/ldap/ldap_config.py, it works fine: DEBUG Binding as CN=netboxsa,OU=,DC=,DC=,DC= netbox_1 | DEBUG Invoking search_s('OU=,OU=,OU=,DC=,DC=,dc=', 2, '(sAMAccountName=my_user)') netbox_1 | DEBUG search_s('OU=,OU=,OU=,DC=,DC=,dc=', 2, '(sAMAccountName=%(user)s)') returned 1 objects: cn=deleted netbox_1 | DEBUG Binding as cn=deleted netbox_1 | DEBUG Populating Django user my_user
Expected Behavior
i expect an ability to manage authentication with .override file.
Docker Compose Version
docker-compose version 1.29.2
Docker Version
The git Revision
3f9ff1683f6daf7c77464252836f10a2b84eda75
The git Status
Startup Command
docker-compose up
NetBox Logs
Content of docker-compose.override.yml