audit policy: a policy with 0 rules should return an error, kind and apiVersion now required #51565
Labels
area/audit
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
sig/auth
Categorizes an issue or PR as relevant to SIG Auth.
Milestone
/sig auth
/kind bug
If an audit policies is supplied and there are no rules detected, the API server should error.
Over the last release, a change was made so audit policies now require kind and apiVersion fields to be parsed. So the following policy doesn't work:
However this doesn't error, it just spits out:
This should result in an error. Parsing a file with 0 rules should indicate there's some configuration failure.
BTW, the correct audit policy is:
We also need to update docs to reflect this new requirement, since kubernetes.io doesn't use "kind" or "apiVersion" for the policy docs.
/cc @sttts @soltysh @CaoShuFeng @tallclair @crassirostris
The text was updated successfully, but these errors were encountered: