Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

The audit event for a successfully-authenticated REST request occurs
when we start to process the request. For APIs that accept a streaming
request body this means we have received the request headers, but not
its body, at the time of the audit event. Today such requests will fail
with a ClassCastException if the emit_request_body flag is set. This
change fixes the handling of streaming requests in the audit log to now
report that the request body was not available when writing the audit
entry.

Backport of #127798 to 8.17

The audit event for a successfully-authenticated REST request occurs
when we start to process the request. For APIs that accept a streaming
request body this means we have received the request headers, but not
its body, at the time of the audit event. Today such requests will fail
with a `ClassCastException` if the `emit_request_body` flag is set. This
change fixes the handling of streaming requests in the audit log to now
report that the request body was not available when writing the audit
entry.

Backport of elastic#127798 to `8.17`
@DaveCTurner DaveCTurner added >bug :Security/Audit X-Pack Audit logging backport v8.17.7 auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels May 7, 2025
@elasticsearchmachine elasticsearchmachine merged commit b7edc9b into elastic:8.17 May 7, 2025
15 checks passed
@DaveCTurner DaveCTurner deleted the 2025/05/07/backport-127798-817 branch May 7, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Security/Audit X-Pack Audit logging v8.17.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants