mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
VAULT-23334: CE changes to support exclusion in audit (#26615)
* CE changes to support exclusion in audit * Add an external test for audit exclusion --------- Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
This commit is contained in:
@@ -188,6 +188,15 @@ func TestBackend_hasEnterpriseAuditOptions(t *testing.T) {
|
||||
},
|
||||
expected: true,
|
||||
},
|
||||
"ent-opt-exclude": {
|
||||
input: map[string]string{
|
||||
"exclude": `{
|
||||
"condition": "\"/request/mount_type\" == transit",
|
||||
"fields": [ "/request/data", "/response/data" ]
|
||||
}`,
|
||||
},
|
||||
expected: true,
|
||||
},
|
||||
}
|
||||
|
||||
for name, tc := range tests {
|
||||
@@ -241,6 +250,15 @@ func TestBackend_hasInvalidAuditOptions(t *testing.T) {
|
||||
},
|
||||
expected: !constants.IsEnterprise,
|
||||
},
|
||||
"ent-opt-exclude": {
|
||||
input: map[string]string{
|
||||
"exclude": `{
|
||||
"condition": "\"/request/mount_type\" == transit",
|
||||
"fields": [ "/request/data", "/response/data" ]
|
||||
}`,
|
||||
},
|
||||
expected: !constants.IsEnterprise,
|
||||
},
|
||||
}
|
||||
|
||||
for name, tc := range tests {
|
||||
|
||||
Reference in New Issue
Block a user