Attribute Checker Handler
Identified by type="AttributeChecker"
, this handler validates a user's session against a list of required attributes (and optionally values) and either returns the user to complete the login process or displays an error template. The template is in the same form described by the Errors topic, and also has access to the user's session, such that attributes in the session can be used via <shibmlp attrID />
tags.
This handler is designed to complement the sessionHook
setting by leveraging the hook to check for required attributes.
The attributes to check for can be specified in one of two ways:
a list of attribute IDs via the
attributes
setting (see below)by embedding a valid access control policy inside the element
The latter option allows arbitrary checking of the session against boolean combinations of attributes and values. For example, instead of requiring that all of a set of attributes be present, an <OR>
can be used.
Attributes
Common Attributes
Specific Attributes
Name | Type | Default | Description |
---|---|---|---|
template | local pathname | Required | Required attribute specifying the path to an error template to use in the event that checking fails. |
flushSession | boolean | false | If true, the user's session is forcibly removed if the session fails the check. |
attributes | whitespace-delimited list of attribute IDs |
| Specifies a list of attributes to look for. If the session does not contain at least one value for each attribute designated, the session "fails" the check. |
Child Elements
And valid child element of an <AccessControl>
Element
Examples
Typical Examples
<Handler type="AttributeChecker" Location="/AttrChecker" template="attrChecker.html"
attributes="eppn displayName" flushSession="true"/>
Extended Syntax
<Handler type="AttributeChecker" Location="/AttrChecker" template="attrChecker.html"
flushSession="true">
<AND>
<Rule require="eppn">jdoe@example.edu</Rule>
<Rule require="displayName"/>
</AND>
</Handler>
One example approach how to use the Attribute Checker Handler to mitigate the case where an IdP released too few attributes to an SP is shown in the eduGAIN Wiki on the page How to configure Shibboleth SP attribute checker. Following the instructions there, a Shibboleth SP will show a helpful error message and provide the user with an easy way (2 clicks) to inform his IdP administrator regarding the attribute release problem. Also, the approach described on the wiki page makes use of a tracking cookie to log (locally or remotely) cases where users ended up on the error page.