-
Notifications
You must be signed in to change notification settings - Fork 444
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
[Kubernetes] Add audit logs fields #4081
[Kubernetes] Add audit logs fields #4081
Conversation
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
🌐 Coverage report
|
@tetianakravchenko if you run
I am not sure how it slipped away but do you mind applying it? |
@@ -106,6 +106,9 @@ | |||
- name: message | |||
type: text | |||
description: A human-readable description of the status of this operation | |||
- name: reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While working on other integrations, I found it quite useful to have a sample_event.json that cover as many fields as possible. That made me discover that some fields that were supposed to be there were not documented. I am wondering if it makes sense to do the same here for these extra fields like reason
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updates sample_event
. Though fields of the event depends on the type of action, and fields can vary and not all fields defined in fields
folder might be present in single event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no changes for the following:
`json
- annotations.authorization_k8s_io/decision | keyword
- annotations.authorization_k8s_io/reason | text
`?
@gizas I've left a comment on it in the issue - #3664 (comment) |
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
I've run
|
hey @tetianakravchenko the change I am talking about is at https://github.com/tetianakravchenko/integrations/blob/1e4cf2d769cd7c4d3dff83b89042bd52bac5174b/packages/kubernetes/data_stream/state_job/fields/fields.yml#L8. The field kubernetes.job.name seems to have changed the description but the docs haven't changed yet. |
Also since the new fields has been added to the sample_event.json I get these test failures now.
|
@tetianakravchenko below is the sample log you've asked for, I hope it is helpful and thank you for all your work!
|
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
I can see this has been resolved. I'm adding this comment for future reference. |
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
- name: procMount | ||
type: keyword | ||
- name: capabilities.add | ||
type: keyword |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example of the document:
"securityContext": {
"capabilities": {
"add": [
"MKNOD",
"SYS_ADMIN",
"SYS_MODULE",
"SYS_RAWIO",
"NET_ADMIN",
"SYS_CHROOT",
"SYS_PTRACE",
"NET_RAW",
"SYS_BOOT",
"SYSLOG",
""
],
"drop": [
"all"
]
}
},
there is no need to define it as an array
, because in ElasticSearch every field is already an array, doc: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html#types-array-handling
Any field can contain zero or more values by default
What does this PR do?
Add some audit log fields, defined in #3664
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots
requestObject.spec.*
fields: