Skip to content

Commit 769f036

Browse files
author
Christopher Tauchen
authored
Merge pull request #39717 from darshan-nagaraj/BZ2023838
BZ2023838: Adds better explanation of SCCs
2 parents 584b279 + f189fe5 commit 769f036

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

modules/security-context-constraints-about.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Similar to the way that RBAC resources control user access, administrators can u
1010

1111
Security context constraints allow an administrator to control:
1212

13-
* Whether a pod can run privileged containers
13+
* Whether a pod can run privileged containers with the `allowPrivilegedContainer` flag.
14+
* Whether a pod is constrained with the `allowPrivilegeEscalation` flag.
1415
* The capabilities that a container can request
1516
* The use of host directories as volumes
1617
* The SELinux context of the container
@@ -55,7 +56,7 @@ ifndef::openshift-dedicated[]
5556

5657
[WARNING]
5758
====
58-
This SCC allows host access to namespaces, file systems, and PIDS. It should only be used by trusted pods. Grant with caution.
59+
This SCC allows host access to namespaces, file systems, and PIDs. It should only be used by trusted pods. Grant with caution.
5960
====
6061

6162
|`hostmount-anyuid`
@@ -110,12 +111,12 @@ The `privileged` SCC allows:
110111

111112
[NOTE]
112113
====
113-
Setting `privileged: true` in the pod specification does not select the `privileged` SCC. Setting `privileged: true` in the pod specification matches on the `allowPrivilegedContainer` field of an SCC.
114+
Setting `privileged: true` in the pod specification does not necessarily select the `privileged` SCC. The SCC that has `allowPrivilegedContainer: true` and has the highest prioritization will be chosen if the user has the permissions to use it.
114115
====
115116
endif::[]
116117

117118
|`restricted`
118-
|Denies access to all host features and requires pods to be run with a UID, and SELinux context that are allocated to the namespace. This is the most restrictive SCC and it is used by default for authenticated users.
119+
|Denies access to all host features and requires pods to be run with a UID, and SELinux context that are allocated to the namespace. This is the most restrictive SCC provided by a new installation and will be used by default for authenticated users.
119120

120121
The `restricted` SCC:
121122

@@ -125,6 +126,12 @@ The `restricted` SCC:
125126
* Requires that a pod is run with a pre-allocated MCS label
126127
* Allows pods to use any FSGroup
127128
* Allows pods to use any supplemental group
129+
130+
[NOTE]
131+
====
132+
The restricted SCC is the most restrictive of the SCCs that ship by default with the system. However, you can create a custom SCC that is even more restrictive. For example, you can create an SCC that restricts `readOnlyRootFS` to `true` and `allowPrivilegeEscalation` to `false`.
133+
====
134+
128135
|===
129136

130137
[id="scc-settings_{context}"]
@@ -171,7 +178,7 @@ The containers use the capabilities from this default list, but pod manifest aut
171178

172179
[NOTE]
173180
====
174-
You can drop all capabilites from containers by setting the `requiredDropCapabilities` parameter to `ALL`.
181+
You can drop all capabilites from containers by setting the `requiredDropCapabilities` parameter to `ALL`.
175182
====
176183

177184
[id="authorization-SCC-strategies_{context}"]

0 commit comments

Comments
 (0)