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

Fixes #37999 - allow smart-proxy with PuppetCA to read some etc files #168

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

PopiBrossard
Copy link

Dear maintainer,

The current foreman-proxy SELinux policy isn't working when trying to use the PuppetCA feature. The proxy tries to read some files in /etc/foreman-proxy but is not allowed:

type=AVC msg=audit(1721979897.417:100790): avc:  denied  { read } for  pid=731469 comm="smart-proxy" name="puppetca_hostname_whitelisting.yml" dev="dm-0" ino=33791767 scontext=system_u:system_r:foreman_proxy_t:s0 tcontext=system_u:object_r:hostname_etc_t:s0 tclass=file permissive=1
type=AVC msg=audit(1721979897.417:100790): avc:  denied  { open } for  pid=731469 comm="smart-proxy" path="/etc/foreman-proxy/settings.d/puppetca_hostname_whitelisting.yml" dev="dm-0" ino=33791767 scontext=system_u:system_r:foreman_proxy_t:s0 tcontext=system_u:object_r:hostname_etc_t:s0 tclass=file permissive=1
type=AVC msg=audit(1721979897.417:100791): avc:  denied  { ioctl } for  pid=731469 comm="smart-proxy" path="/etc/foreman-proxy/settings.d/puppetca_hostname_whitelisting.yml" dev="dm-0" ino=33791767 ioctlcmd=0x5401 scontext=system_u:system_r:foreman_proxy_t:s0 tcontext=system_u:object_r:hostname_etc_t:s0 tclass=file permissive=1
type=AVC msg=audit(1721979897.417:100792): avc:  denied  { getattr } for  pid=731469 comm="smart-proxy" path="/etc/foreman-proxy/settings.d/puppetca_hostname_whitelisting.yml" dev="dm-0" ino=33791767 scontext=system_u:system_r:foreman_proxy_t:s0 tcontext=system_u:object_r:hostname_etc_t:s0 tclass=file permissive=1

To make this work, I've created a new file type foreman_proxy_etc_t and added the minimum privileges.

Regards

@ekohl
Copy link
Member

ekohl commented Jul 26, 2024

Technically we never finished the Foreman Proxy policy, so it doesn't surprise me it's broken. I'd be happy to merge improvements though

@PopiBrossard
Copy link
Author

Dear maintainer,
Should I do anything to permit this merge request ?
Thanks,

@ekohl
Copy link
Member

ekohl commented Nov 1, 2024

Sorry, I should have explained that before in my comment. Could you open a Redmine issue on https://projects.theforeman.org/projects/selinux and link it here? We mostly use it to generate correct release notes.

@PopiBrossard
Copy link
Author

PopiBrossard commented Nov 8, 2024

I've created an issue as requested. The redmine issue is https://projects.theforeman.org/issues/37999

@PopiBrossard PopiBrossard changed the title allow smart-proxy with PuppetCA to read some etc files Fixes #37999 - allow smart-proxy with PuppetCA to read some etc files Nov 8, 2024
@ekohl
Copy link
Member

ekohl commented Nov 12, 2024

Thanks for that. The check looks at the git commit, not the PR title. If you can amend your commit to update the title then I expect the Redmine issues check to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants