Skip to content

Commit 780dae2

Browse files
RichardoCTim BannisterVJftw
authored
Clarified scenarios that could lead to privilege escalation (#29378)
* Clarified scenarios that could lead to privilege escalation Made it clearer that it's not just creating pods which enables the privilege escalation. It's all workloads, all reconfiguration of workloads, and conceptually the creation and reconfiguration of custom resources which create workloads. * Allowing link to priv escalation heading if required * Update content/en/docs/reference/access-authn-authz/authorization.md Co-authored-by: Tim Bannister <[email protected]> * Adding further clarifications * Retitled escalation section * Apply suggestions from vjftw Co-authored-by: VJ Patel <[email protected]> * Clarified CRDs and reduced duplication * Updating caution based on Geoffrey's comments * Updating controller comment and linking out to reference docs Co-authored-by: Tim Bannister <[email protected]> Co-authored-by: VJ Patel <[email protected]>
1 parent bb55a9e commit 780dae2

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

content/en/docs/reference/access-authn-authz/authorization.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,33 @@ The following flags can be used:
192192
You can choose more than one authorization module. Modules are checked in order
193193
so an earlier module has higher priority to allow or deny a request.
194194

195-
## Privilege escalation via pod creation
195+
## Privilege escalation via workload creation or edits {#privilege-escalation-via-pod-creation}
196196

197-
Users who have the ability to create pods in a namespace can potentially
198-
escalate their privileges within that namespace. They can create pods that
199-
access their privileges within that namespace. They can create pods that access
200-
secrets the user cannot themselves read, or that run under a service account
201-
with different/greater permissions.
197+
Users who can create/edit pods in a namespace, either directly or through a [controller](/docs/concepts/architecture/controller/)
198+
such as an operator, could escalate their privileges in that namespace.
202199

203200
{{< caution >}}
204-
System administrators, use care when granting access to pod creation. A user
205-
granted permission to create pods (or controllers that create pods) in the
206-
namespace can: read all secrets in the namespace; read all config maps in the
207-
namespace; and impersonate any service account in the namespace and take any
208-
action the account could take. This applies regardless of authorization mode.
201+
System administrators, use care when granting access to create or edit workloads.
202+
Details of how these can be misused are documented in [escalation paths](/docs/reference/access-authn-authz/authorization/#escalation-paths)
209203
{{< /caution >}}
210204

205+
### Escalation paths {#escalation-paths}
206+
- Mounting arbitrary secrets in that namespace
207+
- Can be used to access secrets meant for other workloads
208+
- Can be used to obtain a more privileged service account's service account token
209+
- Using arbitrary Service Accounts in that namespace
210+
- Can perform Kubernetes API actions as another workload (impersonation)
211+
- Can perform any privileged actions that Service Account has
212+
- Mounting configmaps meant for other workloads in that namespace
213+
- Can be used to obtain information meant for other workloads, such as DB host names.
214+
- Mounting volumes meant for other workloads in that namespace
215+
- Can be used to obtain information meant for other workloads, and change it.
216+
217+
{{< caution >}}
218+
System administrators should be cautious when deploying CRDs that
219+
change the above areas. These may open privilege escalations paths.
220+
This should be considered when deciding on your RBAC controls.
221+
{{< /caution >}}
211222

212223
## {{% heading "whatsnext" %}}
213224

0 commit comments

Comments
 (0)