-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stricter checks on AdmissionPolicy and AdmissionPolicyGroup rules
By design, AdmissionPolicy and AdmissionPolicyGroup can evaluate only namespaced resources. The resources to be evaluated are determined by the `rules` provided by the user. There might be Kubernetes namespaced resources that should not be validated by AdmissionPolicy and AdmissionPolicyGroup policies because of their sensitive nature. For example, PolicyReport are namespaced resources that contain the list of non compliant objects found inside of a namespace. Prior to this commit, an AdmissionPolicy or an AdmissionPolicyGroup could prevent the creation of PolicyReports. Moreover, a mutating AdmissionPolicy could even alter the contents of the PolicyReports created inside of the namespace. This commit extends the validation rules applied to AdmissionPolicy and AdmissionPolicyGroup to prevent them from validating sensitive types of namespaced resources. To achieve that, the new validation will also restrict the usage of wildcards when defining `apiGroups` and `resources` rules for AdmissionPolicy and AdmissionPolicyGroup objects. Signed-off-by: Flavio Castelli <[email protected]>
- Loading branch information
Showing
3 changed files
with
300 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.