Table of Contents |
---|
...
The above are the methods you are most likely to implement. There are others, consult the Javadoc for the abstract Class and its parent classes for more details.
Principal Connectors
Do not implement Principal Connectors. Principal Connectors are deprecated in V3 and are replaced by Subject Canonicalization Flows.
Parsers
Note | ||
---|---|---|
| ||
The abstract method mentioned below are currently not subject to the Java Version policy (although they are unlikely to change). |
...
It is possible to configure a data connector in "native" Spring and refer to it (as a dependency) in the custom proprietary syntax attribute-resolver.xml file.
Code Block | ||||
---|---|---|---|---|
| ||||
<bean class="net.shibboleth.idp.attribute.resolver.dc.impl.StaticDataConnector" id="staticAttributes"> <property name="values"> <list> <bean class="net.shibboleth.idp.attribute.IdPAttribute" c:attributeId="staticEpA"> <property name="values"> <bean class="net.shibboleth.idp.attribute.StringAttributeValue" c:attributeValue="member" /> </property> </bean> <bean class="net.shibboleth.idp.attribute.IdPAttribute" c:attributeId="eduPersonEntitlement"> <property name="values"> <list> <bean class="net.shibboleth.idp.attribute.StringAttributeValue" c:attributeValue="urn:example.org:entitlement:entitlement1" /> <bean class="net.shibboleth.idp.attribute.StringAttributeValue" c:attributeValue="urn:mace:dir:entitlement:common-lib-terms" /> </list> </property> </bean> </list> </property> </bean> |
Code Block | ||||
---|---|---|---|---|
| ||||
<resolver:AttributeDefinition xsi:type="Simple" xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="eduPersonAffiliation" sourceAttributeID="staticEpA"> <resolver:Dependency ref="staticAttributes" /> </resolver:AttributeDefinition> |
The native Spring configuration must not go onto the global.xml
file. It has to be contained in a file which is a peer of the attribute-resolver.xml
file in the bean defined by idp.service.attribute.resolver.resources
(see services.properties
).
In a standard distribution this bean is defined in services.xml.
Code Block | ||||
---|---|---|---|---|
| ||||
<util:list id ="shibboleth.AttributeResolverResources">
<value>%{idp.home}/conf/attribute-resolver.xml</value>
<value>%{idp.home}/conf/your-native-spring-dataconnector.xml</value>
</util:list> |
Dependencies
Injecting dependencies into a Attribute Resolver Plugin using native spring is possible, but requires understanding how the Attribute Resolver handles Dependencies.
...