davis icon indicating copy to clipboard operation
davis copied to clipboard

Cannot login with LDAP using lldap

Open Elbullazul opened this issue 1 year ago • 9 comments

LLDAP is a lightweight LDAP server.

I can't get davis to authenticate with it. No errors are shown on the davis side, besides Username or password was incorrect. Login was needed for privilege: {DAV:}read on on the browser after failing to authenticate. Nothing in /var/www/davis/var/log or the container logs.

On the LLDAP side, I have no connection attempts made by davis, even though they are on the same docker network and I can ping the lldap container from davis.

I tried following the advice given here, but no luck.

Here are the relevant environment variables, maybe I'm missing something?

- AUTH_REALM=SabreDAV
- AUTH_METHOD=LDAP
- LDAP_AUTH_URL="ldap://lldap:3890"  # container_name of lldap container is `lldap`, LDAP port used is 3890
- LDAP_DN_PATTERN="uid=%u,ou=people,dc=domain,dc=com"   # lldap uses `uid` for user's ID instead of `cn` and `people` instead of `users`.
- LDAP_MAIL_ATTRIBUTE="mail"
- LDAP_AUTH_USER_AUTOCREATE=true # false by default

Elbullazul avatar May 13 '24 02:05 Elbullazul

Hi @Elbullazul

I have unfortunately little experience on LDAP in general to help diagnose.

Could you try to set the application in dev mode (APP_ENV=dev) and see the logs you have?

tchapi avatar May 13 '24 06:05 tchapi

I get a seemingly unrelated HTTP 500 when accessing davis when in dev mode:

image

the container prints a similar warning: NOTICE: PHP message: 2024-05-13T10:23:11+00:00 [critical] Uncaught Error: Class "Symfony\Bundle\WebProfilerBundle\WebProfilerBundle" not found

Elbullazul avatar May 13 '24 10:05 Elbullazul

Ah, yes, indeed, as you need the dev dependencies installed to be able to run in dev mode. You can install them with composer install inside the running container. Otherwise, do you have an easy way to reproduce (with a public lldap server for instance)?

tchapi avatar May 13 '24 13:05 tchapi

composer isn't in the path: OCI runtime exec failed: exec failed: unable to start container process: exec: "composer": executable file not found in $PATH: unknown

how do I run it? sorry, I haven't used PHP before and I'm a little lost

Elbullazul avatar May 13 '24 14:05 Elbullazul

Yes if you're not used to the composer / PHP ecosystem it's not that easy I admit.

Run a shell in the container, go to the /var/www/davis/ folder, and then run composer install there, it should work

tchapi avatar May 14 '24 20:05 tchapi

Had some trouble with composer, apparently it wasn't installed in the container. Ran apk add composer, then installed the dependencies, but in the end I managed to install the dependencies.

There was a lot of stuff in dev.log, but the relevant info seems to be this:

[2024-05-14T19:13:48.488117-04:00] doctrine.INFO: Disconnecting [] []
[2024-05-14T19:13:48.674031-04:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET http://davis.localhost/favicon.ico" (from "https://davis.localhost/dav/")" at /var/www/davis/vendor/symfony/http-kernel/EventListener/RouterListener.php line 135 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET http://davis.localhost/favicon.ico\" (from \"https://davis.localhost/dav/\") at /var/www/davis/vendor/symfony/http-kernel/EventListener/RouterListener.php:135)\n[previous exception] [object] (Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/favicon.ico/\". at /var/www/davis/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:74)"} []
[2024-05-14T19:13:48.716686-04:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []

do you have an easy way to reproduce

Here is my lldap compose project:

version: "3"

# ENV variables are $BINDS, $TZ, $TOKEN, $PASSWORD, $DB_USER, $DB_PASS and $DB_NAME

services:
  lldap:
    image: lldap/lldap:stable
    container_name: lldap
    volumes:
      - ${BINDS}/lldap/data:/data
    environment:
      - UID=1000
      - GID=1000
      - TZ=$TZ
      - LLDAP_JWT_SECRET=$TOKEN
      - LLDAP_LDAP_USER_PASS=$PASSWORD
      - LLDAP_LDAP_BASE_DN=dc=example,dc=com
      - LLDAP_DATABASE_URL=postgres://${DB_USER}:${DB_PASS}@lldap-db:5432/${DB_NAME}?sslmode=disable&connect_timeout=10
#      - LLDAP_VERBOSE=true  # for debugging
    restart: unless-stopped
    depends_on:
     - lldap-db
#    ports:
#      - "3890:3890"    # For LDAP
#      - "17170:17170"  # web front-end

  lldap-db:
    image: postgres:15  #latest
    container_name: lldap-db
    environment:
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASS}
      - POSTGRES_DB=${DB_NAME}
    volumes:
      - ${BINDS}/lldap/pgdb:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "${DB_USER}", "-d", "${DB_NAME}"]
      interval: 10s
      start_period: 30s
    restart: unless-stopped

Elbullazul avatar May 14 '24 23:05 Elbullazul

[2024-05-14T19:13:48.488117-04:00] doctrine.INFO: Disconnecting [] []
[2024-05-14T19:13:48.674031-04:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET http://davis.localhost/favicon.ico" (from "https://davis.localhost/dav/")" at /var/www/davis/vendor/symfony/http-kernel/EventListener/RouterListener.php line 135 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET http://davis.localhost/favicon.ico\" (from \"https://davis.localhost/dav/\") at /var/www/davis/vendor/symfony/http-kernel/EventListener/RouterListener.php:135)\n[previous exception] [object] (Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/favicon.ico/\". at /var/www/davis/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:74)"} []
[2024-05-14T19:13:48.716686-04:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []

Hum, no errors at all in there. If you still have the full log, can you send it to me? In case I see something interesting

tchapi avatar May 16 '24 20:05 tchapi

Had a closer look and this might be the cause?

[2024-05-14T19:13:18.759154-04:00] app.ERROR: [500]: ErrorException - Warning: Undefined variable $ldap [{"file":"/var/www/davis/src/Services/LDAPAuth.php","line":187,"function":"ldapOpen","class":"App\\Services\\LDAPAuth","type":"->","args":"****"},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","line":103,"function":"validateUserPass","class":"App\\Services\\LDAPAuth","type":"->","args":"****"},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Auth/Plugin.php","line":179,"function":"check","class":"Sabre\\DAV\\Auth\\Backend\\AbstractBasic","type":"->","args":[{"Sabre\\HTTP\\Request":"GET /dav/ HTTP/1.1\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nSec-Fetch-Site: cross-site\r\nSec-Fetch-Mode: navigate\r\nSec-Fetch-Dest: document\r\nUpgrade-Insecure-Requests: 1\r\nAuthorization: Basic REDACTED\r\nSec-Gpc: 1\r\nDnt: 1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept-Language: en-CA,en-US;q=0.7,en;q=0.3\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Real-Ip: 192.168.0.201\r\nX-Original-Url: https://davis.domain.example/dav/\r\nX-Original-Method: GET\r\nX-Forwarded-Uri: /dav/\r\nX-Forwarded-Ssl: on\r\nX-Forwarded-Server: davis.domain.example\r\nX-Forwarded-Proto: https\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Method: GET\r\nX-Forwarded-Host: davis.domain.example\r\nX-Forwarded-For: 192.168.0.201\r\nHost: davis.domain.example\r\nConnection: close\r\nContent-Length: \r\nContent-Type: \r\n\r\n"},{"Sabre\\HTTP\\Response":"HTTP/1.1 500 Internal Server Error\r\n\r\n"}]},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"Sabre\\HTTP\\Request":"GET /dav/ HTTP/1.1\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nSec-Fetch-Site: cross-site\r\nSec-Fetch-Mode: navigate\r\nSec-Fetch-Dest: document\r\nUpgrade-Insecure-Requests: 1\r\nAuthorization: Basic REDACTED\r\nSec-Gpc: 1\r\nDnt: 1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept-Language: en-CA,en-US;q=0.7,en;q=0.3\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Real-Ip: 192.168.0.201\r\nX-Original-Url: https://davis.domain.example/dav/\r\nX-Original-Method: GET\r\nX-Forwarded-Uri: /dav/\r\nX-Forwarded-Ssl: on\r\nX-Forwarded-Server: davis.domain.example\r\nX-Forwarded-Proto: https\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Method: GET\r\nX-Forwarded-Host: davis.domain.example\r\nX-Forwarded-For: 192.168.0.201\r\nHost: davis.domain.example\r\nConnection: close\r\nContent-Length: \r\nContent-Type: \r\n\r\n"},{"Sabre\\HTTP\\Response":"HTTP/1.1 500 Internal Server Error\r\n\r\n"}]},{"file":"/var/www/davis/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"Sabre\\HTTP\\Request":"GET /dav/ HTTP/1.1\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nSec-Fetch-Site: cross-site\r\nSec-Fetch-Mode: navigate\r\nSec-Fetch-Dest: document\r\nUpgrade-Insecure-Requests: 1\r\nAuthorization: Basic REDACTED\r\nSec-Gpc: 1\r\nDnt: 1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept-Language: en-CA,en-US;q=0.7,en;q=0.3\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Real-Ip: 192.168.0.201\r\nX-Original-Url: https://davis.domain.example/dav/\r\nX-Original-Method: GET\r\nX-Forwarded-Uri: /dav/\r\nX-Forwarded-Ssl: on\r\nX-Forwarded-Server: davis.domain.example\r\nX-Forwarded-Proto: https\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Method: GET\r\nX-Forwarded-Host: davis.domain.example\r\nX-Forwarded-For: 192.168.0.201\r\nHost: davis.domain.example\r\nConnection: close\r\nContent-Length: \r\nContent-Type: \r\n\r\n"},{"Sabre\\HTTP\\Response":"HTTP/1.1 500 Internal Server Error\r\n\r\n"}]},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMethod:GET",[{"Sabre\\HTTP\\Request":"GET /dav/ HTTP/1.1\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nSec-Fetch-Site: cross-site\r\nSec-Fetch-Mode: navigate\r\nSec-Fetch-Dest: document\r\nUpgrade-Insecure-Requests: 1\r\nAuthorization: Basic REDACTED\r\nSec-Gpc: 1\r\nDnt: 1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept-Language: en-CA,en-US;q=0.7,en;q=0.3\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Real-Ip: 192.168.0.201\r\nX-Original-Url: https://davis.domain.example/dav/\r\nX-Original-Method: GET\r\nX-Forwarded-Uri: /dav/\r\nX-Forwarded-Ssl: on\r\nX-Forwarded-Server: davis.domain.example\r\nX-Forwarded-Proto: https\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Method: GET\r\nX-Forwarded-Host: davis.domain.example\r\nX-Forwarded-For: 192.168.0.201\r\nHost: davis.domain.example\r\nConnection: close\r\nContent-Length: \r\nContent-Type: \r\n\r\n"},{"Sabre\\HTTP\\Response":"HTTP/1.1 500 Internal Server Error\r\n\r\n"}]]},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"Sabre\\HTTP\\Request":"GET /dav/ HTTP/1.1\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nSec-Fetch-Site: cross-site\r\nSec-Fetch-Mode: navigate\r\nSec-Fetch-Dest: document\r\nUpgrade-Insecure-Requests: 1\r\nAuthorization: Basic REDACTED\r\nSec-Gpc: 1\r\nDnt: 1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept-Language: en-CA,en-US;q=0.7,en;q=0.3\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Real-Ip: 192.168.0.201\r\nX-Original-Url: https://davis.domain.example/dav/\r\nX-Original-Method: GET\r\nX-Forwarded-Uri: /dav/\r\nX-Forwarded-Ssl: on\r\nX-Forwarded-Server: davis.domain.example\r\nX-Forwarded-Proto: https\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Method: GET\r\nX-Forwarded-Host: davis.domain.example\r\nX-Forwarded-For: 192.168.0.201\r\nHost: davis.domain.example\r\nConnection: close\r\nContent-Length: \r\nContent-Type: \r\n\r\n"},{"Sabre\\HTTP\\Response":"HTTP/1.1 500 Internal Server Error\r\n\r\n"}]},{"file":"/var/www/davis/src/Controller/DAVController.php","line":329,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/davis/vendor/symfony/http-kernel/HttpKernel.php","line":163,"function":"dav","class":"App\\Controller\\DAVController","type":"->","args":"****"},{"file":"/var/www/davis/vendor/symfony/http-kernel/HttpKernel.php","line":75,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","args":[{"Symfony\\Component\\HttpFoundation\\Request":"GET /dav/ HTTP/1.1\r\nAccept:                    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nAccept-Encoding:           gzip, deflate, br\r\nAccept-Language:           en-CA,en-US;q=0.7,en;q=0.3\r\nAuthorization:             Basic ZWxidWxsYXp1bDp5ekRSXkZmMkhYb0hhSnJSUmpZRkdHa2RVZDY2UXQqI0JGV1RiOGNiXjhzZVEkI2M=\r\nConnection:                close\r\nCookie:                    DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nDnt:                       1\r\nHost:                      davis.domain.example\r\nPhp-Auth-Pw:               ldap__password__value\r\nPhp-Auth-User:             username\r\nSec-Fetch-Dest:            document\r\nSec-Fetch-Mode:            navigate\r\nSec-Fetch-Site:            cross-site\r\nSec-Gpc:                   1\r\nUpgrade-Insecure-Requests: 1\r\nUser-Agent:                Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Forwarded-For:           192.168.0.201\r\nX-Forwarded-Host:          davis.domain.example\r\nX-Forwarded-Method:        GET\r\nX-Forwarded-Port:          443\r\nX-Forwarded-Proto:         https\r\nX-Forwarded-Server:        davis.domain.example\r\nX-Forwarded-Ssl:           on\r\nX-Forwarded-Uri:           /dav/\r\nX-Original-Method:         GET\r\nX-Original-Url:            https://davis.domain.example/dav/\r\nX-Php-Ob-Level:            0\r\nX-Real-Ip:                 192.168.0.201\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\n\r\n"},1]},{"file":"/var/www/davis/vendor/symfony/http-kernel/Kernel.php","line":202,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","args":[{"Symfony\\Component\\HttpFoundation\\Request":"GET /dav/ HTTP/1.1\r\nAccept:                    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nAccept-Encoding:           gzip, deflate, br\r\nAccept-Language:           en-CA,en-US;q=0.7,en;q=0.3\r\nAuthorization:             Basic ZWxidWxsYXp1bDp5ekRSXkZmMkhYb0hhSnJSUmpZRkdHa2RVZDY2UXQqI0JGV1RiOGNiXjhzZVEkI2M=\r\nConnection:                close\r\nCookie:                    DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nDnt:                       1\r\nHost:                      davis.domain.example\r\nPhp-Auth-Pw:               ldap__password__value\r\nPhp-Auth-User:             username\r\nSec-Fetch-Dest:            document\r\nSec-Fetch-Mode:            navigate\r\nSec-Fetch-Site:            cross-site\r\nSec-Gpc:                   1\r\nUpgrade-Insecure-Requests: 1\r\nUser-Agent:                Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Forwarded-For:           192.168.0.201\r\nX-Forwarded-Host:          davis.domain.example\r\nX-Forwarded-Method:        GET\r\nX-Forwarded-Port:          443\r\nX-Forwarded-Proto:         https\r\nX-Forwarded-Server:        davis.domain.example\r\nX-Forwarded-Ssl:           on\r\nX-Forwarded-Uri:           /dav/\r\nX-Original-Method:         GET\r\nX-Original-Url:            https://davis.domain.example/dav/\r\nX-Php-Ob-Level:            0\r\nX-Real-Ip:                 192.168.0.201\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\n\r\n"},1,true]},{"file":"/var/www/davis/public/index.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->","args":[{"Symfony\\Component\\HttpFoundation\\Request":"GET /dav/ HTTP/1.1\r\nAccept:                    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\nAccept-Encoding:           gzip, deflate, br\r\nAccept-Language:           en-CA,en-US;q=0.7,en;q=0.3\r\nAuthorization:             Basic ZWxidWxsYXp1bDp5ekRSXkZmMkhYb0hhSnJSUmpZRkdHa2RVZDY2UXQqI0JGV1RiOGNiXjhzZVEkI2M=\r\nConnection:                close\r\nCookie:                    DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\nDnt:                       1\r\nHost:                      davis.domain.example\r\nPhp-Auth-Pw:               ldap__password__value\r\nPhp-Auth-User:             username\r\nSec-Fetch-Dest:            document\r\nSec-Fetch-Mode:            navigate\r\nSec-Fetch-Site:            cross-site\r\nSec-Gpc:                   1\r\nUpgrade-Insecure-Requests: 1\r\nUser-Agent:                Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0\r\nX-Forwarded-For:           192.168.0.201\r\nX-Forwarded-Host:          davis.domain.example\r\nX-Forwarded-Method:        GET\r\nX-Forwarded-Port:          443\r\nX-Forwarded-Proto:         https\r\nX-Forwarded-Server:        davis.domain.example\r\nX-Forwarded-Ssl:           on\r\nX-Forwarded-Uri:           /dav/\r\nX-Original-Method:         GET\r\nX-Original-Url:            https://davis.domain.example/dav/\r\nX-Php-Ob-Level:            0\r\nX-Real-Ip:                 192.168.0.201\r\nCookie: DAVIS_SESSION=183839d59adfb3f466d0c20625c57182\r\n\r\n"}]}] []

Full log here (with sensitive info replaced)

Elbullazul avatar May 17 '24 01:05 Elbullazul

Thank you! Will look over the weekend, thanks for your patience 🙏🏼

tchapi avatar May 17 '24 07:05 tchapi

Hi

I've added a bit more logs in the LDAP auth mechanism (here). Can you retry either by pulling the latest changes in your debug container, or using the edge image from the packages, to have the logs?

Thanks

tchapi avatar May 19 '24 19:05 tchapi

hi,

I just pulled :edge and ran authentication again, here are the results: davis.log

Elbullazul avatar May 19 '24 20:05 Elbullazul

No more relevant errors in there (and no more 500), and no LDAP specifics. Anything in the container logs by any chance?

tchapi avatar May 19 '24 20:05 tchapi

NOTICE: PHP message: LDAP Error (ldap_connect with "ldap://lldap:3890"): Warning: ldap_connect(): Could not create session handle: Bad parameter to an ldap routine
172.20.255.4 - elbullazul 19/May/2024:20:19:13 +0000 "GET /index.php" 401
NOTICE: PHP message: LDAP Error (ldap_connect with "ldap://lldap:3890"): Warning: ldap_connect(): Could not create session handle: Bad parameter to an ldap routine
172.20.255.4 - elbullazul 19/May/2024:20:19:20 +0000 "GET /index.php" 401
127.0.0.1 -  19/May/2024:20:19:22 +0000 "GET /status" 200
NOTICE: PHP message: LDAP Error (ldap_connect with "ldap://lldap:3890"): Warning: ldap_connect(): Could not create session handle: Bad parameter to an ldap routine
172.20.255.4 - elbullazul 19/May/2024:20:19:24 +0000 "GET /index.php" 401
NOTICE: PHP message: LDAP Error (ldap_connect with "ldap://lldap:3890"): Warning: ldap_connect(): Could not create session handle: Bad parameter to an ldap routine

Elbullazul avatar May 19 '24 20:05 Elbullazul

Here we go!

Could not create session handle: Bad parameter to an ldap routine

I'm no expert in LDAP so I'm not sure what it does mean, but my first hunch would be that the uri is actually quoted while it should not. ie: try with - LDAP_AUTH_URL=ldap://lldap:3890 (no quotes)

tchapi avatar May 19 '24 20:05 tchapi

I can remember (some context) that Docker is a pain to work with when quoting stuff, but it's maybe just that your Docker version is a bit old?

tchapi avatar May 19 '24 20:05 tchapi

Oh my goodness, I can't believe it's something so dumb. I had some other issues with quoted strings in environment variables, but I didn't think to check that.

Thanks a lot for your help, it is much appreciated!

Elbullazul avatar May 19 '24 20:05 Elbullazul

No pb, glad you got it working :)

tchapi avatar May 19 '24 21:05 tchapi