Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/admission/plugin/namespace/lifecycle/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,13 @@ func (l *Lifecycle) ValidateInitialization() error {
// accessReviewResources are resources which give a view into permissions in a namespace. Users must be allowed to create these
// resources because returning "not found" errors allows someone to search for the "people I'm going to fire in 2017" namespace.
var accessReviewResources = map[schema.GroupResource]bool{
{Group: "authorization.k8s.io", Resource: "localsubjectaccessreviews"}: true,
{Group: "authorization.k8s.io", Resource: "localsubjectaccessreviews"}: true,
schema.GroupResource{Group: "authorization.openshift.io", Resource: "subjectaccessreviews"}: true,
schema.GroupResource{Group: "authorization.openshift.io", Resource: "localsubjectaccessreviews"}: true,
schema.GroupResource{Group: "authorization.openshift.io", Resource: "resourceaccessreviews"}: true,
schema.GroupResource{Group: "authorization.openshift.io", Resource: "localresourceaccessreviews"}: true,
schema.GroupResource{Group: "authorization.openshift.io", Resource: "selfsubjectrulesreviews"}: true,
schema.GroupResource{Group: "authorization.openshift.io", Resource: "subjectrulesreviews"}: true,
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I can follow why this is necessary now

nit: remove schema.GroupResource


func isAccessReview(a admission.Attributes) bool {
Expand Down