Page tree

The Shibboleth 2.x software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP4 and SP3 wiki spaces for current documentation on the supported versions.

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 8 Next »

The <PathRegex> element is used to apply content rules to requests whose path matches a regular expression. The query string, if any, is NOT included in the comparison.

Regular expressions apply to the remainder of the path that is being compared and do not "nest", so if you care what's after the part you're matching, then choose your expression to check for that.

Example

 
    <RequestMapper type="Native">
        <RequestMap applicationId="default">
            <Host name="sp.example.org">
                <Path name="secure">
                        <PathRegex regex="(en|de|it|fr)/create/new/class" authType="shibboleth" requireSession="true">
                                <AccessControl><NOT><Rule require="affiliation">student</Rule></NOT></AccessControl>
                        </PathRegex>
                </Path>
            </Host>
        </RequestMap>
    </RequestMapper>

Attributes

Content Specifiers

  • regex (string)
    • Required attribute, specifies the regular expression to match against.
  • ignoreCase (boolean) (defaults to true)
    • Controls case option in regex engine, should be left on in most cases.

Content Settings

XML attributes corresponding to request mapper properties are used.

Child Elements

Access Control

One of the following elements can be used to attach an access control policy to the resource. This is a violation of the axiom that the SP doesn't do access control, but it's really just a call-out that has some predefined plugins you can use as examples to create more.
  • <htaccess>
    • Enables Apache .htaccess support during the authorization phase. This is automatic and implicit for the "Native" request mapper, but can be enabled by hand if the "XML" request mapper is used. Note that this will fail for non-Apache servers.
  • <AccessControl>
    • Attaches an access control policy using the sample XML-based plugin provided with the SP. This is just a short-hand for embedding the policy in the element above, if you want the policy inside the same file.

If no element is included (or inherited or implicitly enabled), any access control is left to the resource.

If an error occurs when processing this element, a dummy policy to deny access is installed to prevent accidental exposure.

Nested Content Specifiers

  • <Query> (zero or more)
    • Matches requests containing a query string parameter satisfying the element.

For more details on how the request mapping process works, see the request mapper HOWTO.

  • No labels