-
Notifications
You must be signed in to change notification settings - Fork 103
add container_ro_file_t to the podman artifact store #360
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
Conversation
Reviewer's Guide by SourceryThis pull request adds SELinux labeling for the podman artifact store, allowing containers to access files stored within. It modifies No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
@rhatdan @lsm5 PTAL But I have no idea about the selinux policy syntax so I have no idea if this is right here or something else is needed. |
LGTM |
LGTM. @Luap99 have you also verified your mount PR works with the rpms installed from the copr jobs here? |
Not yet which is why I opened it as draft, I will try it on my test VMs later. |
Ack. Once TMT tests are merged into podman, this should become easier with https://packit.dev/docs/configuration/upstream/tests#running-tests-with-builds-from-another-pull-request |
Ok one problem is that I used the wrong root path, but even then this doesn't work, with
How is selinux labelling supposed to work? My assumption was that this definition would cause all files to be created in mentioned paths to be labelled container_ro_file_t? I was able to force the label with restorecon but that of course should not be required. Is podman required to manually relabel all files all the time? |
Needs a change to container.if as well. Please retry with this diff:
@rhatdan PTAL too. |
@lsm5 Thanks, I will test again with the new rpm builds. For reference here is the podman PR to mount artifacts: containers/podman#25397 |
Ok this works both rootful and rootless now, thanks @lsm5 |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Luap99 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Could you provide more context on why the default SELinux policy prevents access to these files?
- It would be helpful to understand the specific security implications of labeling the entire artifact store.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, rhatdan 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 |
@Luap99 For some reason github will not allow me to merge without a rebase. |
The artifact store contains many blobs which we like to get mounted into the container. However by default selinux prevents access to these files. Now I could patch podman to change the label directly but it seems like much better to just label the entire artifact store correctly like we do with the image store. Signed-off-by: Paul Holzinger <[email protected]>
/cherrypick rhaos-maint |
@lsm5: new pull request created: #363 In response to this:
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. |
The artifact store contains many blobs which we like to get mounted into the container. However by default selinux prevents access to these files. Now I could patch podman to change the label directly but it seems like much better to just label the entire artifact store correctly like we do with the image store.
Summary by Sourcery
Add
container_ro_file_t
to the podman artifact store to allow containers to access the blobs, fixing selinux denial errors.