Skip to content

Commit 80b7ff1

Browse files
committed
add the rbac test suite description
1 parent 8d759de commit 80b7ff1

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed

test/e2e/authorisation.go

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
package e2e
2+
3+
import (
4+
g "github.com/onsi/ginkgo/v2"
5+
)
6+
7+
var _ = g.Describe("Authorisation [RBAC] [Zalando]", func() {
8+
9+
g.Context("For all groups", func() {
10+
g.When("the verb is impersonate", func() {
11+
g.It("should deny access for users", func() {})
12+
g.It("should deny access for service accounts", func() {})
13+
})
14+
g.When("the verb is escalate", func() {
15+
g.It("should deny access for cluster roles", func() {})
16+
g.It("should deny access for roles in all namespaces", func() {})
17+
})
18+
})
19+
20+
g.Context("For ReadOnly group", func() {
21+
g.When("the resource is a Secret", func() {
22+
g.It("should deny read access in all namespaces", func() {})
23+
})
24+
g.When("the resource is not a Secret resource", func() {
25+
g.It("should allow read access in all namespaces", func() {})
26+
g.It("should deny write access in all namespaces", func() {})
27+
})
28+
g.When("the resource is a global resource", func() {
29+
g.It("should allow read access", func() {})
30+
g.It("should deny write access", func() {})
31+
})
32+
})
33+
34+
g.Context("For PowerUser, Manual and Emergency groups", func() {
35+
36+
g.It("should deny read access to Secrets in kube-system and visibility namespaces", func() {})
37+
g.It("should deny write access to Nodes", func() {})
38+
g.It("should deny write access to DaemonSets", func() {})
39+
g.It("should deny deleting CRDs", func() {})
40+
g.It("should deny deleting kube-system or visibility namespaces", func() {})
41+
42+
g.When("the resource is a namespaced resource", func() {
43+
g.It("should deny write access in kube-system and visibility namespaces", func() {})
44+
g.It("should allow write access in namespaces other than kube-system and visibility", func() {})
45+
})
46+
g.When("the resource is a global resource", func() {
47+
g.It("should deny access to Nodes", func() {})
48+
g.It("should allow access to resources other than Nodes", func() {})
49+
})
50+
})
51+
52+
g.Context("For CollaboratorPowerUser, CollaboratorManual and CollaboratorEmergency groups", func() {
53+
g.When("the resource is a Secret", func() {
54+
g.It("should allow read access to visibility namespace", func() {})
55+
g.It("should deny read access to kube-system namespace", func() {})
56+
})
57+
58+
g.It("should deny write access to Nodes", func() {})
59+
g.It("should allow write access to DaemonSets", func() {})
60+
g.It("should allow deletion of CRDs", func() {})
61+
g.It("should deny deletion of kube-system or visibility namespaces", func() {})
62+
63+
g.When("the resource is a namespaced resource", func() {
64+
g.It("should deny write access in kube-system namespace", func() {})
65+
g.It("should allow write access in namespaces other than kube-system", func() {})
66+
})
67+
68+
g.When("the resource is a global resource", func() {
69+
g.It("should deny access to Nodes", func() {})
70+
g.It("should allow access to resources other than Nodes", func() {})
71+
})
72+
})
73+
74+
g.Context("For system users", func() {
75+
g.When("the user is kubelet", func() {
76+
g.It("should allow to get Pods", func() {})
77+
})
78+
79+
g.When("the service account is daemonset-controller", func() {
80+
g.It("should allow to update DaemonSet status subresource", func() {})
81+
g.It("should allow to update DaemonSet finalizers", func() {})
82+
g.It("should allow to create Pods", func() {})
83+
})
84+
85+
g.When("the service account is default", func() {
86+
g.It("should deny to list StatefulSets when in default namespace", func() {})
87+
g.It("should deny to list StatefulSets when in non-default namespace", func() {})
88+
})
89+
90+
g.When("the service account is persistent-volume-binder", func() {
91+
g.It("should allow to update PersistentVolumeClaims", func() {})
92+
g.It("should allow to create PersistentVolumes", func() {})
93+
94+
})
95+
96+
g.When("the service account is aws-cloud-provider", func() {
97+
g.It("should allow to patch Nodes", func() {})
98+
})
99+
100+
g.When("the service account is api-monitoring-controller", func() {
101+
g.It("should allow to update the skipper-default-filters ConfigMap in kube-system namespace", func() {})
102+
g.It("should deny to update ConfigMaps other than skipper-default-filters", func() {})
103+
})
104+
105+
g.When("the user is k8sapi_credentials-provider", func() {
106+
g.It("should allow to get Secrets in kube-system namespace", func() {})
107+
})
108+
109+
g.When("the user is stups_cdp-controller", func() {
110+
g.It("should deny access to Secrets in kube-system namespace", func() {})
111+
})
112+
113+
})
114+
115+
g.Context("For administrators", func() {
116+
g.It("should allow read access to resources other than Secrets in kube-system namespace", func() {})
117+
g.It("should allow write access to resources other than Secrets in kube-system namespace", func() {})
118+
g.It("should allow read access to Secrets in kube-system namespace", func() {})
119+
g.It("should allow read access to Secrets in namespaces other than kube-system", func() {})
120+
g.It("should allow write access to namespaces other than kube-system", func() {})
121+
g.It("should allow to proxy", func() {})
122+
g.It("should allow write access to DaemonSets", func() {})
123+
})
124+
125+
})

0 commit comments

Comments
 (0)