VAULT-11595: Augment forwarded requests with host:port info (from/to nodes) (Enterprise) #20733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enterprise only:
When a perf-standby node receives a request and eventually forwards it to the primary node, audit logs can be written on the the perf-standby and the primary node for both the incoming request, and outgoing response (max 4 entries in total, 2 per each node).
In order to make it clearer in the audit logs that a request was forwarded this PR will add forwarded data to the request object that is used to generate audit log entries. The forwarded data will contain the host of the node that the request is either forwarded from or a forwarded flag.
e.g.
"forwarded_from": "10.0.0.2:8200"
"forwarded": true
We should expect to see
forwarded_from
in 'request' audit entries on a primary node where the request has been forwarded (2. above), and theforwarded
flag in 'response' audit entries that were involved in forwarding (3. and 4. above).The following Vault Enterprise PR will cover any required population of the data: https://github.com/hashicorp/vault-enterprise/pull/4064
NOTE: This is an updated version of the previously merged (and then reverted) #20689.