Skip to content

Commit f460dc8

Browse files
committed
scc: add restricted-v3
Signed-off-by: Peter Hunt <[email protected]>
1 parent 8ecdca3 commit f460dc8

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
annotations:
5+
include.release.openshift.io/ibm-cloud-managed: "true"
6+
include.release.openshift.io/self-managed-high-availability: "true"
7+
include.release.openshift.io/single-node-developer: "true"
8+
rbac.authorization.kubernetes.io/autoupdate: "true"
9+
name: system:openshift:scc:restricted-v3
10+
rules:
11+
- apiGroups:
12+
- security.openshift.io
13+
resourceNames:
14+
- restricted-v3
15+
resources:
16+
- securitycontextconstraints
17+
verbs:
18+
- use
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
allowHostDirVolumePlugin: false
2+
allowHostIPC: false
3+
allowHostNetwork: false
4+
allowHostPID: false
5+
allowHostPorts: false
6+
allowPrivilegeEscalation: false
7+
allowPrivilegedContainer: false
8+
allowedCapabilities:
9+
- NET_BIND_SERVICE
10+
apiVersion: security.openshift.io/v1
11+
defaultAddCapabilities:
12+
fsGroup:
13+
type: MustRunAs
14+
ranges:
15+
- min: 1000
16+
max: 65534
17+
groups: []
18+
kind: SecurityContextConstraints
19+
metadata:
20+
annotations:
21+
include.release.openshift.io/ibm-cloud-managed: "true"
22+
include.release.openshift.io/self-managed-high-availability: "true"
23+
include.release.openshift.io/single-node-developer: "true"
24+
kubernetes.io/description: restricted-v3 denies access to all host features and requires
25+
pods to be run with user namespace (and may not be root within that user namespace),
26+
and SELinux context that are allocated to the namespace. This is the most restrictive SCC.
27+
On top of the legacy 'restricted' SCC, it also requires to drop ALL capabilities
28+
and does not allow privilege escalation binaries. It will also default the seccomp
29+
profile to runtime/default if unset, otherwise this seccomp profile is required.
30+
On top of the legacy 'restricted-v2' SCC, it requires a pod runs in a user namespace.
31+
Because of this, the pod to be any non-root UID within the user namespace (between 1000-65534), and
32+
it will still be unprivileged outside of the user namespace.
33+
name: restricted-v3
34+
priority:
35+
readOnlyRootFilesystem: false
36+
requiredDropCapabilities:
37+
- ALL
38+
runAsUser:
39+
type: MustRunAsRange
40+
ranges:
41+
- min: 1000
42+
max: 65534
43+
seLinuxContext:
44+
type: MustRunAs
45+
seccompProfiles:
46+
- runtime/default
47+
supplementalGroups:
48+
type: MustRunAs
49+
ranges:
50+
- min: 1000
51+
max: 65534
52+
users: []
53+
userNamespaceLevel: RequirePodLevel
54+
volumes:
55+
- configMap
56+
- csi
57+
- downwardAPI
58+
- emptyDir
59+
- ephemeral
60+
- persistentVolumeClaim
61+
- projected
62+
- secret

0 commit comments

Comments
 (0)