Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 876580

Summary: [world-writable] /etc/rhsm/ca/candlepin-local.pem
Product: Red Hat Satellite Reporter: James Laska <jlaska>
Component: InstallationAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: urgent    
Version: 6.0.0CC: ehelms, gkhachik, jturner
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-01 06:48:50 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 James Laska 2012-11-14 14:06:08 UTC
Description of problem:

katello-configure creates a world-writable candlepin-local.pem file.

Version-Release number of selected component (if applicable):
 * katello-configure-1.1.9-12.el6cf.noarch

How reproducible:


Steps to Reproduce:
1. Deploy a cloudforms application
2. Install the candlepin-cert-consumer-<fqdn>-1.0-1.noarch package
3. Inspect the file permissions for /etc/rhsm/ca/candlepin-local.pem
  
Actual results:

> # ll /etc/rhsm/ca/candlepin-local.pem
> -rw-rw-rw-. 1 root root 5487 Nov 12 11:19 /etc/rhsm/ca/candlepin-local.pem

Expected results:

I'm not sure, but likely *not* world readable+writable

> # ll /etc/rhsm/ca/candlepin-local.pem
> -rw-r-----. 1 root root 5487 Nov 12 11:19 /etc/rhsm/ca/candlepin-local.pem

Additional info:

Comment 3 James Laska 2012-11-14 14:20:13 UTC
From katello-configure/main.log, it appears that we are intentionally creating the file with 666 permissions

> 121112-11:19:15 debug: Exec[generate-candlepin-consumer-certificate](provider=posix): Executing 'gen-rpm.sh --name 'candlepin-cert-consumer-qeblade41.rhq.lab.eng.bos.redhat.com' --version 1.0 --release 1 --packager None --vendor None --group 'Applications/System' --summary 'Subscription-manager consumer certificate for Katello instance qeblade41.rhq.lab.eng.bos.redhat.com' --description 'Consumer certificate and post installation script that configures rhsm.' --post /root/ssl-build/rhsm-katello-reconfigure /etc/rhsm/ca/candlepin-local.pem:666=/root/ssl-build/candlepin-cert.crt 2>>/var/log/katello/katello-configure/certificates.log && /sbin/restorecon ./*rpm'
> 121112-11:19:15 debug: Executing 'gen-rpm.sh --name 'candlepin-cert-consumer-qeblade41.rhq.lab.eng.bos.redhat.com' --version 1.0 --release 1 --packager None --vendor None --group 'Applications/System' --summary 'Subscription-manager consumer certificate for Katello instance qeblade41.rhq.lab.eng.bos.redhat.com' --description 'Consumer certificate and post installation script that configures rhsm.' --post /root/ssl-build/rhsm-katello-reconfigure /etc/rhsm/ca/candlepin-local.pem:666=/root/ssl-build/candlepin-cert.crt 2>>/var/log/katello/katello-configure/certificates.log && /sbin/restorecon ./*rpm'

Comment 6 Kurt Seifried 2013-02-01 06:48:50 UTC

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