Pipe MountPoint to audit logs (#20411)
* MountPoint piped to audit logs --------- Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
This commit is contained in:
parent
11632b57bc
commit
4a9e8f2f9d
|
@ -117,6 +117,7 @@ func (f *AuditFormatter) FormatRequest(ctx context.Context, w io.Writer, config
|
||||||
ClientToken: req.ClientToken,
|
ClientToken: req.ClientToken,
|
||||||
ClientTokenAccessor: req.ClientTokenAccessor,
|
ClientTokenAccessor: req.ClientTokenAccessor,
|
||||||
Operation: req.Operation,
|
Operation: req.Operation,
|
||||||
|
MountPoint: req.MountPoint,
|
||||||
MountType: req.MountType,
|
MountType: req.MountType,
|
||||||
MountAccessor: req.MountAccessor,
|
MountAccessor: req.MountAccessor,
|
||||||
MountRunningVersion: req.MountRunningVersion(),
|
MountRunningVersion: req.MountRunningVersion(),
|
||||||
|
@ -320,6 +321,7 @@ func (f *AuditFormatter) FormatResponse(ctx context.Context, w io.Writer, config
|
||||||
ClientTokenAccessor: req.ClientTokenAccessor,
|
ClientTokenAccessor: req.ClientTokenAccessor,
|
||||||
ClientID: req.ClientID,
|
ClientID: req.ClientID,
|
||||||
Operation: req.Operation,
|
Operation: req.Operation,
|
||||||
|
MountPoint: req.MountPoint,
|
||||||
MountType: req.MountType,
|
MountType: req.MountType,
|
||||||
MountAccessor: req.MountAccessor,
|
MountAccessor: req.MountAccessor,
|
||||||
MountRunningVersion: req.MountRunningVersion(),
|
MountRunningVersion: req.MountRunningVersion(),
|
||||||
|
@ -341,6 +343,7 @@ func (f *AuditFormatter) FormatResponse(ctx context.Context, w io.Writer, config
|
||||||
},
|
},
|
||||||
|
|
||||||
Response: &AuditResponse{
|
Response: &AuditResponse{
|
||||||
|
MountPoint: req.MountPoint,
|
||||||
MountType: req.MountType,
|
MountType: req.MountType,
|
||||||
MountAccessor: req.MountAccessor,
|
MountAccessor: req.MountAccessor,
|
||||||
MountRunningVersion: req.MountRunningVersion(),
|
MountRunningVersion: req.MountRunningVersion(),
|
||||||
|
@ -409,6 +412,7 @@ type AuditRequest struct {
|
||||||
ClientID string `json:"client_id,omitempty"`
|
ClientID string `json:"client_id,omitempty"`
|
||||||
ReplicationCluster string `json:"replication_cluster,omitempty"`
|
ReplicationCluster string `json:"replication_cluster,omitempty"`
|
||||||
Operation logical.Operation `json:"operation,omitempty"`
|
Operation logical.Operation `json:"operation,omitempty"`
|
||||||
|
MountPoint string `json:"mount_point,omitempty"`
|
||||||
MountType string `json:"mount_type,omitempty"`
|
MountType string `json:"mount_type,omitempty"`
|
||||||
MountAccessor string `json:"mount_accessor,omitempty"`
|
MountAccessor string `json:"mount_accessor,omitempty"`
|
||||||
MountRunningVersion string `json:"mount_running_version,omitempty"`
|
MountRunningVersion string `json:"mount_running_version,omitempty"`
|
||||||
|
@ -430,6 +434,7 @@ type AuditRequest struct {
|
||||||
|
|
||||||
type AuditResponse struct {
|
type AuditResponse struct {
|
||||||
Auth *AuditAuth `json:"auth,omitempty"`
|
Auth *AuditAuth `json:"auth,omitempty"`
|
||||||
|
MountPoint string `json:"mount_point,omitempty"`
|
||||||
MountType string `json:"mount_type,omitempty"`
|
MountType string `json:"mount_type,omitempty"`
|
||||||
MountAccessor string `json:"mount_accessor,omitempty"`
|
MountAccessor string `json:"mount_accessor,omitempty"`
|
||||||
MountRunningVersion string `json:"mount_running_plugin_version,omitempty"`
|
MountRunningVersion string `json:"mount_running_plugin_version,omitempty"`
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:improvement
|
||||||
|
audit: add a `mount_point` field to audit requests and response entries
|
||||||
|
```
|
Loading…
Reference in New Issue