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

selinux: Allow using other container-selinux policy templates than container #1495

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Feb 22, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

The container-selinux package (at least on RHEL/Fedora) ships a number
of policy templates. One of them is called simply container is special
in the sense that using it also creates a type process, the
others do not.

The effect is that if the other templates such as net_container should
be used, the CIL policy must also include the raw container type.

This patch amends the generation of the CIL policy from the SPO-specific
format so that the container type is always used.

Which issue(s) this PR fixes:

None

Does this PR have test?

Yes

Special notes for your reviewer:

N/A

Does this PR introduce a user-facing change?

Fixed a bug where SELinux policies inheriting from another template than container
would not load correctly.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 22, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2023
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/hold

for @JAORMX eyes on this one

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 22, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #1495 (8f0c951) into main (585bbb0) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1495      +/-   ##
==========================================
+ Coverage   43.98%   44.06%   +0.07%     
==========================================
  Files          50       50              
  Lines        5716     5724       +8     
==========================================
+ Hits         2514     2522       +8     
  Misses       3081     3081              
  Partials      121      121              

…ntainer

The container-selinux package (at least on RHEL/Fedora) ships a number
of policy templates. One of them is called simply `container` is special
in the sense that using it also creates a `type process`, the
others do not.

The effect is that if the other templates such as `net_container` should
be used, the CIL policy must also include the raw container type.

This patch amends the generation of the CIL policy from the SPO-specific
format so that the `container` type is always used.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2023
@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 22, 2023

New patch version attempts to resolve the verify failure

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 22, 2023
@saschagrunert
Copy link
Member

Looks like we're hitting the rate limiter more often:

Github rate-limiter failed the request. Either authenticate or wait a couple of minutes.

@saschagrunert
Copy link
Member

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 23, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JAORMX, jhrozek, saschagrunert

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:
  • OWNERS [JAORMX,jhrozek,saschagrunert]

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

@k8s-ci-robot k8s-ci-robot merged commit ff004a2 into kubernetes-sigs:main Feb 23, 2023
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants