From 718211eb50455eec7a6a727a3fb12c2ad6d04b1d Mon Sep 17 00:00:00 2001 From: Chet Lemon Date: Thu, 27 Apr 2023 13:59:19 -0700 Subject: [PATCH 1/3] MountPoint piped to audit logs --- audit/format.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audit/format.go b/audit/format.go index 64edb9083760..83bbbd77ba3e 100644 --- a/audit/format.go +++ b/audit/format.go @@ -117,6 +117,7 @@ func (f *AuditFormatter) FormatRequest(ctx context.Context, w io.Writer, config ClientToken: req.ClientToken, ClientTokenAccessor: req.ClientTokenAccessor, Operation: req.Operation, + MountPoint: req.MountPoint, MountType: req.MountType, MountAccessor: req.MountAccessor, MountRunningVersion: req.MountRunningVersion(), @@ -320,6 +321,7 @@ func (f *AuditFormatter) FormatResponse(ctx context.Context, w io.Writer, config ClientTokenAccessor: req.ClientTokenAccessor, ClientID: req.ClientID, Operation: req.Operation, + MountPoint: req.MountPoint, MountType: req.MountType, MountAccessor: req.MountAccessor, MountRunningVersion: req.MountRunningVersion(), @@ -341,6 +343,7 @@ func (f *AuditFormatter) FormatResponse(ctx context.Context, w io.Writer, config }, Response: &AuditResponse{ + MountPoint: req.MountPoint, MountType: req.MountType, MountAccessor: req.MountAccessor, MountRunningVersion: req.MountRunningVersion(), @@ -409,6 +412,7 @@ type AuditRequest struct { ClientID string `json:"client_id,omitempty"` ReplicationCluster string `json:"replication_cluster,omitempty"` Operation logical.Operation `json:"operation,omitempty"` + MountPoint string `json:"mount_point,omitempty"` MountType string `json:"mount_type,omitempty"` MountAccessor string `json:"mount_accessor,omitempty"` MountRunningVersion string `json:"mount_running_version,omitempty"` @@ -430,6 +434,7 @@ type AuditRequest struct { type AuditResponse struct { Auth *AuditAuth `json:"auth,omitempty"` + MountPoint string `json:"mount_point,omitempty"` MountType string `json:"mount_type,omitempty"` MountAccessor string `json:"mount_accessor,omitempty"` MountRunningVersion string `json:"mount_running_plugin_version,omitempty"` From 11bc31aed058fef97a11aebb173edf4dfa06a038 Mon Sep 17 00:00:00 2001 From: Chet Lemon Date: Thu, 27 Apr 2023 14:05:30 -0700 Subject: [PATCH 2/3] changelog --- changelog/20411.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/20411.txt diff --git a/changelog/20411.txt b/changelog/20411.txt new file mode 100644 index 000000000000..648fc8a14276 --- /dev/null +++ b/changelog/20411.txt @@ -0,0 +1,3 @@ +```release-note:improvement +audit: pipes the existing "Request.MountPoint" into audit logs +``` From a512c7ced5589f8f9c042554fc733c903bfe6aa7 Mon Sep 17 00:00:00 2001 From: Chet Lemon Date: Thu, 27 Apr 2023 14:26:29 -0700 Subject: [PATCH 3/3] Update changelog/20411.txt Co-authored-by: Nick Cabatoff --- changelog/20411.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/20411.txt b/changelog/20411.txt index 648fc8a14276..093509040c02 100644 --- a/changelog/20411.txt +++ b/changelog/20411.txt @@ -1,3 +1,3 @@ ```release-note:improvement -audit: pipes the existing "Request.MountPoint" into audit logs +audit: add a `mount_point` field to audit requests and response entries ```