Skip to content

Commit d8132bc

Browse files
committed
Improve the RBAC policies section
- Change the heading to be more goal-oriented and add an anchor - Separate list items into 'component' and 'human' users - Add info about get access and third-party authorization mechanisms for finer control - Add caution for granting list access
1 parent 6ca919d commit d8132bc

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

content/en/docs/concepts/security/secrets-good-practices.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,24 @@ improve the security of confidential information in the cluster.
2727

2828
By default, Secret objects are stored unencrypted in {{<glossary_tooltip
2929
term_id="etcd" text="etcd">}}. You should configure encryption of your Secret
30-
data in `etcd`. For instructions, refer to [Encrypt Secret data at
31-
rest](/docs/tasks/administer-cluster/encrypt-data/).
32-
33-
### Configure RBAC policies for Secrets
34-
35-
When planning your {{<glossary_tooltip term_id="rbac" text="Role-based Access Control">}} [(RBAC)](/docs/reference/access-authn-authz/rbac/) policies,
36-
consider the following guidelines for `Secret` objects. You should also follow the other guidelines in [RBAC good practices](/docs/concepts/security/rbac-good-practices).
37-
38-
{{< caution >}}
39-
A user who can create a Pod that uses a Secret can also see the value of that Secret. Even
40-
if cluster policies do not allow a user to read the Secret directly, the same user could
41-
have access to run a Pod that then exposes the Secret.
42-
{{< /caution >}}
43-
44-
- Restrict `watch` or `list` access to only the most privileged, system-level
45-
components.
46-
- In the API server, objects (including Secrets) are persisted into
47-
{{< glossary_tooltip term_id="etcd" >}}; therefore:
48-
- Only allow cluster admistrators to access `etcd`. This includes read-only access.
30+
data in `etcd`. For instructions, refer to
31+
[Encrypt Secret Data at Rest](/docs/tasks/administer-cluster/encrypt-data/).
32+
33+
### Configure least-privilege access to Secrets {#least-privilege-secrets}
34+
35+
When planning your access control mechanism, such as Kubernetes
36+
{{<glossary_tooltip term_id="rbac" text="Role-based Access Control">}} [(RBAC)](/docs/reference/access-authn-authz/rbac/),
37+
consider the following guidelines for access to `Secret` objects. You should
38+
also follow the other guidelines in
39+
[RBAC good practices](/docs/concepts/security/rbac-good-practices).
40+
41+
- **Components**: Restrict `watch` or `list` access to only the most
42+
privileged, system-level components. Only grant `get` access for Secrets if
43+
the component's normal behavior requires it.
44+
- **Humans**: Restrict `get`, `watch`, or `list` access to Secrets. Only allow
45+
cluster admistrators to access `etcd`. This includes read-only access. For
46+
more complex access control, such as restricting access to Secrets with
47+
specific annotations, consider using third-party authorization mechanisms.
4948

5049
{{< caution >}}
5150
Granting `list` access to Secrets implicitly lets the subject fetch the

0 commit comments

Comments
 (0)