Skip to content

Test of LDAP Property Mappings fails every time #12968

Open
@jorhett

Description

@jorhett

Describe the bug

Testing an LDAP property mapping doesn't work:

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://authentik.example.com/if/admin/#/core/property-mappings
  2. Deselect 'Hide managed mappings'
  3. Near 'authentik default LDAP Mapping: mail' click the test tube icon
  4. Select a user
  5. See error

Expected behavior

The test of the mapping should work.

Screenshots

Traceback (most recent call last):
  File "/authentik/core/models.py", line 969, in evaluate
    return evaluator.evaluate(self.expression)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/core/expression/evaluator.py", line 88, in evaluate
    return super().evaluate(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/lib/expression/evaluator.py", line 227, in evaluate
    raise exc
  File "authentik default LDAP Mapping: mail", line 5, in <module>
  File "authentik default LDAP Mapping: mail", line 3, in handler
builtins.NameError: name 'ldap' is not defined

Logs

No logs other than auth by existing session are generated during this event.

Version and Deployment (please complete the following information):

  • authentik version: [e.g. 2021.8.5] 2024.12.3
  • Deployment: [e.g. docker-compose, helm] podman quadlets

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions