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

[podsecurity] Dedupe overlapping forbidden messages #107117

Conversation

calvin0327
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Dedupe overlapping forbidden messages.

Which issue(s) this PR fixes:

Fixes #106129

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 18, 2021
@k8s-ci-robot
Copy link
Contributor

@calvin0327: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 18, 2021
@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 18, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: calvin0327
To complete the pull request process, please assign liggitt after the PR has been reviewed.
You can assign the PR to them by writing /assign @liggitt in a comment when ready.

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

@calvin0327
Copy link
Contributor Author

I have thought for a long time and added varible overlap in the struct of check. I think if we have more levels in the future, it will be easier to face these situations.

@calvin0327
Copy link
Contributor Author

@liggitt Please correct me if I'm wrong.

@calvin0327 calvin0327 changed the title [podsecurity]: Dedupe overlapping forbidden messages [podsecurity] Dedupe overlapping forbidden messages Dec 18, 2021
@calvin0327
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 18, 2021
@calvin0327
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@calvin0327: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-integration 003effe link true /test pull-kubernetes-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@enj enj added this to Needs Triage in SIG Auth Old Jan 3, 2022
@@ -69,6 +70,9 @@ func (r *checkRegistry) EvaluatePod(lv api.LevelVersion, podMetadata *metav1.Obj
results = append(results, check(podMetadata, podSpec))
}
if lv.Level == api.LevelBaseline {
for _, check := range r.overlappingBaselineChecks[lv.Version] {
Copy link
Member

Choose a reason for hiding this comment

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

marking checks as overlapping and skipping them without positive verification that the specific check they overlap with is also getting run makes me slightly nervous

the integration test failures are related, and make it seem like some expected checks aren't getting run

@tallclair
Copy link
Member

@calvin0327 thank you for looking into this. After giving it some more thought, I'd like to propose an alternative approach, which is implemented in #107698. That proposes a larger change, but has stronger guarantees that the overridden checks are only skipped when the overriding check is present. It also allows for versioned overrides, in case a baseline check predates an overriding restricted check.

@tallclair tallclair closed this Jan 22, 2022
@tallclair tallclair removed this from In Review in SIG-Auth: PodSecurity Jan 22, 2022
@calvin0327
Copy link
Contributor Author

@tallclair👌,I think this implementation #107698 is great.

@ritazh ritazh removed this from Needs Triage in SIG Auth Old Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PodSecurity] Dedupe overlapping forbidden messages
4 participants