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: 220.127.116.11 *
* available in prior versions as URI Identity filter
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.
The following example includes specifying the group and quality.
The uri-user.cfg.xml file contains the following elements and attributes. Add the filter to your Repose deployment through the system model configuration.
|<uri-user>||-||Required||Specifies the sub-elements and attributes to define your URI User 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. This value does not affect processing in any way.|
| ||identification-regex ||Required||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||First capture group of the matching regex||An identification mapping regex matches the URI||Either the configured quality value or "0.5" by default|
|X-PP-Groups||Either the configured group value or "User_Standard" by default||An identification mapping regex matches the URI||Either the configured quality value or "0.5" by default|