Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set SCC allowPrivilegeEscalation to true when container build enabled #1596

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

amisevsk
Copy link
Contributor

What does this PR do?

Sets allowPrivilegeEscalation: true in the pod security context when DisableContainerBuildCapabilities is false. This was incorrectly set to false in https://github.com/eclipse-che/che-operator/pull/1576, as the container-buildSCC containsallowPrivilegeEscalation: true`.

What issues does this PR fix or reference?

Closes eclipse-che/che#21927

How to test this PR?

  1. Start a workspace
  2. Open terminal and test that podman images succeeds (potentially with warnings) and prints an empty list of images rather than an error.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Running Podman inside a container in OpenShift requires the pod to have
allowPrivilegeEscalation: true in its security context.

Signed-off-by: Angel Misevski <[email protected]>
@amisevsk
Copy link
Contributor Author

Once merged, likely needs a backport to 7.59.x

Signed-off-by: Angel Misevski <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm label Jan 10, 2023
@amisevsk
Copy link
Contributor Author

/test v11-devworkspace-happy-path

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #1596 (ce85af2) into main (c0e1de8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1596   +/-   ##
=======================================
  Coverage   58.95%   58.95%           
=======================================
  Files          73       73           
  Lines        8614     8614           
=======================================
  Hits         5078     5078           
  Misses       3190     3190           
  Partials      346      346           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@openshift-ci
Copy link

openshift-ci bot commented Jan 11, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amisevsk, ibuziuk, tolusha

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@amisevsk amisevsk merged commit 3d07ff7 into eclipse-che:main Jan 11, 2023
@amisevsk amisevsk deleted the fix-pod-security-context branch January 11, 2023 15:39
@devstudio-release
Copy link

Build 3.5 :: operator_3.x/170: Console, Changes, Git Data

amisevsk added a commit to amisevsk/che-operator that referenced this pull request Jan 11, 2023
…eclipse-che#1596)

* Set SCC allowPrivilegeEscalation to true when container build enabled

Running Podman inside a container in OpenShift requires the pod to have
allowPrivilegeEscalation: true in its security context.

* Fix tests

Signed-off-by: Angel Misevski <[email protected]>
@devstudio-release
Copy link

@devstudio-release
Copy link

@amisevsk amisevsk mentioned this pull request Jan 11, 2023
10 tasks
@che-bot che-bot added this to the 7.60 milestone Jan 11, 2023
@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.5 :: push-latest-container-to-quay_3.x/1513: SUCCESS

Copied: devspaces-rhel8-operator; /job/DS_CI/job/update-digests_3.x triggered;
/job/DS_CI/job/Releng/job/copyIIBsToQuay triggered for OCP v4.12 v4.11 v4.10

@devstudio-release
Copy link

Build 3.5 :: update-digests_3.x/1841: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.5 :: copyIIBsToQuay/653: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.5 :: sync-to-downstream_3.x/1965: SUCCESS

Build container: devspaces-operator synced; /DS_CI/get-sources-rhpkg-container-build_3.x/1895 triggered;

@devstudio-release
Copy link

Build 3.5 :: operator_3.x/170: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/1965 triggered

@devstudio-release
Copy link

Build 3.5 :: operator-bundle_3.x/764: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.5 :: copyIIBsToQuay/654: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.5 :: push-latest-container-to-quay_3.x/1514: SUCCESS

Copied: devspaces-operator-bundle; bundle-generated updated;
/job/DS_CI/job/Releng/job/copyIIBsToQuay triggered for OCP v4.12 v4.11 v4.10

@devstudio-release
Copy link

Build 3.5 :: sync-to-downstream_3.x/1966: SUCCESS

Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/1896 triggered; /job/DS_CI/job/dsc_3.x triggered;

@devstudio-release
Copy link

Build 3.5 :: operator-bundle_3.x/764: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/1966 triggered

@devstudio-release
Copy link

Build 3.5 :: dsc_3.x/559: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.5 :: update-digests_3.x/1841: SUCCESS

Detected new images: rebuild operator-bundle
* dashboard
* devspaces-operator; /DS_CI/operator-bundle_3.x/764 triggered

@devstudio-release
Copy link

Build 3.5 :: dsc_3.x/559: SUCCESS

3.5.0 CI

@devstudio-release
Copy link

Build 3.5 :: copyIIBsToQuay/654: SUCCESS

arches = x86_64, s390x, ppc64le;
  * LATEST DS OPERATOR BUNDLE = <a href=https://quay.io/repository/devspaces/devspaces-operator-bundle?tab=tags>registry-proxy.engineering.redhat.com/rh-osbs/devspaces-operator-bundle:3.5-58
  * LATEST DWO OPERATOR BUNDLE = <a href=https://quay.io/repository/devworkspace/devworkspace-operator-bundle?tab=tags>registry-proxy.engineering.redhat.com/rh-osbs/devworkspace-operator-bundle:0.18-2
+ x86_64-rhel8 IIB(s) copied:
  + quay.io/devspaces/iib:3.5-v4.12-411504-410106-x86_64
  + quay.io/devspaces/iib:3.5-v4.11-411648-410097-x86_64
  + quay.io/devspaces/iib:3.5-v4.11-x86_64
  + quay.io/devspaces/iib:next-v4.11-x86_64
  + quay.io/devspaces/iib:3.5-v4.10-411645-410093-x86_64
  + quay.io/devspaces/iib:3.5-v4.10-x86_64
  + quay.io/devspaces/iib:next-v4.10-x86_64
+ ppc64le-rhel8 IIB(s) copied:
  + quay.io/devspaces/iib:3.5-v4.12-411651-410106-ppc64le
  + quay.io/devspaces/iib:3.5-v4.12-ppc64le
  + quay.io/devspaces/iib:next-v4.12-ppc64le
  + quay.io/devspaces/iib:3.5-v4.11-411648-410097-ppc64le
  + quay.io/devspaces/iib:3.5-v4.11-ppc64le
  + quay.io/devspaces/iib:next-v4.11-ppc64le
  + quay.io/devspaces/iib:3.5-v4.10-411645-410093-ppc64le
  + quay.io/devspaces/iib:3.5-v4.10-ppc64le
  + quay.io/devspaces/iib:next-v4.10-ppc64le
+ s390x-rhel8 IIB(s) copied:
  + quay.io/devspaces/iib:3.5-v4.12-411651-410106-s390x
  + quay.io/devspaces/iib:3.5-v4.12-s390x
  + quay.io/devspaces/iib:next-v4.12-s390x
  + quay.io/devspaces/iib:3.5-v4.11-411648-410097-s390x
  + quay.io/devspaces/iib:3.5-v4.11-s390x
  + quay.io/devspaces/iib:next-v4.11-s390x
  + quay.io/devspaces/iib:3.5-v4.10-411645-410093-s390x
  + quay.io/devspaces/iib:3.5-v4.10-s390x
  + quay.io/devspaces/iib:next-v4.10-s390x

AObuchow pushed a commit to AObuchow/che-operator that referenced this pull request Jan 26, 2023
…eclipse-che#1596)

* Set SCC allowPrivilegeEscalation to true when container build enabled

Running Podman inside a container in OpenShift requires the pod to have
allowPrivilegeEscalation: true in its security context.

* Fix tests

Signed-off-by: Angel Misevski <[email protected]>
AObuchow pushed a commit to AObuchow/che-operator that referenced this pull request Jan 26, 2023
…eclipse-che#1596)

* Set SCC allowPrivilegeEscalation to true when container build enabled

Running Podman inside a container in OpenShift requires the pod to have
allowPrivilegeEscalation: true in its security context.

* Fix tests

Signed-off-by: Angel Misevski <[email protected]>
nickboldt pushed a commit that referenced this pull request Jan 30, 2023
* feat: configure workspace security context for container builds

Fix eclipse-che/che#21770

Signed-off-by: Andrew Obuchowicz <[email protected]>

* Set SCC allowPrivilegeEscalation to true when container build enabled (#1596)

* Set SCC allowPrivilegeEscalation to true when container build enabled

Running Podman inside a container in OpenShift requires the pod to have
allowPrivilegeEscalation: true in its security context.

* Fix tests

Signed-off-by: Angel Misevski <[email protected]>

* fix: set scc priority to null

Signed-off-by: Anatolii Bazko <[email protected]>

---------

Signed-off-by: Andrew Obuchowicz <[email protected]>
Signed-off-by: Angel Misevski <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Co-authored-by: Angel Misevski <[email protected]>
Co-authored-by: Anatolii Bazko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Container build support doesn't work after upgrade from 7.58.0 to 7.59.0
5 participants