Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-7067

scc validation is failing due to seccomp profile configuration at the deployment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 4.8.z
    • apiserver-auth
    • Important
    • None
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:
      Deployment that specify seccomp profile at security context level is not able to identify the correct scc, even if it's created.

      Version-Release number of selected component (if applicable):
      4.8.x, 4.10.x

      How reproducible:
      Steps to Reproduce:

      -  create a scc with the required capabilities
      -  create the sa
      -  role binding the sa with the scc
      -  create the deployment
      
      Required Security Capabilities are:
      ~~~
      serviceAccountName: hellosa
      securityContext:
      allowPrivilegeEscalation: false
      capabilities:
         drop:
            ALL
      privileged: false
      readOnlyRootFilesystem: false
      runAsNonRoot: true
      seccompProfile:
         type: RuntimeDefault
      ~~~
      

      Actual results:
      Error even reported :

      Error creating: pods "hello-6967cf9864-h4kc8" is forbidden: unable to validate against any security context constraint: [pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod: *Forbidden: seccomp may not be set pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/ubi-minimal*: Forbidden: seccomp may not be set provider "anyuid": Forbidden: not usable by user or serviceaccount pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod: Forbidden: seccomp may not be set pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/ubi-minimal: Forbidden: seccomp may not be set provider "nonroot": Forbidden: not usable by user or serviceaccount provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount provider "hostnetwork": Forbidden: not usable by user or serviceaccount provider "hostaccess": Forbidden: not usable by user or serviceaccount provider "node-exporter": Forbidden: not usable by user or serviceaccount provider "privileged": Forbidden: not usable by user or serviceaccount]

      Expected results:

      Correct deploy of the workload 
      

      Additional info:

      Bug has been opened to verify the correct way to configure the scc for this kind of workload 
      

              slaznick@redhat.com Stanislav Láznička (Inactive)
              rhn-support-pescorza Pamela Lizeth Escorza Gil
              Xingxing Xia Xingxing Xia
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: