Uploaded image for project: 'OpenShift Monitoring'
  1. OpenShift Monitoring
  2. MON-2658

CMO e2e: some containers need securityContext.capabilities settings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Normal
    • None
    • None
    • None
    • None
    • False
    • None
    • False
    • NEW
    • NEW
    • Low
    • 0

    Description

      Our CMO e2e tests create several containers besides the standard CMO deployment. These pods do currently not set any security context capabilities. Currently this creates a warning like so:

      W0705 08:35:38.590283 15206 warnings.go:70] would violate PodSecurity "restricted:v1.24": allowPrivilegeEscalation != false (container "alertmanager-webhook-e2e-testutil" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "alertmanager-webhook-e2e-testutil" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "alertmanager-webhook-e2e-testutil" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "alertmanager-webhook-e2e-testutil" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

      We should be proactive and set security capability contraints. From this run this seems to impact the following pods/containers:

      • alertmanager-webhook-e2e-testutil
      • prometheus-example-app

      Both are used more then once.

      Relevant docs: https://docs.openshift.com/container-platform/4.10/authentication/managing-security-context-constraints.html#security-context-constraints-about_configuring-internal-oauth

      Attachments

        Activity

          People

            jrodrig@redhat.com Juan Rodriguez Hortala (Inactive)
            jfajersk@redhat.com Jan Fajerski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: