Skip to content

Unable to authenticate users via Google Secure LDAP #3399

@plsanchezfaure

Description

@plsanchezfaure

Describe the bug

Once Google Secure LDAP is configured as the source and users and groups have been synced, they cannot login in.

The problem seems to be caused by a search against Google Secure LDAP with the filter "(objectClass=*)", which is not allowed for the bound specific user who is trying to log in.

Google shows the following messages:

Successfully bind LDAP with uid=plsan*****,ou=Users,dc=******,dc=com.
LDAP search with (objectClass=*) failed for the following reason: INSUFFICIENT_ACCESS_RIGHTS.

The "INSUFFICIENT_ACCESS_RIGHTS" can be also be seen in server logs (below).

To Reproduce
Steps to reproduce the behavior:

  1. Configure Google Secure LDAP as source.
  2. Correctly sync users and groups
  3. Attempt to login to authentik with a user from Google Secure LDAP.

Expected behavior

Correct login flow as the user is synced and the password is right.

Logs

{"backend": "authentik.sources.ldap.auth.LDAPBackend", "event": "Attempting authentication...", "host": "test-authentik.******.com", "level": "debug", "logger": "authentik.stages.password.stage", "pid": 20, "request_id": "4f17533c1a65480eb9b43d5e9b52c730", "timestamp": "2022-08-09T09:26:33.516377"}
{"event": "LDAP Auth attempt", "host": "test-authentik.******.com", "level": "debug", "logger": "authentik.sources.ldap.auth", "pid": 20, "request_id": "4f17533c1a65480eb9b43d5e9b52c730", "source": "<LDAPSource: Google Secure LDAP>", "timestamp": "2022-08-09T09:26:33.521620"}
{"event": "Attempting Binding as user", "host": "test-authentik.*******.com", "level": "debug", "logger": "authentik.sources.ldap.auth", "pid": 20, "request_id": "4f17533c1a65480eb9b43d5e9b52c730", "timestamp": "2022-08-09T09:26:33.525593", "user": "<User: plsan****>"}
{"event": "LDAPInsufficientAccessRightsResult - 50 - insufficientAccessRights - None - None - searchResDone - None", "host": "test-authentik.********.com", "level": "warning", "logger": "authentik.sources.ldap.auth", "pid": 20, "request_id": "4f17533c1a65480eb9b43d5e9b52c730", "timestamp": "2022-08-09T09:26:34.956817"}
{"event": "Failed to bind, password invalid", "host": "test-authentik.******.com", "level": "debug", "logger": "authentik.sources.ldap.auth", "pid": 20, "request_id": "4f17533c1a65480eb9b43d5e9b52c730", "timestamp": "2022-08-09T09:26:34.957475"}
{"backend": "authentik.sources.ldap.auth.LDAPBackend", "event": "Backend returned nothing, continuing", "host": "test-authentik.*******.com", "level": "debug", "logger": "authentik.stages.password.stage", "pid": 20, "request_id": "4f17533c1a65480eb9b43d5e9b52c730", "timestamp": "2022-08-09T09:26:34.957888"}

Version and Deployment (please complete the following information):

  • authentik version: 2022.7.3
  • Deployment: docker-compose

Additional context

Tell me if additional info, logs or whatever is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus/staleThis issue has not been updated recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions