Commit Graph

7 Commits

Author SHA1 Message Date
Cao Shufeng 01b15f1056 fix invalid match rules for advanced audit policy
When users or groups are set in a rule, this rule should not match
attribute with unauthorized request where user and group are nil.

Kubernetes-commit: 9a7acaae1d5015886cc7c3bc46fc3d973045dc2a
2018-02-06 14:05:57 +08:00
hzxuzhonghu a94f246093 audit support wildcard matching subresources
Kubernetes-commit: 6e83d88be906c174ab3860eec70f2a4aec0ecb48
2017-11-08 16:03:26 +08:00
Cao Shufeng d3301ca8d8 [advanced audit]add a policy wide omitStage
Kubernetes-commit: d75c0f0e21af8229ed3147e9a798441221c03574
2017-10-27 10:01:01 +08:00
Cao Shufeng 4905dd9b0c Provide a way to omit Event stages in audit policy
Updates https://github.com/kubernetes/kubernetes/issues/48561
This provide a way to omit some stages for each audit policy rule.

For example:
  apiVersion: audit.k8s.io/v1beta1
  kind: Policy
  - level: Metadata
    resources:
       - group: "rbac.authorization.k8s.io"
         resources: ["roles"]
    omitStages:
      - "RequestReceived"

RequestReceived stage will not be emitted to audit backends with
previous config.

Kubernetes-commit: 47ba91450fbe7d9002bfc9d4a48a73256252821f
2017-09-04 14:03:48 +00:00
Maciej Szulik 677d724b3a Allow audit to log authorization failures
Kubernetes-commit: 9fef244d4ccce0ea8daf37ab86a7af4892d000cf
2017-09-03 14:04:12 +00:00
Eric Chiang 1fa829c7c8 Audit policy v1beta1 now supports matching subresources and resource names.
policy:
	- level: Metadata
	  resources:
	  - group: ""
	    resources ["pods/logs"]
	- level: None
	  resources:
	  - group: ""
	    resources: ["configmaps"]
	    resourceNames: ["controller-leader"]

The top level resource no longer matches the subresource. For example "pods"
no longer matches requests to the logs subresource on pods.

```release-note
Audit policy supports matching subresources and resource names, but the top level resource no longer matches the subresouce. For example "pods" no longer matches requests to the logs subresource of pods. Use "pods/logs" to match subresources.
```

Kubernetes-commit: 85491f1578b9b97751a332d3b957d874cecf27b3
2017-09-01 16:38:01 +00:00
Tim St. Clair 8ff532a4cb Implement audit policy logic
Kubernetes-commit: a5de309ee261aea15bb1cc12647b32640c2ac196
2017-06-13 20:47:28 +00:00