The Shibboleth IdP V3 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP4 wiki space for current documentation on the supported version.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Software version requirement

The following feature requires IdP V3.4 or later.

The <AttributeFilterScript> element contains a script (or a reference to a script) that implements Predicate<Attribute>. The boolean result of the script determines whether the parent <MetadataFilter> element acts on the input entity attribute. Specifically, if the predicate evaluates to false for a particular entity attribute in the input stream, the entity attribute is removed.

Schema

The <AttributeFilterScript> element is a configuration element of type ScriptType. Both the element and its type are defined by the urn:mace:shibboleth:2.0:metadata schema, which can be located at http://shibboleth.net/schema/idp/shibboleth-metadata.xsd.

The following sections describe the attributes and elements of the ScriptType type.

Unable to render {include} The included page could not be found.

Examples

The following examples assume the default JavaScript language.

Typically the script operates on a single input parameter:

A boolean function of one parameter
<ConditionScript>
    <Script>
    <![CDATA[
        // invoke a boolean function expression on a single parameter
        (function (attribute) {
            // function statements
        }(input));
    ]]>
    </Script>
</ConditionScript>

The actual input parameter is an instance of a class that implements the Attribute interface. The formal attribute parameter name is arbitrary.

If the customObjectRef attribute is present, the script operates on a pair of parameters called input and custom:

A boolean function of two parameters
<ConditionScript customObjectRef="beanID">
    <Script>
    <![CDATA[
        // invoke a boolean function expression on two parameters
        (function (attribute, customObj) {
            // function statements
        }(input, custom));
    ]]>
    </Script>
</ConditionScript>

The actual custom parameter is an instance of an object class determined by the externally referenced bean. The corresponding formal parameter names are arbitrary.


  • No labels