-
Notifications
You must be signed in to change notification settings - Fork 914
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
Rule not working: Create/Modify Configmap With Private Credentials #1186
Comments
Update: this rule is not working when the "user" is not in allowed_k8s_users, in my case "kubernetes-admin". Are below known and correct behaviour?
Alerts flagged:
Alers flagged: |
@yinynick I had the exact same issue with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please, keep open. I have had the same issue. |
Rule - Create/Modify Configmap With Private Credentials seems not working by default following https://falco.org/docs/event-sources/kubernetes-audit/ on version 0.22.1.
Other k8s audit rules would flag without problems.
Command in use to create configmap:
kubectl create -f configmap.yaml
Audit log output:
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "59a27ad6-5164-46a9-8c63-0a71bcc2ed8e",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/default/configmaps",
"verb": "create",
"user": {
"username": "kubernetes-admin",
"groups": [
"system:masters",
"system:authenticated"
]
},
"sourceIPs": [
"10.211.55.12"
],
"userAgent": "kubectl/v1.18.2 (linux/amd64) kubernetes/52c56ce",
"objectRef": {
"resource": "configmaps",
"namespace": "default",
"name": "my-config1",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "ConfigMap",
"apiVersion": "v1",
"metadata": {
"name": "my-config1",
"namespace": "default",
"creationTimestamp": null
},
"data": {
"access.properties": "aws_access_key_id = MY-ID\naws_secret_access_key = MY-KEY\npassword = NICK\n"
}
},
"responseObject": {
"kind": "ConfigMap",
"apiVersion": "v1",
"metadata": {
"name": "my-config1",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/configmaps/my-config1",
"uid": "66cd8571-fa16-40fb-b485-293e6c2d4d61",
"resourceVersion": "219832",
"creationTimestamp": "2020-05-05T07:17:06Z",
"managedFields": [
{
"manager": "kubectl",
"operation": "Update",
"apiVersion": "v1",
"time": "2020-05-05T07:17:06Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:data": {
".": {},
"f:access.properties": {}
}
}
}
]
},
"data": {
"access.properties": "aws_access_key_id = MY-ID\naws_secret_access_key = MY-KEY\npassword = NICK\n"
}
},
"requestReceivedTimestamp": "2020-05-05T07:17:06.458299Z",
"stageTimestamp": "2020-05-05T07:17:06.461035Z",
"annotations": {
"authorization.k8s.io/decision": "allow",
"authorization.k8s.io/reason": ""
}
}
The text was updated successfully, but these errors were encountered: