Skip to content

Commit 39e6e18

Browse files
committed
add new tests for credentials-provider user
1 parent 4eba59b commit 39e6e18

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/e2e/authorization.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,16 @@ var _ = g.Describe("Authorization [RBAC] [Zalando]", func() {
449449
g.When("the user is k8sapi_credentials-provider", func() {
450450
g.BeforeEach(func() {
451451
tc.data.users = []string{"zalando-iam:zalando:service:k8sapi_credentials-provider"}
452-
})
453-
g.It("should allow to get Secrets in kube-system namespace", func() {
454452
tc.data.resources = []string{"secrets"}
455453
tc.data.namespaces = []string{"kube-system"}
456-
tc.data.verbs = []string{"get"}
454+
})
455+
g.It("should not allow to delete secrets in kube-system namespace", func() {
456+
tc.data.verbs = []string{"delete"}
457+
tc.run(context.TODO(), cs, false)
458+
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
459+
})
460+
g.It("should allow all non-delete operations on secrets in kube-system namespace", func() {
461+
tc.data.verbs = []string{"get", "list", "watch", "create", "update", "patch"}
457462
tc.run(context.TODO(), cs, true)
458463
gomega.Expect(tc.output.passed).To(gomega.BeTrue(), tc.output.String())
459464
})

0 commit comments

Comments
 (0)