Bug 1847951

Summary: Satellite log files (/var/log/foreman-maintain/foreman-maintain.log and /var/log/foreman-installer/satellite.log) captures password in the plain text.
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Devendra Singh <desingh>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: bshahu, egolov, gtalreja, lzap, pmoravec, roarora, zhunting
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1785117 Environment:
Last Closed: 2021-08-10 21:37:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Devendra Singh 2020-06-17 12:29:06 UTC
Description of problem: Satellite log files (/var/log/foreman-maintain/foreman-maintain.log and /var/log/foreman-installer/satellite.log) captures password in the plain text.

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


Steps to Reproduce RFE:
1. Collect the logs using foreman-debug
2. Check the satellite.log from collected foreman-debug log
3. Password display in the plain text

Actual Result:

satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]   Searching for "foreman_proxy_content::pulp_admin_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           No such key: "foreman_proxy_content::pulp_admin_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           Found key: "foreman_proxy_content::pulp_admin_password" +FILTERED+ "XXXXXXXXXXXXXXXX"
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]  Automatic Parameter Lookup of 'foreman_proxy_content::pulp_proxy_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]   Searching for "foreman_proxy_content::pulp_proxy_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           No such key: "foreman_proxy_content::pulp_proxy_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           Found key: "foreman_proxy_content::pulp_proxy_password" +FILTERED+ nil
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]  Automatic Parameter Lookup of 'foreman_proxy_content::qpid_router_sasl_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]   Searching for "foreman_proxy_content::qpid_router_sasl_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           No such key: "foreman_proxy_content::qpid_router_sasl_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           Found key: "foreman_proxy_content::qpid_router_sasl_password" +FILTERED+ "XXXXXXXXXXXXXXXXX"
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]  Automatic Parameter Lookup of 'foreman_proxy_content::pulpcore_postgresql_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]   Searching for "foreman_proxy_content::pulpcore_postgresql_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           No such key: "foreman_proxy_content::pulpcore_postgresql_password+FILTERED+
satellite.8.log:[DEBUG 2020-06-15T05:09:16 main]           Found key: "foreman_proxy_content::pulpcore_postgresql_password" +FILTERED+ "XXXXXXXXXXXX"
satellite.8.log:[DEBUG 2020-06-15T05:09:17 main]  Automatic Parameter Lookup of 'foreman::cli::password+FILTERED+


Expected Result:

All the passwords should be replaced with FILTERED.

Comment 3 Pavel Moravec 2020-06-17 13:38:09 UTC
I think sos-3.9-2 does obfuscate everything properly here, could you please test it from the build

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1205534

?

Comment 4 Devendra Singh 2020-06-17 14:05:24 UTC
(In reply to Pavel Moravec from comment #3)
> I think sos-3.9-2 does obfuscate everything properly here, could you please
> test it from the build
> 
> https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1205534
> 
> ?

I have tested the same on 6.8, all the passwords value replaced with special ****** except https://bugzilla.redhat.com/show_bug.cgi?id=1785117#c12

sos version: 3.9-2.el7

[DEBUG 2020-06-15T04:50:33 main]           Original path: "%{facts.kafo.scenario.answer_file}"
[DEBUG 2020-06-15T04:50:33 main]  Found key: "foreman_proxy_content::pulp_admin_password" value: ********
[DEBUG 2020-06-15T04:50:33 main]  Automatic Parameter Lookup of 'foreman_proxy_content::pulp_max_speed'
[DEBUG 2020-06-15T04:50:33 main]   Searching for "foreman_proxy_content::pulp_max_speed"
[DEBUG 2020-06-15T04:50:33 main]     Global Data Provider (hiera configuration version 5)
[DEBUG 2020-06-15T04:50:33 main]       Using configuration "/usr/share/foreman-installer/config/foreman-hiera.yaml"
[DEBUG 2020-06-15T04:50:33 main]       Hierarchy entry "Custom user answers"
[DEBUG 2020-06-15T04:50:33 main]         Path "/etc/foreman-installer/custom-hiera.yaml"
[DEBUG 2020-06-15T04:50:33 main]           Original path: "/etc/foreman-installer/custom-hiera.yaml"

[DEBUG 2020-06-15T04:50:33 main]           Original path: "%{facts.kafo.scenario.answer_file}"
[DEBUG 2020-06-15T04:50:33 main]  Found key: "foreman_proxy_content::qpid_router_sasl_password" value: ********
[DEBUG 2020-06-15T04:50:33 main]  Automatic Parameter Lookup of 'foreman_proxy_content::enable_ostree'
[DEBUG 2020-06-15T04:50:33 main]   Searching for "foreman_proxy_content::enable_ostree"
[DEBUG 2020-06-15T04:50:33 main]     Global Data Provider (hiera configuration version 5)
[DEBUG 2020-06-15T04:50:33 main]       Using configuration "/usr/share/foreman-installer/config/foreman-hiera.yaml"
[DEBUG 2020-06-15T04:50:33 main]       Hierarchy entry "Custom user answers"

Comment 5 Pavel Moravec 2020-06-17 15:16:48 UTC
https://github.com/sosreport/sos/pull/2115 raised for the sos part.

Due to the state of RHEL7.9, I suggest to have this fixed since Sat7/RHEL8.4 only.

Comment 6 Mike McCune 2021-07-13 21:54:48 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 8 Mike McCune 2021-08-10 21:34:00 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.