Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


The extensions "user agent" is a Shibboleth data connector that provides the IP address of the user as attributes in 3 formats: IP4, IP6 or as a number. The Shibboleth
IP authentication handler is required for this data connector to work.

To deploy the connector, copy the JAR file in edit-webapp/WEB-INF/lib, re-build idp and restart tomcat.

The attribute-resolver.xml must be configured properly as the example below:


Code Block
collapsetrue
<resolver:AttributeResolver
		...
		xmlns:daasidc="urn:de:daasi:shibboleth:idp3:resolver:dc"
		xsi:schemaLocation="...
							urn:de:daasi:shibboleth:idp3:resolver:dc classpath:/schema/shibboleth-attribute-resolver-daasi-dc.xsd">

	...

    <resolver:DataConnector id="userAgentIpAddressDataConnector" xsi:type="daasidc:UserAgentIpAddressDataConnector" xmlns="urn:de:daasi:shibboleth:idp3:resolver:dc"
        userAgentAddressIPV4AttributeName="userAgentAddressIPV4"
        userAgentAddressIPV4AsLongAttributeName="userAgentAddressIPV4AsLong"
        userAgentAddressIPV6AttributeName="userAgentAddressIPV6"
    />

	<!-- Example Attribute Definition -->
	<resolver:AttributeDefinition xsi:type="ad:Simple" id="userAgentAddressIPV4" sourceAttributeID="userAgentAddressIPV4">
        <resolver:Dependency ref="userAgentIpAddressDataConnector" />
        <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="http://daasi.de/userAgentAddressIPV4" />
        <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="http://daasi.de/userAgentAddressIPV4" friendlyName="userAgentAddressIPV4" />
    </resolver:AttributeDefinition>

    <resolver:AttributeDefinition xsi:type="ad:Simple" id="userAgentAddressIPV4AsLong" sourceAttributeID="userAgentAddressIPV4AsLong">
        <resolver:Dependency ref="userAgentIpAddressDataConnector" />
        <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="http://daasi.de/userAgentAddressIPV4AsLong" />
        <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="http://daasi.de/userAgentAddressIPV4AsLong" friendlyName="userAgentAddressIPV4AsLong" />
    </resolver:AttributeDefinition>

    <resolver:AttributeDefinition xsi:type="ad:Simple" id="userAgentAddressIPV6" sourceAttributeID="userAgentAddressIPV6">
        <resolver:Dependency ref="userAgentIpAddressDataConnector" />
        <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="http://daasi.de/userAgentAddressIPV6" />
        <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="http://daasi.de/userAgentAddressIPV6" friendlyName="userAgentAddressIPV6" />
    </resolver:AttributeDefinition>

</resolver:AttributeResolver>

To deploy the connector copy the JAR file edit-webapp/WEB-INF/lib, re-build idp and restart tomcat

Additionally, the attribute needs to be added to the appopriate attribute-filter.