Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support audit ignore policy by actions #67477

Merged
merged 35 commits into from Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6f6d4ee
Support audit ignore policy by index privileges
BigPandaToo Jan 13, 2021
665749c
Merge branch 'master' into Audit_ignore_action
elasticmachine Jan 19, 2021
a918da1
Support audit ignore policy by index privileges
BigPandaToo Jan 19, 2021
b4a85d3
Merge branch 'master' into Audit_ignore_action
elasticmachine Jan 27, 2021
a7585b7
Merge branch 'master' into Audit_ignore_action
elasticmachine Jan 27, 2021
cb5bc09
To avoid ambiguity (as cluster and index policies may have the same
BigPandaToo Jan 28, 2021
7dd8fe7
To avoid ambiguity (as cluster and index policies may have the same
BigPandaToo Jan 28, 2021
72b9aef
Fixing Api key related privilege check which expects request and
BigPandaToo Jan 31, 2021
93103ae
Merge branch 'master' into Audit_ignore_action
elasticmachine Jan 31, 2021
7faa52f
Fixing a test; adding a caching mechanism to avoid calling
BigPandaToo Feb 1, 2021
08289b6
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 2, 2021
af10298
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 3, 2021
4673a3a
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 11, 2021
697131c
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 15, 2021
35573c8
Support audit ignore policy by index privileges
BigPandaToo Feb 10, 2021
67574b2
Support audit ignore policy by index privileges
BigPandaToo Feb 15, 2021
96d22a4
Support audit ignore policy by index privileges
BigPandaToo Feb 15, 2021
79649e9
Support audit ignore policy by index privileges
BigPandaToo Feb 15, 2021
152821e
Support audit ignore policy by index privileges
BigPandaToo Feb 15, 2021
f5d383f
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 16, 2021
a8e7915
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 22, 2021
4e51ad0
Revert "Support audit ignore policy by index privileges"
BigPandaToo Feb 22, 2021
7338afb
Revert "Support audit ignore policy by index privileges"
BigPandaToo Feb 22, 2021
17adbe1
Revert "Support audit ignore policy by index privileges"
BigPandaToo Feb 22, 2021
68e1b6b
Revert "Support audit ignore policy by index privileges"
BigPandaToo Feb 22, 2021
125e8f4
Revert "Support audit ignore policy by index privileges"
BigPandaToo Feb 22, 2021
dfd002d
Revert "Fixing a test; adding a caching mechanism to avoid calling fi…
BigPandaToo Feb 22, 2021
430e625
Revert "Fixing Api key related privilege check which expects request …
BigPandaToo Feb 22, 2021
bf759f0
Revert "To avoid ambiguity (as cluster and index policies may have th…
BigPandaToo Feb 22, 2021
ca3f2cb
Revert "To avoid ambiguity (as cluster and index policies may have th…
BigPandaToo Feb 22, 2021
10e8e2a
Revert "Support audit ignore policy by index privileges"
BigPandaToo Feb 22, 2021
cb15d41
Support audit ignore policy by actions
BigPandaToo Feb 22, 2021
53f1e96
Support audit ignore policy by actions
BigPandaToo Feb 28, 2021
c96fcaa
Merge branch 'master' into Audit_ignore_action
elasticmachine Feb 28, 2021
7a83508
Support audit ignore policy by actions
BigPandaToo Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/reference/settings/audit-settings.asciidoc
Expand Up @@ -149,6 +149,15 @@ A list of authentication realm names or wildcards. The specified policy will
not print audit events for users in these realms.
// end::xpack-sa-lf-events-ignore-realms-tag[]

[[xpack-sa-lf-events-ignore-actions]]
// tag::xpack-sa-lf-events-ignore-actions-tag[]
`xpack.security.audit.logfile.events.ignore_filters.<policy_name>.actions`::
(<<dynamic-cluster-setting,Dynamic>>)
A list of action names or wildcards. Action name can be found in the `action`
field of the audit event. The specified policy will not print audit events
for actions matching these values.
// end::xpack-sa-lf-events-ignore-actions-tag[]

[[xpack-sa-lf-events-ignore-roles]]
// tag::xpack-sa-lf-events-ignore-roles-tag[]
`xpack.security.audit.logfile.events.ignore_filters.<policy_name>.roles`::
Expand Down
Expand Up @@ -96,7 +96,8 @@ public void testInvalidFilterSettings() throws Exception {
final String[] allSettingsKeys = new String[] { "xpack.security.audit.logfile.events.ignore_filters.invalid.users",
"xpack.security.audit.logfile.events.ignore_filters.invalid.realms",
"xpack.security.audit.logfile.events.ignore_filters.invalid.roles",
"xpack.security.audit.logfile.events.ignore_filters.invalid.indices" };
"xpack.security.audit.logfile.events.ignore_filters.invalid.indices",
"xpack.security.audit.logfile.events.ignore_filters.invalid.actions"};
settingsBuilder.put(randomFrom(allSettingsKeys), invalidLuceneRegex);
final IllegalArgumentException e = expectThrows(IllegalArgumentException.class,
() -> client().admin().cluster().prepareUpdateSettings().setTransientSettings(settingsBuilder.build()).get());
Expand Down Expand Up @@ -223,6 +224,12 @@ private static Settings randomFilterPolicySettings(String policyName) {
final List<String> filteredIndices = randomNonEmptyListOfFilteredNames();
settingsBuilder.putList("xpack.security.audit.logfile.events.ignore_filters." + policyName + ".indices", filteredIndices);
}
if (randomBoolean()) {
// filter by actions
final List<String> filteredActions = randomNonEmptyListOfFilteredNames();
settingsBuilder.putList("xpack.security.audit.logfile.events.ignore_filters." + policyName + ".actions",
filteredActions);
}
} while (settingsBuilder.build().isEmpty());

assertFalse(settingsBuilder.build().isEmpty());
Expand Down