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 1247120 - [RFE] Installer should only show puppet diffs when executed with --verbose
Summary: [RFE] Installer should only show puppet diffs when executed with --verbose
Keywords:
Status: CLOSED DUPLICATE of bug 1370168
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Debug
Version: 6.1.0
Hardware: All
OS: All
medium
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: CVE-2016-9593
TreeView+ depends on / blocked
 
Reported: 2015-07-27 11:38 UTC by Pavel Moravec
Modified: 2019-07-11 09:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-22 09:15:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Moravec 2015-07-27 11:38:15 UTC
Description of problem:
It is great that foreman-debug obfuscates various passwords and secrets from yaml files, but the same secrets are collected in plaintext in katello-installer logs, due to puppet diff output.

Such a diff is worth to be left there, to understand what change is really applied by the installer. Rather the passwords in the logfiles need to be additionally obfuscated.


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


How reproducible:
100%


Steps to Reproduce:
1. katello-installer --katello-proxy-password "SomeSecretPassword"
(use other options, this one is just 1 example)

2. foreman-debug
3. Extract foreman-debug and grep for SomeSecretPassword


Actual results:
The password is present in var/log/katello-installer/katello-installer.*log files, like:

[DEBUG 2015-07-20 10:19:51 main]  Executing 'diff -u /etc/pulp/server/plugins.conf.d/puppet_importer.json /tmp/puppet-file20150720-32625-1gpaiex'
[ WARN 2015-07-20 10:19:51 main]  /Stage[main]/Pulp::Config/File[/etc/pulp/server/plugins.conf.d/puppet_importer.json]/content:
[ INFO 2015-07-20 10:19:51 main] --- /etc/pulp/server/plugins.conf.d/puppet_importer.json       2015-07-20 10:09:42.117415688 +0200
[ INFO 2015-07-20 10:19:51 main] +++ /tmp/puppet-file20150720-32625-1gpaiex     2015-07-20 10:19:51.599985763 +0200
[ INFO 2015-07-20 10:19:51 main] @@ -1,8 +1,8 @@
[ INFO 2015-07-20 10:19:51 main]  {
[ INFO 2015-07-20 10:19:51 main] -    "proxy_host": "",
[ INFO 2015-07-20 10:19:51 main] +    "proxy_host": "http://my.proxy.example.com",
[ INFO 2015-07-20 10:19:51 main]
[ INFO 2015-07-20 10:19:51 main] -    "proxy_port": null,
[ INFO 2015-07-20 10:19:51 main] +    "proxy_port": 8080,
[ INFO 2015-07-20 10:19:51 main]
[ INFO 2015-07-20 10:19:51 main] -    "proxy_username": "",
[ INFO 2015-07-20 10:19:51 main] -    "proxy_password": ""
[ INFO 2015-07-20 10:19:51 main] +    "proxy_username": "my_username",
[ INFO 2015-07-20 10:19:51 main] +    "proxy_password": "SomeSecretPassword"
[ INFO 2015-07-20 10:19:51 main]  }


Expected results:
All passwords and secrets that are being obfuscated in /etc/katello-installer/answers.katello-installer.yaml need to be obfuscated also in /var/log/katello-installer/katello-installer.*log files.


Additional info:

Comment 1 Ivan Necas 2015-07-27 11:39:35 UTC
Due to security properly of the BZ, marking as private

Comment 2 RHEL Program Management 2015-07-27 11:45:09 UTC
Since this issue was entered in Red Hat Bugzilla, the pm_ack has been
set to + automatically for the next planned release

Comment 3 Bryan Kearney 2016-01-08 16:53:29 UTC
Ohad, any idea if the installer can be changed to not log this in the first place?

Comment 4 Ohad Levy 2016-02-22 09:20:53 UTC
its possible to tell puppet to not show diffs in the first place, it can be done by adding " --no-show_diff" probably easy to add to kafo.

Comment 5 Bryan Kearney 2016-02-22 13:22:43 UTC
This is really an rfe.

Comment 7 Bryan Kearney 2016-07-07 15:32:30 UTC
Additional workaround include changing the default admin password after the installer has executed.

Comment 16 Lukas Zapletal 2016-12-22 08:25:11 UTC
Making the initial conversation public since the low-scored CVE was published.

To be honest, this should have been fixed in the installer. When running with default options, no diff output should have been added to the logs. When it is executed with -v option (verbose on stdout), we can add the diffs so user still can track changes when needed.

I am flipping this back to installer, if you guys do not confirm this, please do not flip this back to foreman-debug bug rather close this as dupe of https://bugzilla.redhat.com/show_bug.cgi?id=1370168 which already contains some generic filtering improvements.

Comment 17 Marek Hulan 2016-12-22 09:15:26 UTC
After discussion with Lukas, I'm marking this as a duplicate of bz 1370168. Installer does not expose log files world readable and logging template diffs is useful. Pavel, please watch the progress in bz 1370168.

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


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