add mount accessor to audit request and responses (#15342)
* add mount accessor to audit request and responses * add changelog * cleanup todo
This commit is contained in:
parent
0af0543bbe
commit
6f15ac255a
|
@ -115,6 +115,7 @@ func (f *AuditFormatter) FormatRequest(ctx context.Context, w io.Writer, config
|
|||
ClientTokenAccessor: req.ClientTokenAccessor,
|
||||
Operation: req.Operation,
|
||||
MountType: req.MountType,
|
||||
MountAccessor: req.MountAccessor,
|
||||
Namespace: &AuditNamespace{
|
||||
ID: ns.ID,
|
||||
Path: ns.Path,
|
||||
|
@ -278,6 +279,7 @@ func (f *AuditFormatter) FormatResponse(ctx context.Context, w io.Writer, config
|
|||
ClientTokenAccessor: req.ClientTokenAccessor,
|
||||
Operation: req.Operation,
|
||||
MountType: req.MountType,
|
||||
MountAccessor: req.MountAccessor,
|
||||
Namespace: &AuditNamespace{
|
||||
ID: ns.ID,
|
||||
Path: ns.Path,
|
||||
|
@ -294,6 +296,7 @@ func (f *AuditFormatter) FormatResponse(ctx context.Context, w io.Writer, config
|
|||
|
||||
Response: &AuditResponse{
|
||||
MountType: req.MountType,
|
||||
MountAccessor: req.MountAccessor,
|
||||
Auth: respAuth,
|
||||
Secret: respSecret,
|
||||
Data: resp.Data,
|
||||
|
@ -343,6 +346,7 @@ type AuditRequest struct {
|
|||
ReplicationCluster string `json:"replication_cluster,omitempty"`
|
||||
Operation logical.Operation `json:"operation,omitempty"`
|
||||
MountType string `json:"mount_type,omitempty"`
|
||||
MountAccessor string `json:"mount_accessor,omitempty"`
|
||||
ClientToken string `json:"client_token,omitempty"`
|
||||
ClientTokenAccessor string `json:"client_token_accessor,omitempty"`
|
||||
Namespace *AuditNamespace `json:"namespace,omitempty"`
|
||||
|
@ -359,6 +363,7 @@ type AuditRequest struct {
|
|||
type AuditResponse struct {
|
||||
Auth *AuditAuth `json:"auth,omitempty"`
|
||||
MountType string `json:"mount_type,omitempty"`
|
||||
MountAccessor string `json:"mount_accessor,omitempty"`
|
||||
Secret *AuditSecret `json:"secret,omitempty"`
|
||||
Data map[string]interface{} `json:"data,omitempty"`
|
||||
Warnings []string `json:"warnings,omitempty"`
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
audit: Include mount_accessor in audit request and response logs
|
||||
```
|
Loading…
Reference in New Issue