Skip to content

Commit

Permalink
PWX-32294 : Reconfigure SCC templates (#1132)
Browse files Browse the repository at this point in the history
* PWX-32294 : Reconfigure SCC templates

* set AllowPrivilegeEscalation to false for portworx-restricted scc
  • Loading branch information
nikita-bhatia committed Jul 13, 2023
1 parent 594afb4 commit faecc3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions drivers/storage/portworx/component/securitycontextconstraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ func (s *scc) getSCCs(cluster *opcorev1.StorageCluster) []ocp_secv1.SecurityCont
Name: PxSCCName,
},
AllowHostDirVolumePlugin: true,
AllowHostIPC: true,
AllowHostIPC: false,
AllowHostNetwork: true,
AllowHostPID: true,
AllowHostPorts: true,
AllowPrivilegeEscalation: boolPtr(true),
AllowHostPID: false,
AllowHostPorts: false,
AllowPrivilegeEscalation: boolPtr(false),
AllowPrivilegedContainer: true,
AllowedUnsafeSysctls: []string{"*"},
AllowedCapabilities: []corev1.Capability{
Expand Down Expand Up @@ -236,7 +236,7 @@ func (s *scc) getSCCs(cluster *opcorev1.StorageCluster) []ocp_secv1.SecurityCont
AllowHostNetwork: true,
AllowHostPID: false,
AllowHostPorts: false,
AllowPrivilegeEscalation: boolPtr(true),
AllowPrivilegeEscalation: boolPtr(false),
AllowPrivilegedContainer: false,
FSGroup: ocp_secv1.FSGroupStrategyOptions{
Type: ocp_secv1.FSGroupStrategyMustRunAs,
Expand Down
8 changes: 4 additions & 4 deletions drivers/storage/portworx/testspec/portworxSCC.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
allowHostDirVolumePlugin: true
allowHostIPC: true
allowHostIPC: false
allowHostNetwork: true
allowHostPID: true
allowHostPorts: true
allowPrivilegeEscalation: true
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: false
allowPrivilegedContainer: true
allowedCapabilities:
- '*'
Expand Down

0 comments on commit faecc3e

Please sign in to comment.