XnatLdapUserDetailsMapper creates a map of properties that are used to map the keys from the LDAP response when a user logs in to the various properties on the XDATUser object. This works if the response uses OpenLDAP default properties, because those default properties are automatically added to the map when not specified, but fails when those properties aren't included in the response (e.g. against Active Directory servers).
There are two fixes that should be added here:
- The map should include a list of properties for the defaults, so that it checks for, e.g., both
uid (OpenLDAP) and sAMAccountName (AD) if attributes.uid isn't set explicitly
- It should provide much more information in the log to indicate exactly what couldn't be found in the response, what was checked, and a list of property names returned in the response, so e.g. it could say, "No value for 'uid' found in response, checked both standard
uid and sAMAccountName properties, the properties that were included in the response include: a, b, c, d, etc. You can add the appropriate property to your provider definition with the setting: attributes.uid=xyz, where xyz is the property that includes the unique user ID". Or something like that.
XnatLdapUserDetailsMappercreates a map of properties that are used to map the keys from the LDAP response when a user logs in to the various properties on theXDATUserobject. This works if the response uses OpenLDAP default properties, because those default properties are automatically added to the map when not specified, but fails when those properties aren't included in the response (e.g. against Active Directory servers).There are two fixes that should be added here:
uid(OpenLDAP) andsAMAccountName(AD) ifattributes.uidisn't set explicitlyuidandsAMAccountNameproperties, the properties that were included in the response include: a, b, c, d, etc. You can add the appropriate property to your provider definition with the setting: attributes.uid=xyz, where xyz is the property that includes the unique user ID". Or something like that.