goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
7.82k stars 599 forks source link

LDAP Property Mappings not propagated to LDAP Outpost #10347

Open mpaluch92 opened 3 days ago

mpaluch92 commented 3 days ago

Describe the bug LDAP Property Mappings (for example to set the object field givenname based on the request.user.name field) are not set in the LDAP Outpost.

To Reproduce Steps to reproduce the behavior:

  1. Go to Customization -> Property Mappings and create a LDAP Property Mapping. For example:

    • Name: extract_last_name
    • Object field: sn
    • Expression:

      def get_last_name():
              name_parts = request.user.name.split()
              if len(name_parts) > 1:
                  return name_parts[-1]
              else:
                  return "N/A"
      
      return {"sn": get_last_name()}
  2. Perform a query using ldapsearch.

  3. See that the object field sn is not updated using the LDAP Property Mapping. However, testing the LDAP Property Mapping via GUI yields the correct value for the object field sn.

Expected behavior When defining LDAP Property Mappings, the LDAP Outpost should show the LDAP Property Mappings as well.

Version and Deployment (please complete the following information):

Additional context The integration docs for Snipe-IT also tell us to define LDAP Property Mappings for LDAP-Synchronization to work in Snipe-IT. However, I am currently stuck at this progress and cannot integrate my users into Snipe-IT.

BeryJu commented 3 days ago

I dont know how this slipped past the review, but LDAP Property mappings have never been used in conjunction with the LDAP provider and will also for the foreseeable future not supported

mpaluch92 commented 3 days ago

Thank you for your response @BeryJu . Then there is absolutely no way to add/overwrite returned fields by the LDAP Provider? 😢