The URI Identity Filter can inspect a request URI and set the X-PP-User and X-PP-Groups headers accordingly. These headers can then be consumed by the Rate Limiting filter.
General filter information
Filter name: uri-identity
Filter configuration: uri-identity.cfg.xml
Release: versions 1.1.2 - 18.104.22.168*
* available in release 22.214.171.124 as URI User filter
Required headers: The URI Identity filter has no required request headers.
Required preceding filters: The URI Identity filter has no required preceding filters.
Standard filter order: If you are using other filters in your system model configuration, refer to the standard filter order table to determine where to place the URI Identity filter.
The uri-identity.cfg.xml file contains the following elements and attributes. Add the filter to your Repose deployment through the system model configuration.
|<uri-identity>||-||Required||Specifies the sub-elements and attributes to define your URI identity configuration.|
|<identification-mappings>||-||Required||Lists 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>||-||Required||Lists 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.|
|id||Optional||Names the unique identifier of the mapping.|
| ||identification-regex ||Required||Names the regular expression used to extract identification information from a given URI.|
|<group>||-||Optional||Names the rate limiting group associated with the extracted identification data.|
|<quality>||-||Optional||Defines 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.
- X-PP-User will be set to the identification data retrieved from the uri and will be of the following form: 'USERNAME;q=QUALITY'
- X-PP-Groups will be set to whatever is configured in the group element of the uri-identity.cfg.xml file.