Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

Error if LDAP (AD) user's Distinguished Name Changes but Username stays the same #252

Closed kes1 closed 7 years ago

kes1 commented 7 years ago

With portal 1.2.6 setup to use Active Directory via LDAP for authentication.

A recent reorganisation has seen our location in the AD tree moved to a different department, changing the Distinguished Name for registered users.

When an already registered user attempts to log into portal they see this error with the new DN:

gpt_error

I was able to fix this by logging into the Geoportal database and updating the user's DN in the GPT_USER table.

kes1 commented 7 years ago

This is quite a rare thing to come across so I'm not asking for a fix but posting the solution here in case anyone else encounters the same problem. There may be a more stable attribute that could be used for the user instead of the DN, I know in Active Directory there is the objectSid or objectGUID but I don't know if they are attributes available from other directories via LDAP.

gcampanile commented 7 years ago

This can happen even if you first configure a simple authentication and then switch to a LDAP based one, having one of the usernames like the one used for Simple Auth.

mhogeweg commented 7 years ago

It's a bit of a hack (proceed at your own risk), but you can go into the database and update the the user dn in the users table to match that of your LDAP (rather than the simple auth one)