Bug 1235122

Summary: Puppet can't store new SSL certs.
Product: [Fedora] Fedora Reporter: Robin Powell <rlpowell>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, ubellavance
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 15:00:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Powell 2015-06-24 05:07:54 UTC
When I connect with a new puppet client, it fails like so:

rlpowell@vrici> sudo puppet agent -tv
[sudo] password for rlpowell:
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for vrici.digitalkingdom.org
Info: Certificate Request fingerprint (SHA256): 4F:F4:ED:65:55:B6:01:92:1C:31:2F:9D:D3:B8:50:15:D5:3F:59:79:99:CB:73:FA:FB:DB:AE:3B:F0:2C:FB:CA
Error: Could not request certificate: Error 400 on SERVER: Cannot save vrici.digitalkingdom.org; parent directory /etc/puppet/ssl/ca/requests is not writable

and on the master we have:

type=AVC msg=audit(06/23/2015 15:04:12.963:10846355) : avc:  denied  { write } for  pid=4851 comm=server.rb:283 name=requests dev="dm-0" ino=661615 scontext=system_u:system_r
:puppetmaster_t:s0 tcontext=system_u:object_r:puppet_etc_t:s0 tclass=dir

because, as it says, it's trying to write into /etc/puppet/ssl/ca/requests ; I imagine that signing the cert would produce an identical AVC.

Note that I suspect that this could be fixed either by changing the selinux config, or by making /etc/puppet/ssl a symlink into /var/lib/puppet/ somewhere; we would then be different from upstream, but I thought I'd mention it as an option anyway.

Comment 1 Robin Powell 2015-06-24 05:08:19 UTC
For now, I simply setenforce 0 for the ~30 seconds it takes to receive and sign a new cert.

Comment 2 Ugo Bellavance 2016-04-22 15:03:56 UTC
When can we expect to have a solution for this issue? I have the same problem with EPEL package. Does it also affect the puppetlabs packages?

Comment 3 Fedora End Of Life 2016-07-19 15:00:52 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.