More information in requestContext.principalName

Kevin P. Foote kpfoote at iup.edu
Fri May 3 09:55:58 EDT 2013


On Thu, 2 May 2013, Juan Andrés Mucarquer wrote:

> I'm dealing with an LDAP data connector in attribute-resolver.xml
> I want to filter the users by other attributes than the principalName
> For example, currently I'm filtering the user by uid and I want to
> filter by employeeNumber attribute:
>
> <dc:FilterTemplate>
> 	<![CDATA[
> 		(uid=$requestContext.principalName)
> 	]]>
> </dc:FilterTemplate>
>
> I tryed
> (employeeNumber=$requestContext.principalAttributes.get("employeeNumber"))
> but doesn't work, seems not to be the right way to do it.

Not sure if I'm understanding what you want to do .. but believe what
you are trying to do is to pull in attributes to your authenticated
principal.

If that is the case just create new attributes with your current
DataConnector definition as a dependency.

IE.. build an employeeNumber attribute which uses your LDAP
DataConnector.


     <resolver:AttributeDefinition xsi:type="ad:Simple"
id="employeeNumber" sourceAttributeID="employeeNumber">
         <resolver:Dependency ref="YourLDAPDataConnector" />
         <resolver:AttributeEncoder xsi:type="enc:SAML1String"
name="urn:mace:dir:attribute-def:employeeNumber" />
         <resolver:AttributeEncoder xsi:type="enc:SAML2String"
name="urn:oid:2.16.840.1.113730.3.1.3" friendlyName="employeeNumber" />
     </resolver:AttributeDefinition>


Once you have this attribute attached to the principal this will allow 
you to filter at the IdP filtering layer on employeeNumber, which is
what I'm guessing you want???

I think that is what you are trying to do.. I could be reading your
querry wrong though.


------
thanks
  kevin.foote


More information about the users mailing list