Project

Profile

Help

Issue #2206

closed

SELinux denials when puppet distributor writing to Puppet 4 AIO directories

Added by stbenjam over 7 years ago. Updated over 3 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.9.1
Platform Release:
OS:
CentOS 7
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

In Puppet 4, the module directories have moved to /etc/puppetlabs/code/environments and these directories are not handled by selinux-policy-targeted like Puppet 3 is, so they have the default context etc_t.

When Katello goes to publish a puppet environment, we get selinux denails:

type=AVC msg=audit(1472066646.325:1365): avc: denied { write } for pid=28236 comm="celery" name="environments" dev="vda3" ino=268419 scontext=system_u:system_r:celery_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir

Because the pulp-selinux policty only allows celery_t access to etc_puppet_t.

I'm not sure if the right approach is to update the pulp policy to allow access to etc_t or get Red Hat to update selinux-policy-targeted for puppet 4 aio.

Actions #1

Updated by stbenjam over 7 years ago

I filed a bugzilla against the selinux targeted policy: https://bugzilla.redhat.com/show_bug.cgi?id=1369938

Actions #2

Updated by bmbouter over 7 years ago

We should not allow celery_t to write to etc_t. I recommend relabeling the directory Pulp is installing puppet modules into to have the expected etc_puppet_t label. Filing the bug against the selinux targeted policy sounds like the best way to have that happen when the directory is a typical location for Puppet 4 AIO. The label could be applied in another policy (not pulp) as a near-term workaround.

FYI, you will also need to enable the puppet_manage_puppet selinux boolean[0] provided by the pulp SELinux policy.

I won't be here at triage, but I recommend closing as notabug.

[0]: http://docs.pulpproject.org/plugins/pulp_puppet/tech-reference/plugin_conf.html?highlight=pulp_manage_puppet#install-distributor

Actions #3

Updated by amacdona@redhat.com over 7 years ago

  • Status changed from NEW to CLOSED - NOTABUG
Actions #4

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF