URI User filter

Purpose


The URI User filter can use a section of the URI in the request to set the X-PP-User and X-PP-Groups headers.  These headers can then be used by the Rate Limiting filter.

General filter information


Filter name: uri-user

Filter configuration: uri-user.cfg.xml

Release: 8.0.0.0 *

* available in prior versions as URI Identity filter

Prerequisites


Headers: None

Preceding filters: None

Standard filter order: This filter will typically go after any authentication filters and before the Rate Limiting filter to provide a backup mechanism for categorizing a request for rate limiting purposes.

Basic configuration


 

Optional configuration

The following example includes specifying the group and quality.

Configurable parameters


XML schema definition

Example configuration

The uri-user.cfg.xml file contains the following elements and attributes. Add the filter to your Repose deployment through the system model configuration.

ElementsAttributes

Required/

Optional

Description
<uri-user>-RequiredSpecifies the sub-elements and attributes to define your URI User configuration.
<identification-mappings>-RequiredLists mapping elements which are regular expressions used to extract the identification information from the request URI.  The first regular expression in the list that finds a match in the URI is used to extract the data.
<mapping>-RequiredLists the regular expressions used to extract the identification information from the request URI. The first regular expression in the list that finds a match in the URI is what is used to extract the data.
idOptionalNames the unique identifier of the mapping. This value does not affect processing in any way.
 identification-regex RequiredThe regular expression used to extract identification information from a given URI.
<group>-OptionalNames the rate limiting group associated with the extracted identification data.
<quality>-OptionalDefines the quality assigned to user by the incoming identification data. This value resolves the order of preference when multiple identity filters are used so that the rate limiting filter knows which identity to limit by. Should be a value between 0.0 and 1.0. 

Return codes and conditions


This filter does not return specific response codes.  The request will simply pass through to the next filter or to the origin service.

Request headers created


HeaderValueAdded WhenQuality
X-PP-UserFirst capture group of the matching regexAn identification mapping regex matches the URIEither the configured quality value or "0.5" by default
X-PP-GroupsEither the configured group value or "User_Standard" by defaultAn identification mapping regex matches the URIEither the configured quality value or "0.5" by default