Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 852452 - candlepin-ca.key is readable by apache
Summary: candlepin-ca.key is readable by apache
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-28 14:17 UTC by Miroslav Suchý
Modified: 2019-09-26 13:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-12 07:20:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2012-08-28 14:17:09 UTC
Description of problem:

# ls -l /etc/candlepin/certs/
total 8
-rw-r--r--. 1 root katello 1834 Aug 28 04:44 candlepin-ca.crt
-rw-r-----. 1 root katello    1679 Aug 28 04:44 candlepin-ca.key
lrwxrwxrwx. 1 root katello   37 Aug 28 04:44 candlepin-upstream-ca.crt -> /etc/candlepin/certs/candlepin-ca.cr

Apache belongs to group katello, katello group can read candlepin-ca.key.
Therefore user apache can read private key of candlepin.
This can be exploited if attacker exploit apache.
I believe that we do not need apache to have access to this private key.

Version-Release number of selected component (if applicable):
katello-1.1.7-1.git.31.8662665.el6.noarch

 
I expect that 
  chown root:root /etc/candlepin/certs/candlepin-ca.key
would solve this situation.

Comment 1 Mike McCune 2012-08-29 15:18:35 UTC
We use the cert+key in our apache conf for the default setup:

 grep candlepin /etc/httpd/conf.d/katello.conf 
  SSLCertificateFile /etc/candlepin/certs/candlepin-ca.crt
  SSLCertificateKeyFile /etc/candlepin/certs/candlepin-ca.key
  SSLCaCertificateFile /etc/candlepin/certs/candlepin-ca.crt

perhaps there is a better way to set this up so we don't have todo this

Comment 2 Lukas Zapletal 2012-08-30 13:53:29 UTC
I wonder there is no other way. We need to use candlepin CA.

Comment 3 Bryan Kearney 2014-08-11 19:24:41 UTC
I think we can close this:

[root@sat6 certs]# find / -name candlepin-ca.key
<EMPTY>

[root@sat6 certs]# pwd
/etc/pki/katello/certs
[root@sat6 certs]# ls -lah
total 44K
drwxr-xr-x. 2 root foreman 4.0K Aug  8 14:12 .
drwxr-xr-x. 5 root foreman 4.0K Aug  8 14:13 ..
-rw-r--r--. 1 root root    5.4K Aug  8 14:12 java-client.crt
-rw-r--r--. 1 root root    5.4K Aug  8 14:03 katello-apache.crt
-rw-r--r--. 1 root foreman 5.3K Aug  8 14:03 katello-ca.crt
-rw-r--r--. 1 root root    1.8K Aug  8 14:03 katello-ca-stripped.crt
-rw-r--r--. 1 root root    5.4K Aug  8 14:12 sat6.rdu.redhat.com-qpid-broker.crt

Comment 4 Lukas Zapletal 2014-08-12 07:20:27 UTC
Yes.

[root@nightly ~]# id foreman
uid=497(foreman) gid=498(foreman) groups=498(foreman),52(puppet)
[root@nightly ~]# id apache
uid=48(apache) gid=48(apache) groups=48(apache)


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