The Header User filter can populate the X-PP-User and X-PP-Groups headers (necessary for Rate Limiting) using the value from another header in the request.
Filter name: header-user
Filter configuration: header-user.cfg.xml
Release: 18.104.22.168 *
* available in prior versions as Header 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.
With the above configuration, the following headers would be added to the request for the given curl request:
curl -X GET http://address.to.service/item -H "x-header-user:reposeuser1"
You can also specify the quality to set on the newly created headers. The default value is 0.1 if the quality attribute is not configured.
The following example shows a section of the config.
header-user.cfg.xml file contains the following elements and attributes. Add the filter to your Repose deployment through the system model configuration.
|<header-identity>||-||Required||Specifies the sub-elements and attributes to define your header identity configuration.|
|<source-headers>||-||Required||Lists the headers to identify the incoming user.|
|-||Required||Defines the header to identify incoming user.|
|id||Required||Names the header key that is applied to the X-PP-Group header. The header value associated with this key is applied to the X-PP-User header.|
|quality||Optional||Defines the quality assigned to users found in the request headers. If no quality is set, Repose will default this value to 0.1|
Return codes and conditions
This filter does not return specific response codes. The request will simply through to the next filter or to the origin service.
This filter will set the X-PP-User and X-PP-Groups headers with the configured (or default) quality. Every configured header that exists in the request will be used when adding the new headers (i.e. it doesn't stop at the first configured match).