@@ -504,8 +504,8 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
504
504
// are subsequently rewritten by the admission controller.
505
505
g .When ("the service account is deployment-service-controller" , func () {
506
506
g .BeforeEach (func () {
507
- tc .data .users = []string {"system:serviceaccount:kube-system:deployment-service-controller" }
508
507
tc .data .groups = [][]string {{"system:serviceaccounts:kube-system" }}
508
+ tc .data .users = []string {"system:serviceaccount:kube-system:deployment-service-controller" }
509
509
})
510
510
g .It ("should allow to read secrets on user namespaces" , func () {
511
511
tc .data .namespaces = []string {"teapot" }
@@ -524,8 +524,8 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
524
524
})
525
525
g .When ("the service account is CDP" , func () {
526
526
g .BeforeEach (func () {
527
- tc .data .users = []string {"system:serviceaccount:default:cdp" }
528
527
tc .data .groups = [][]string {{"system:serviceaccounts:default" }}
528
+ tc .data .users = []string {"system:serviceaccount:default:cdp" }
529
529
})
530
530
g .It ("should allow to read secrets on user namespaces" , func () {
531
531
tc .data .namespaces = []string {"teapot" }
@@ -541,6 +541,14 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
541
541
tc .run (context .TODO (), cs , true )
542
542
gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
543
543
})
544
+ // TODO: create clusterrole with read secret permission
545
+ g .It ("should create a clusterrole with read secret permission" , func () {
546
+ tc .data .namespaces = []string {"teapot" }
547
+ tc .data .resources = []string {"clusterrole" }
548
+ tc .data .verbs = []string {"create" }
549
+ tc .run (context .TODO (), cs , true )
550
+ gomega .Expect (tc .output .passed ).To (gomega .BeTrue (), tc .output .String ())
551
+ })
544
552
})
545
553
})
546
554
0 commit comments