The Shibboleth IdP V4 software will leave support on September 1, 2024.

FilterTemplate

Namespace: urn:mace:shibboleth:2.0:resolver
Schema: http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd

Overview

The <FilterTemplate> element provides the Velocity template from which the LDAP search filter will be built. It carries no attributes or child elements.

Typically the XML CDATA construct is used to wrap the text because it avoids the need for special escaping of most characters.

Template Context

As described below, various variables are available to the template context.

Name

Description

Name

Description

resolutionContext

The AttributeResolutionContext. Useful properties include$resolutionContext.principal and $resolutionContext.attributeRecipientID

foo, bar, etc.

For each IdPAttribute available from all the input dependencies, the attributes' values are available as a collection under the attribute's name. For the first value of an attribute with the ID "foo", foo.get(0) will provide it.

Note this this is a simplification of the actual native data structures to simplify the template.

Examples

Using Principal Name
<FilterTemplate> <![CDATA[ (uid=$resolutionContext.principal) ]]> </FilterTemplate>
Using a Dependent Attribute
<FilterTemplate> <![CDATA[ (uid=$employeeNumber.get(0)) ]]> </FilterTemplate>