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 2052077 - foreman-proxy does not log permissions errors when trying to read ssl_ca.pem
Summary: foreman-proxy does not log permissions errors when trying to read ssl_ca.pem
Keywords:
Status: CLOSED DUPLICATE of bug 2052076
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.10.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-08 16:26 UTC by Joniel Pasqualetto
Modified: 2022-02-08 17:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-08 17:15:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joniel Pasqualetto 2022-02-08 16:26:47 UTC
Description of problem:
If somehow the permissions of the file /etc/foreman-proxy/ssl_ca.pem are wrong in a way that the user foreman-proxy can't read it, multiple services will stop working due to the impossibility for the foreman-proxy daemon to validate client certificates sent by foreman when trying to communicate with it.

However, the error that will be returned is completely misleading only saying that it's unable to get local issuer certificate when in fact it simply can't read a file.


Version-Release number of selected component (if applicable):

I check on Satellite 6.10 (foreman-proxy-2.5.2-1.el7sat.noarch) and Satellite 6.9 (foreman-proxy-2.3.1-1.el7sat.noarch)

How reproducible:

Always

Steps to Reproduce:
1. Change the permissions of the file /etc/foreman-proxy/ssl_ca.pem:

~~~
chmod 600 /etc/foreman-proxy/ssl_ca.pem
~~~

2. Restart foreman-proxy service:

~~~
systemctl restart foreman-proxy
~~~

3. Try making a request that needs certificate validation:

~~~
#  curl --cacert /etc/foreman/proxy_ca.pem --cert /etc/foreman/client_cert.pem --key /etc/foreman/client_key.pem https://$(hostname -f):9090/logs
curl: (35) Peer does not recognize and trust the CA that issued your certificate.
~~~

Actual results:
Returns an SSL error to the user and to the logs.


Expected results:
Return an generic SSL error to the user, but on the logs it should be clear that the file couldn't be read.


Additional info:

Comment 1 Joniel Pasqualetto 2022-02-08 17:15:56 UTC

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


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