You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh-cn/docs/concepts/security/rbac-good-practices.md
+35-19Lines changed: 35 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,8 @@ execute their roles. It is important to ensure that, when designing permissions
24
24
users, the cluster administrator understands the areas where privilge escalation could occur,
25
25
to reduce the risk of excessive access leading to security incidents.
26
26
27
-
The good practices laid out here should be read in conjunction with the general [RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update).
27
+
The good practices laid out here should be read in conjunction with the general
Ideally, pods shouldn't be assigned service accounts that have been granted powerful permissions
95
+
(for example, any of the rights listed under [privilege escalation risks](#privilege-escalation-risks)).
94
96
In cases where a workload requires powerful permissions, consider the following practices:
97
+
95
98
- Limit the number of nodes running powerful pods. Ensure that any DaemonSets you run
96
99
are necessary and are run with least privilege to limit the blast radius of container escapes.
97
100
- Avoid running powerful pods alongside untrusted or publicly-exposed ones. Consider using
98
-
[Taints and Toleration](/docs/concepts/scheduling-eviction/taint-and-toleration/), [NodeAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity), or [PodAntiAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity) to ensure
99
-
pods don't run alongside untrusted or less-trusted Pods. Pay especial attention to
101
+
[Taints and Toleration](/docs/concepts/scheduling-eviction/taint-and-toleration/),
102
+
[NodeAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity), or
You can also use the deprecated [PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/) mechanism
222
+
You can also use the deprecated [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) mechanism
217
223
to restrict users' abilities to create privileged Pods (N.B. PodSecurityPolicy is scheduled for removal
218
224
in version 1.25).
219
225
-->
@@ -232,7 +238,9 @@ Secrets they would not have through RBAC directly.
232
238
<!--
233
239
### Persistent volume creation
234
240
235
-
As noted in the [PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems) documentation, access to create PersistentVolumes can allow for escalation of access to the underlying host. Where access to persistent storage is required trusted administrators should create
241
+
As noted in the [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/#volumes-and-file-systems)
242
+
documentation, access to create PersistentVolumes can allow for escalation of access to the underlying host.
243
+
Where access to persistent storage is required trusted administrators should create
236
244
PersistentVolumes, and constrained users should use PersistentVolumeClaims to access that storage.
237
245
-->
238
246
### 持久卷的创建 {#persistent-volume-creation}
@@ -246,7 +254,7 @@ PersistentVolumes, and constrained users should use PersistentVolumeClaims to ac
246
254
### Access to `proxy` subresource of Nodes
247
255
248
256
Users with access to the proxy sub-resource of node objects have rights to the Kubelet API,
249
-
which allows for command execution on every pod on the node(s) which they have rights to.
257
+
which allows for command execution on every pod on the node(s) to which they have rights.
250
258
This access bypasses audit logging and admission control, so care should be taken before
251
259
granting rights to this resource.
252
260
-->
@@ -259,8 +267,8 @@ granting rights to this resource.
259
267
<!--
260
268
### Escalate verb
261
269
262
-
Generally the RBAC system prevents users from creating clusterroles with more rights than
263
-
they possess. The exception to this is the `escalate` verb. As noted in the [RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update),
270
+
Generally, the RBAC system prevents users from creating clusterroles with more rights than the user possesses.
271
+
The exception to this is the `escalate` verb. As noted in the [RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update),
264
272
users with this right can effectively escalate their privileges.
265
273
-->
266
274
### esclate 动词 {#escalate-verb}
@@ -272,7 +280,7 @@ users with this right can effectively escalate their privileges.
272
280
<!--
273
281
### Bind verb
274
282
275
-
Similar to the `escalate` verb, granting users this right allows for bypass of Kubernetes
283
+
Similar to the `escalate` verb, granting users this right allows for the bypass of Kubernetes
276
284
in-built protections against privilege escalation, allowing users to create bindings to
277
285
roles with rights they do not already have.
278
286
-->
@@ -344,7 +352,8 @@ objects to create a denial of service condition either based on the size or numb
344
352
specifically relevant in multi-tenant clusters if semi-trusted or untrusted users
345
353
are allowed limited access to a system.
346
354
347
-
One option for mitigation of this issue would be to use [resource quotas](/docs/concepts/policy/resource-quotas/#object-count-quota)
355
+
One option for mitigation of this issue would be to use
0 commit comments