This plugin captures the user agent IP address at authentication and then allows that information to trigger the association of certain attributes/values during attribute resolution time.
This plugin requires Shibboleth IdP v2.3.x
The following steps must be performed during the initial installation of this plugin and at every IdP upgrade.
Shutdown the container running the IdP.
Place the ua-attribute-idp-ext JAR file, located in this bundle, in to the IdP distribution's lib directory
Edit the web.xml file, located in the src/main/webapp/WEB-INF directory of the IdP distribution, as follows:
Run the IdP's install script
Configure the attribute resolver as described below. This step is only performed during initial installation.
Restart the container running the IdP
The following changes to the IdP's attribute-resolver.xml configuration file only need to be performed the first time you install the plugin, after that they will carry over through upgrades.
Add the following namespace declaration to the root AttributeResolver element: xmlns:uadc="http://ukfederation.org.uk/schemas/uaattribute/resolver"
Add the following schema locations to the existing whitespace-separated list: http://ukfederation.org.uk/schemas/uaattribute/resolver classpath:/schema/ua-attribute-resolver.xsd
Define a new data connector as follows, filling in the UNIQUE_ID and Mapping elements (described in the following section):
Create one attribute definition per attribute generated by the data connector. Only attributes created by attribute definitions may be released to a service provider.
This plugin creates attributes by checking if the IP address of the user agent, at the time of authentication, matches a given range of IP addresses identified by CIDR blocks. The Mapping element noted in step 3, in the section above, requires, and only accepts, following XML attributes:
You can have more than one mapping rule with the same CIDR block. This allows you to create multiple attributes for the given CIDR block. You can also specify a given attribute ID more than once in order to generate multiple values for the ID.