Skip to content

Commit

Permalink
pkg/bootstrappolicy: rm unauthn grp from crb
Browse files Browse the repository at this point in the history
  • Loading branch information
ibihim committed Apr 2, 2024
1 parent 58e5b34 commit 5f66eee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 4 additions & 4 deletions pkg/bootstrappolicy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,13 @@ func GetOpenshiftBootstrapClusterRoleBindings() []rbacv1.ClusterRoleBinding {
Groups(AuthenticatedGroup).
BindingOrDie(),
newOriginClusterBinding(SelfAccessReviewerRoleBindingName, SelfAccessReviewerRoleName).
Groups(AuthenticatedGroup, UnauthenticatedGroup).
Groups(AuthenticatedGroup).
BindingOrDie(),
newOriginClusterBinding(SelfProvisionerRoleBindingName, SelfProvisionerRoleName).
Groups(AuthenticatedOAuthGroup).
BindingOrDie(),
newOriginClusterBinding(OAuthTokenDeleterRoleBindingName, OAuthTokenDeleterRoleName).
Groups(AuthenticatedGroup, UnauthenticatedGroup).
Groups(AuthenticatedGroup).
BindingOrDie(),
newOriginClusterBinding(StatusCheckerRoleBindingName, StatusCheckerRoleName).
Groups(AuthenticatedGroup).
Expand All @@ -787,7 +787,7 @@ func GetOpenshiftBootstrapClusterRoleBindings() []rbacv1.ClusterRoleBinding {
Groups(NodesGroup).
BindingOrDie(),
newOriginClusterBinding(WebHooksRoleBindingName, WebHooksRoleName).
Groups(AuthenticatedGroup, UnauthenticatedGroup).
Groups(AuthenticatedGroup).
BindingOrDie(),
rbacv1helpers.NewClusterBinding(DiscoveryRoleName).
Groups(AuthenticatedGroup).
Expand All @@ -811,7 +811,7 @@ func GetOpenshiftBootstrapClusterRoleBindings() []rbacv1.ClusterRoleBinding {
// Everyone should be able to add a scope to their impersonation request. It is purely tightening.
// This does not grant access to impersonate in general, only tighten if you already have permission.
rbacv1helpers.NewClusterBinding(ScopeImpersonationRoleName).
Groups(AuthenticatedGroup, UnauthenticatedGroup).
Groups(AuthenticatedGroup).
BindingOrDie(),
}
for i := range clusterRoleBindings {
Expand Down
12 changes: 0 additions & 12 deletions test/testdata/bootstrappolicy/bootstrap_cluster_role_bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ items:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:authenticated
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:unauthenticated
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -129,9 +126,6 @@ items:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:authenticated
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:unauthenticated
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -192,9 +186,6 @@ items:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:authenticated
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:unauthenticated
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -285,9 +276,6 @@ items:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:authenticated
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:unauthenticated
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down

0 comments on commit 5f66eee

Please sign in to comment.