Skip to Content.
Sympa Menu

shibboleth-dev - How enable a DataConnector to get all attribute definitions

Subject: Shibboleth Developers

List archive

How enable a DataConnector to get all attribute definitions


Chronological Thread 
  • From:
  • To:
  • Subject: How enable a DataConnector to get all attribute definitions
  • Date: Fri, 17 Apr 2009 05:06:23 -0400 (EDT)

Hello,

I'm currently implementing an DataConnector for Shibboleth IdP 2.1.
Within my attribute-resolver.xml config file I've defined three attributes
to be resolved:

<resolver:AttributeDefinition
id="eduPersonEntitlement"
xsi:type="Simple"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
sourceAttributeID="eduPersonEntitlement">
<resolver:Dependency ref="myShibboleth" />
<resolver:AttributeEncoder
...
</resolver:AttributeDefinition>

<resolver:AttributeDefinition
id="eduPersonPrincipalName"
xsi:type="Simple"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
sourceAttributeID="cn">
<resolver:Dependency ref="myShibboleth" />
<resolver:AttributeEncoder
...
</resolver:AttributeDefinition>

<resolver:AttributeDefinition
id="eduPersonScopedAffiliation"
xsi:type="Scoped"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
scope="uni-konstanz.de"
sourceAttributeID="eduPersonAffiliation">
<resolver:Dependency ref="myShibboleth" />
...
</resolver:AttributeDefinition>

and the corresponding DataConnector:

<resolver:DataConnector
id="myShibboleth"
xsi:type="MyShibbolethDataConnector"
xmlns="urn:mace:unikn:shibboleth:resolver"
attr="test"/>

The following BaseDataConnector implementation:

public class MyShibbolethDataConnector extends BaseDataConnector
{
...

public Map<String, BaseAttribute> resolve(
ShibbolethResolutionContext resolutionContext)
throws AttributeResolutionException
{
...

Map<String, AttributeDefinition> map = resolutionContext.
getResolvedAttributeDefinitions();

if (map == null || map.isEmpty())
{
log.error("no attribute defnitions found for " + getId());
}
else
{
for (Iterator<String> it = map.keySet().iterator(); it.hasNext(); )
{
log.debug(it.next());
}
}
...
}
...
}


returns only one attribute definition:

DEBUG MyShibbolethDataConnector.java(71): eduPersonPrincipalName

How do I get all attribute definitions that reference the corresponding
DataConnector object?

Please help,
Markus



Archive powered by MHonArc 2.6.16.

Top of Page