-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
71 lines (55 loc) · 3.22 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Shibboleth IdP User Agent Attribute Extension
=============================================
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.
Requirements
=============================================
This plugin requires Shibboleth IdP v2.3.x
Installation/Upgrade Instructions
=============================================
The following steps must be performed during the initial installation of this
plugin and at every IdP upgrade.
1. Shutdown the container running the IdP.
2. Place the ua-attribute-idp-ext JAR file, located in this bundle, in to the
IdP distribution's lib directory
3. Edit the web.xml file, located in the src/main/webapp/WEB-INF directory of the
IdP distribution, as follows:
- locate the definition for the Servlet named 'UsernamePasswordAuthHandler'
this is found around line 100 of the default web.xml file
- replace the value of the <servlet-class> element with:
uk.org.ukfederation.uaattribute.authn.UserAgentUsernamePasswordLoginServlet
4. Run the IdP's install script
5. Configure the attribute resolver as described below. This step is only performed
during initial installation.
6. Restart the container running the IdP
Configuration Instructions
=============================================
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.
1. Add the following namespace declaration to the root AttributeResolver element:
xmlns:uadc="http://ukfederation.org.uk/schemas/uaattribute/resolver"
2. Add the following schema locations to the existing whitespace-separated list:
http://ukfederation.org.uk/schemas/uaattribute/resolver classpath:/schema/ua-attribute-resolver.xsd
3. Define a new data connector as follows, filling in the UNIQUE_ID and Mapping
elements (described in the following section):
<resolver:DataConnector id="UNIQUE_ID" xsi:type="uadc:UserAgentMappedAttributes">
<uadc:Mapping cidrBlock="...." attributeId="..." attributeValue="..." />
</resolver:DataConnector>
4. Create one attribute definition per attribute generated by the data
connector. Only attributes created by attribute definitions may be
released to a service provider.
CIDR Block -> Attribute Mappings
=============================================
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:
* cidrBlock - the CIDR block (IPv4 or IPv6) that triggers the mapping
* attributeId - the ID of the IdP attribute generated if the mapping is triggered
* attributeValue - the value added to the IdP attribute if the mapping is triggered
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.