I'm noticing some weird behavior when using the UsernamePassword login
type.
When I authenticate with a username, the JAAS module authenticates me
against LDAP using the Virginia Tech LDAP authenticator.
I'm returned my principals: <username>, <group>, <group2>, <group3>, etc
as a Set in my Subject.
However, after authentication, the IDP tries to get my attributes to
pass in the SAML assertion back to the SP.
Once this begins, I can see from the logs that the IDP is using one of
my group names as the principal and not my username.
Since the lookup of my attributes requires my username, the IDP doesn't
return any of my attributes.
I think this has to do with the underlying way that Principals are
stored in a Subject.
When you get the principal name from the Session (in
edu.internet2.middleware.shibboleth.common.session.impl.AbstractSession),
it simply gets an Iterator of the prinicpals and returns the first one.
Well - the JRE doesn't make any guarantee's of the ordering of the
elements in the Set.
So I think what I'm seeing is a product of this.
The IDP is retrieving the first element of a un-ordered Set and using
that as my principal name - even though it is not my username.
Has anyone else noticed this problem?
Is there a work around?
----------------------------
Bobby Lawrence
MIS Application Developer
Jefferson Lab (www.jlab.org)
Email: rob...@jlab.org
Office: (757) 269-5818
Pager: (757) 584-5818
----------------------------
Can't you just eliminate the part that's adding those groups as Principals?
I don't recall my use of that plugin doing that.
-- Scott
---------------------------- Bobby Lawrence MIS Application Developer Jefferson Lab (www.jlab.org) Email: rob...@jlab.org Office: (757) 269-5818 Pager: (757) 584-5818 ----------------------------
It's confusing but it's also what you're telling the IdP to do. There
is no way it can determine which ID you tell it to pull is more
important than some other ID. The proper way to handle this is to make
sure your LDAP template is properly constructed. What "properly" means
is site dependent, but whatever the filter is it needs to uniquely
identify the user from the set of Principals that have been given to the
IdP.
--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
chad....@switch.ch, http://www.switch.ch