Yes , I am able to see audit log through Discovery but I am unable to see request body in audit logs for APIs which I have executed, even I have enabled the request body.
I have executed below API
PUT _ingest/pipeline/testing-audit
{
“description”: “This pipeline processes student data”,
“processors”: [
{
“set”: {
“description”: “Sets the graduation year to 2023”,
“field”: “grad_year”,
“value”: 2023
}
},
{
“set”: {
“description”: “Sets graduated to true”,
“field”: “graduated”,
“value”: true
}
},
{
“uppercase”: {
“field”: “name”
}
}
]
}
For above API got below Audit log
{
“_index”: “my-application_audit-2023.11.06”,
“_id”: “D4HfpIsBrdWEGs1p0Fy6”,
“_version”: 1,
“_score”: null,
“_source”: {
“audit_cluster_name”: “my-application”,
“audit_rest_request_params”: {
“pretty”: “true”
},
“audit_node_name”: “node-1”,
“audit_request_initiating_user”: “admin”,
“audit_rest_request_method”: “PUT”,
“audit_category”: “AUTHENTICATED”,
“audit_request_origin”: “REST”,
“audit_node_id”: “q104YQZ0Rp26UlUHvLwcmA”,
“audit_request_layer”: “REST”,
“audit_rest_request_path”: “/_ingest/pipeline/testing-audit”,
“@timestamp”: “2023-11-06T13:43:33.305+00:00”,
“audit_request_effective_user_is_admin”: false,
“audit_format_version”: 4,
“audit_request_remote_address”: “13.232.64.37”,
“audit_node_host_address”: “172.31.34.60”,
“audit_rest_request_headers”: {
“content-length”: [
“455”
],
“x-forwarded-proto”: [
“http”
],
“Connection”: [
“keep-alive”
],
“x-forwarded-port”: [
“22969”
],
“x-opaque-id”: [
“70365ea9-956c-44b5-bc6b-000ff1f7385d”
],
“Host”: [
“3.111.186.221:9500”
],
“securitytenant”: [
“user”
],
“x-forwarded-for”: [
“103.214.60.202”
],
“authorization”: [
“Basic YWRtaW46YWRtaW4=”
],
“x-forwarded-host”: [
“13.232.64.37:5601”
],
“x-opensearch-product-origin”: [
“opensearch-dashboards”
],
“content-type”: [
“application/json”
],
“user-agent”: [
“opensearch-js/2.3.1 (linux 5.14.0-284.30.1.el9_2.x86_64-x64; Node.js v18.16.0)”
]
},
“audit_request_effective_user”: “admin”,
“audit_node_host_name”: “172.31.34.60”
},
“fields”: {
“@timestamp”: [
“2023-11-06T13:43:33.305Z”
]
},
“highlight”: {
“audit_rest_request_path”: [
“/@opensearch-dashboards-highlighted-field@_ingest@/opensearch-dashboards-highlighted-field@/@opensearch-dashboards-highlighted-field@pipeline@/opensearch-dashboards-highlighted-field@/@opensearch-dashboards-highlighted-field@testing@/opensearch-dashboards-highlighted-field@-@opensearch-dashboards-highlighted-field@audit@/opensearch-dashboards-highlighted-field@”
]
},
“sort”: [
1699278213305
]
}