-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Structured audit logging #31931
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
Structured audit logging #31931
Changes from 39 commits
dfa711f
0511e09
2607d19
8e4cb49
08187bf
d54c05f
69c201a
fa579e7
1098bc2
138612a
732f021
3e38556
863b003
1c14cc7
e8c4c81
fe0ba08
723e25e
1c7f947
8fdefae
3688615
62ff075
f48ac57
4c7f335
3a9e4db
be1a6a2
9e66119
ef1d6b6
e92fb3b
131f669
5c95ec9
eb8cb15
59d3b50
b640d4f
c3644e8
b3c70ca
56fbeaa
40e98a1
76650aa
feb2529
49af157
efbeefc
a0103d2
2a3857d
9ffda34
a569107
8b8a8b8
3d6d886
ad942f1
a6aa256
cc9084f
5f87530
633ef9c
8882486
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,36 @@ | ||
| appender.audit_rolling.type = RollingFile | ||
| appender.audit_rolling.name = audit_rolling | ||
| appender.audit_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_access.log | ||
| appender.audit_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_audit.log | ||
| appender.audit_rolling.layout.type = PatternLayout | ||
| appender.audit_rolling.layout.pattern = [%d{ISO8601}] %m%n | ||
| appender.audit_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_access-%d{yyyy-MM-dd}.log | ||
| appender.audit_rolling.layout.pattern = {\ | ||
| "@timestamp":"%d{ISO8601}"\ | ||
| %varsNotEmpty{, "node.name":"%enc{%map{node.name}}{JSON}"}\ | ||
| %varsNotEmpty{, "host.name":"%enc{%map{host.name}}{JSON}"}\ | ||
| %varsNotEmpty{, "host.ip":"%enc{%map{host.ip}}{JSON}"}\ | ||
| %varsNotEmpty{, "event.type":"%enc{%map{event.type}}{JSON}"}\ | ||
| %varsNotEmpty{, "event.action":"%enc{%map{event.action}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.name":"%enc{%map{user.name}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.run_by.name":"%enc{%map{user.run_by.name}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.run_as.name":"%enc{%map{user.run_as.name}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.realm":"%enc{%map{user.realm}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.run_by.realm":"%enc{%map{user.run_by.realm}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.run_as.realm":"%enc{%map{user.run_as.realm}}{JSON}"}\ | ||
| %varsNotEmpty{, "user.roles":%map{user.roles}}\ | ||
| %varsNotEmpty{, "origin.type":"%enc{%map{origin.type}}{JSON}"}\ | ||
| %varsNotEmpty{, "origin.address":"%enc{%map{origin.address}}{JSON}"}\ | ||
| %varsNotEmpty{, "realm":"%enc{%map{realm}}{JSON}"}\ | ||
| %varsNotEmpty{, "url.path":"%enc{%map{url.path}}{JSON}"}\ | ||
| %varsNotEmpty{, "url.query":"%enc{%map{url.query}}{JSON}"}\ | ||
| %varsNotEmpty{, "request.body":"%enc{%map{request.body}}{JSON}"}\ | ||
| %varsNotEmpty{, "action":"%enc{%map{action}}{JSON}"}\ | ||
| %varsNotEmpty{, "request.name":"%enc{%map{request.name}}{JSON}"}\ | ||
| %varsNotEmpty{, "indices":%map{indices}}\ | ||
| %varsNotEmpty{, "opaque_id":"%enc{%map{opaque_id}}{JSON}"}\ | ||
| %varsNotEmpty{, "transport.profile":"%enc{%map{transport.profile}}{JSON}"}\ | ||
| %varsNotEmpty{, "rule":"%enc{%map{rule}}{JSON}"}\ | ||
| %varsNotEmpty{, "event.category":"%enc{%map{event.category}}{JSON}"}\ | ||
| }%n | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the format of the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add these comments (at least the info in them) in the log4j2.properties file? This is good information and it would be nice to have it next to where this is defined.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, will do! |
||
| appender.audit_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_audit-%d{yyyy-MM-dd}.log | ||
| appender.audit_rolling.policies.type = Policies | ||
| appender.audit_rolling.policies.time.type = TimeBasedTriggeringPolicy | ||
| appender.audit_rolling.policies.time.interval = 1 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.