Bug #6405
closedUnable to authenticate with UCNRS referral account
0%
Description
Running the JUnit test:
MetaCatServletTest. testOtherReferralLogin
I noticed the UCNRS referral was not successful.
http://localhost:8080/metacat/metacat?action=login&username=uid=testreferral,o=UCNRS,dc=ecoinformatics,dc=org&password=testreferral
It works on the KNB:
http://knb.ecoinformatics.org/knb/metacat?action=login&username=uid=testreferral,o=UCNRS,dc=ecoinformatics,dc=org&password=testreferral
But not on the trunk/localhost.
Updated by ben leinfelder almost 11 years ago
- Description updated (diff)
- Assignee set to Jing Tao
Updated by Jing Tao almost 11 years ago
- Status changed from New to Resolved
The issue was not in the authentication. It was in the method getUserInfo. In the getUserInfo method, it used a filter to combine the uid and organization. This part of code is not necessary since the search base is the dn. Moreover, this logical was overwritten by the assigning the filter by 'uid=user id'.
However, this part of code had an issue - it assumed the user dn should have a "," after "o=" if there is an "o=" in the dn. Our alias handing code dereferences the uid=testreferral,o=UCNRS,dc=ecoinformatics,dc=org to the uid=testreferral,ou=people,o=ucnrs.org.
So even though the dereferenced user dn has "o=", but after "o=" there is no ",". So it broke the code.
After i removed this part code, the junit test works.