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

OCPBUGS-43316: Enforce privileged PSA by default #4834

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

Evan-Reilly
Copy link
Contributor

@Evan-Reilly Evan-Reilly commented Oct 1, 2024

What this PR does / why we need it:
OpenShiftPodSecurityAdmission feature gate is not enabled by default in 4.17 any longer. Therefore, to ensure namespace security is not enforcing restricted by default any longer, this PR is required to properly enforce privileged PSA by default.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes https://issues.redhat.com/browse/OCPBUGS-43316

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci openshift-ci bot requested review from enxebre and sjenning October 1, 2024 14:53
@openshift-ci openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. and removed do-not-merge/needs-area labels Oct 1, 2024
Copy link
Contributor

openshift-ci bot commented Oct 1, 2024

Hi @Evan-Reilly. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rtheis
Copy link
Contributor

rtheis commented Oct 1, 2024

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 1, 2024
Copy link
Contributor

@rtheis rtheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Evan-Reilly please take a look at the failures

Copy link
Contributor

@rtheis rtheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2024
Copy link
Contributor

@rtheis rtheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed lgtm Indicates that a PR is ready to be merged. labels Oct 1, 2024
@Evan-Reilly Evan-Reilly force-pushed the fix-psa-4.17 branch 4 times, most recently from 91cf662 to 9cc94ab Compare October 2, 2024 17:29
@rtheis
Copy link
Contributor

rtheis commented Oct 3, 2024

/remove-hold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2024
@rtheis
Copy link
Contributor

rtheis commented Oct 3, 2024

@Evan-Reilly please fix the following test:

{Failed  === RUN   TestCreateClusterRequestServingIsolation/Main/EnsurePSANotPrivileged
    util.go:667: pod admitted when rejection was expected
    util.go:670: forbidden error expected, got %!s(<nil>)
        --- FAIL: TestCreateClusterRequestServingIsolation/Main/EnsurePSANotPrivileged (0.16s)
}

@openshift-ci openshift-ci bot added the area/testing Indicates the PR includes changes for e2e testing label Oct 3, 2024
@rtheis
Copy link
Contributor

rtheis commented Oct 4, 2024

/test verify

@@ -129,7 +129,6 @@ func TestCreateClusterRequestServingIsolation(t *testing.T) {

e2eutil.NewHypershiftTest(t, ctx, func(t *testing.T, g Gomega, mgtClient crclient.Client, hostedCluster *hyperv1.HostedCluster) {
guestClient := e2eutil.WaitForGuestClient(t, testContext, mgtClient, hostedCluster)
e2eutil.EnsurePSANotPrivileged(t, ctx, guestClient)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our slack discussion, I think you need to first remove the test in a separate PR in order for PR testing to pass on this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#4855 will hopefully resolve this.

@rtheis
Copy link
Contributor

rtheis commented Oct 16, 2024

/jira refresh

@openshift-ci-robot
Copy link

@rtheis: This pull request references Jira Issue OCPBUGS-43316, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-43316 to depend on a bug targeting a version in 4.18.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rvanderp3
Copy link

/jira refresh

@openshift-ci-robot
Copy link

@rvanderp3: This pull request references Jira Issue OCPBUGS-43316, which is invalid:

  • expected Jira Issue OCPBUGS-43316 to depend on a bug targeting a version in 4.18.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rvanderp3
Copy link

/jira refresh

@openshift-ci-robot
Copy link

@rvanderp3: This pull request references Jira Issue OCPBUGS-43316, which is invalid:

  • expected the bug to target either version "4.17." or "openshift-4.17.", but it targets "4.18.0" instead
  • expected Jira Issue OCPBUGS-43316 to depend on a bug targeting a version in 4.18.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rvanderp3
Copy link

/jira refresh

@openshift-ci-robot
Copy link

@rvanderp3: This pull request references Jira Issue OCPBUGS-43316, which is invalid:

  • expected Jira Issue OCPBUGS-43316 to depend on a bug targeting a version in 4.18.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sjenning sjenning added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Oct 16, 2024
@sjenning
Copy link
Contributor

/approve

@sjenning
Copy link
Contributor

/hold

on review from hyperhift team. didn't really no one from our side had looked yet.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2024
Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Evan-Reilly, rtheis, sjenning

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 16, 2024
Update the openshift-api module to get updated feature flags
OpenShiftPodSecurityAdmission feature gate is not enabled by default in 4.17 any longer. Therefore, to ensure namespace security is not enforcing restricted by default any longer, this PR is required to properly enforce privileged PSA by default.
@sjenning
Copy link
Contributor

/lgtm
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 16, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 4785464 and 2 for PR HEAD d96393d in total

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@Evan-Reilly: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 93ca4ee into openshift:release-4.17 Oct 16, 2024
10 checks passed
@openshift-ci-robot
Copy link

@Evan-Reilly: Jira Issue OCPBUGS-43316: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-43316 has been moved to the MODIFIED state.

In response to this:

What this PR does / why we need it:
OpenShiftPodSecurityAdmission feature gate is not enabled by default in 4.17 any longer. Therefore, to ensure namespace security is not enforcing restricted by default any longer, this PR is required to properly enforce privileged PSA by default.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes https://issues.redhat.com/browse/OCPBUGS-43316

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: hypershift
This PR has been included in build ose-hypershift-container-v4.17.0-202410162336.p0.g93ca4ee.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/testing Indicates the PR includes changes for e2e testing jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants