@@ -512,8 +512,8 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
512
512
// are subsequently rewritten by the admission controller.
513
513
g .When ("the service account is deployment-service-controller" , func () {
514
514
g .BeforeEach (func () {
515
- tc .data .users = []string {"system:serviceaccount:kube-system:deployment-service-controller" }
516
515
tc .data .groups = [][]string {{"system:serviceaccounts:kube-system" }}
516
+ tc .data .users = []string {"system:serviceaccount:kube-system:deployment-service-controller" }
517
517
})
518
518
g .It ("should allow to read secrets on user namespaces" , func () {
519
519
tc .data .namespaces = []string {"teapot" }
@@ -532,8 +532,8 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
532
532
})
533
533
g .When ("the service account is CDP" , func () {
534
534
g .BeforeEach (func () {
535
- tc .data .users = []string {"system:serviceaccount:default:cdp" }
536
535
tc .data .groups = [][]string {{"system:serviceaccounts:default" }}
536
+ tc .data .users = []string {"system:serviceaccount:default:cdp" }
537
537
})
538
538
g .It ("should allow to read secrets on user namespaces" , func () {
539
539
tc .data .namespaces = []string {"teapot" }
@@ -549,6 +549,14 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
549
549
tc .run (context .TODO (), cs , true )
550
550
gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
551
551
})
552
+ // TODO: create clusterrole with read secret permission
553
+ g .It ("should create a clusterrole with read secret permission" , func () {
554
+ tc .data .namespaces = []string {"teapot" }
555
+ tc .data .resources = []string {"clusterrole" }
556
+ tc .data .verbs = []string {"create" }
557
+ tc .run (context .TODO (), cs , true )
558
+ gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
559
+ })
552
560
})
553
561
})
554
562
0 commit comments