# an available choice for the specs control
name:
  SecurityContextConstraints
description:
  restricted scc
multiselect:
  specs
replacements: # if user select this choice, the template variable names and values to use
  standards: |
    NIST-CSF
  categories: |
    PR.PT Protective Technology
  controls: |
    PR.PT-3 Least Functionality
  policyTemplates: |
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: {{name}}-sample-restricted-scc
        spec:
          remediationAction: inform # will be overridden by remediationAction in parent policy
          severity: high
          namespaceSelector:
            exclude: ["kube-*"]
            include: ["default"]
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: security.openshift.io/v1
                kind: SecurityContextConstraints # restricted scc
                metadata:
                  annotations:
                    kubernetes.io/description: restricted 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.
                  name: sample-restricted-scc
                allowHostDirVolumePlugin: false
                allowHostIPC: false
                allowHostNetwork: false
                allowHostPID: false
                allowHostPorts: false
                allowPrivilegeEscalation: true
                allowPrivilegedContainer: false
                allowedCapabilities: []
                defaultAddCapabilities: []
                fsGroup:
                  type: MustRunAs
                groups:
                - system:authenticated
                priority: 10
                readOnlyRootFilesystem: false
                requiredDropCapabilities:
                - KILL
                - MKNOD
                - SETUID
                - SETGID
                runAsUser:
                  type: MustRunAsRange
                seLinuxContext:
                  type: MustRunAs
                supplementalGroups:
                  type: RunAsAny
                users: []
                volumes:
                - configMap
                - downwardAPI
                - emptyDir
                - persistentVolumeClaim
                - projected
                - secret