Bug 1111567 - Puppet master on separate host with selinux doesn't work properly
Summary: Puppet master on separate host with selinux doesn't work properly
Keywords:
Status: CLOSED DUPLICATE of bug 1127284
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-20 11:34 UTC by Ivan Necas
Modified: 2014-08-27 13:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-27 13:56:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ivan Necas 2014-06-20 11:34:31 UTC
Description of problem:
In enforcing mode, the puppet installed by capsule-installer is not
working properly, returning:

   The requested method PUT is not allowed for the URL /production/report</p>

when running `puppet agent --test` on the very same system

Works fine in permissive mode

Steps to Reproduce:
1. install capsule with puppet/puppetca feature on separate masine in enforcing mode
2. run `puppet agent --test`

Actual results:
Error messages

Expected results:
No error messages about PUT not being allowed and the system showing up in the list of Foreman hosts

Comment 2 Lukas Zapletal 2014-06-20 13:34:39 UTC
Info for PMs: Due to changes that needs to be done in selinux-core puppet policy, backporting into RHEL6 and changes on the foreman-selinux side, we need few months for this to happen.

Beta is not possible (we need a workaround for this). If we want the proper fix in GA, it's good to start after Beta is out so we have some time for errata to come into RHEL6.

The upstream issue is here: http://projects.theforeman.org/issues/2820 - we would like to implement this by splitting passenger policy into two separate ones, which will allow us to run puppet master under it's own domain and the same for foreman. This will need some time for community testing as it's quite big refactoring. This unpleseant state roots from the fact that older passengers were not able to provide better selinux support (wrapper binaries).

Comment 3 Lukas Zapletal 2014-06-20 13:41:36 UTC
Oh the issue was wrong, this one is the one: http://projects.theforeman.org/issues/6316

Comment 4 Lukas Zapletal 2014-08-27 13:55:05 UTC
I am unlinking the upstream issue - refactoring is not possible since it is too late. It will be done as a separate upstream effort.

With latest snap and build I don't see any problems, except the following harmless denial which is a file handler leak in puppet (we will mask this denial for Satellite 6.1):

time->Wed Aug 27 09:15:56 2014
type=SYSCALL msg=audit(1409145356.680:172): arch=c000003e syscall=59 success=yes exit=0 a0=3366d00 a1=16d4d30 a2=0 a3=12 items=0 ppid=4708 pid=4725 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="load_policy" exe="/sbin/load_policy" subj=unconfined_u:unconfined_r:load_policy_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1409145356.680:172): avc:  denied  { write } for  pid=4725 comm="load_policy" path="/tmp/puppet20140827-4300-1q7kni7-0" dev=vda1 ino=263067 scontext=unconfined_u:unconfined_r:load_policy_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file
type=AVC msg=audit(1409145356.680:172): avc:  denied  { write } for  pid=4725 comm="load_policy" path="/tmp/puppet20140827-4300-1q7kni7-0" dev=vda1 ino=263067 scontext=unconfined_u:unconfined_r:load_policy_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file

foreman-selinux-1.6.0.9-1.el6sat.noarch

Putting this to ON_QA.

If this fails verification, please provide:

getenforce

semodule -l | grep foreman

ps axuwZ

ausearch -m AVC -m USER_AVC

foreman-selinux-relabel -nv

Comment 5 Lukas Zapletal 2014-08-27 13:56:09 UTC
This bug is not actually duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1127284 (Various AVC denials during Capsule installation).

*** This bug has been marked as a duplicate of bug 1127284 ***


Note You need to log in before you can comment on or make changes to this bug.