CR HeaderRewrites
Airlock Microgateway offers CR HeaderRewrites reference documentation and header filtering/rewriting configuration options.
- The predefined built-in header lists are constantly evolving and updated to respond to the latest threats and new requirements.
- Custom header rewrite rules can be added to address various integration requirements and to prevent information leakage by response headers and attacks by request headers.
With the configuration options, request and response headers can be added to or removed from upstream and downstream traffic.
The content of this CR is split into two main sections request
and response
. Both sections can be complemented with custom
rules.
The following actions can be configured for both built-in and custom rules:
Configured action | Additional information |
---|---|
|
|
|
|
|
|
Processing order of header actions
Request/response headers are processed in the following order:
- Remove all headers, that are not explicitly listed in a
built-in
or acustom
allow rule. - Remove all headers, that are explicitly listed in a
built-in
or acustom
remove rule. - Add all headers, that are listed in a
built-in
orcustom
add rule.
Example configuration
For the default and an example configuration including custom rules, see CR HeaderRewrites reference documentation.
The example covers:
spec.request
– request header rulesspec.response
– response header rulescustom
– multiple custom header rule examples
Logging
Header rewrite actions are not displayed in the access log by default. The CR HeaderRewrites features an Integration
operation mode that enriches the access log output with information and details not logged in Production
mode. The additional log information are useful for application integration and fault-finding tasks, i.e., to discover potential header-related issues.
Note that the extended logging output of the Integration
mode results in larger log messages and requires more storage.
Example log output in Integration
mode: