Bug 1106328 - clear text passwords shown in horizon.log (DEBUG level)
Summary: clear text passwords shown in horizon.log (DEBUG level)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-keystoneclient
Version: 5.0 (RHEL 7)
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: z2
: 5.0 (RHEL 7)
Assignee: Jamie Lennox
QA Contact: Mike Abrams
URL:
Whiteboard:
: 1153055 (view as bug list)
Depends On:
Blocks: 1109874 1153055
TreeView+ depends on / blocked
 
Reported: 2014-06-09 05:32 UTC by Giulio Fidente
Modified: 2022-07-09 07:18 UTC (History)
13 users (show)

Fixed In Version: python-keystoneclient-0.9.0-3.el7ost python-keystoneclient-0.9.0-3.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1153055 (view as bug list)
Environment:
Last Closed: 2014-11-03 08:40:29 UTC
Target Upstream Version:
Embargoed:
mabrams: needinfo+


Attachments (Terms of Use)
/etc/openstack-dashboard/local-settings logger section (4.11 KB, text/plain)
2014-10-20 10:19 UTC, Mike Abrams
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1004114 0 None None None Never
OpenStack gerrit 101792 0 None None None Never
Red Hat Issue Tracker OSP-16567 0 None None None 2022-07-09 07:18:01 UTC
Red Hat Product Errata RHSA-2014:1784 0 normal SHIPPED_LIVE Moderate: python-keystoneclient security and bug fix update 2014-11-03 13:36:46 UTC

Description Giulio Fidente 2014-06-09 05:32:25 UTC
Description of problem:
horizon by default logs messages up to the DEBUG level in /var/log/horizon/horizon.log and these contain clear text passwords

I think logging of DEBUG messages should not be enabled by default and passwords should not go printed in clear text there anyway.


Version-Release number of selected component (if applicable):
python-django-horizon-2014.1-7.el7ost.noarch

Comment 2 Julie Pichon 2014-06-09 07:45:36 UTC
I'm fairly sure the logging is set to INFO by default in the default configuration file, I suspect the installer you're using may be setting it to DEBUG.

Could you include a log sample, obscuring the actual password(s) as needed, so we can see which client requests is being logged that way? I'm thinking of things like bug https://bugs.launchpad.net/keystone/+bug/1004114 . Looking at that bug's history I'm not sure it was ever fixed in the python-keystoneclient (or if it will be, see e.g. https://review.openstack.org/#/c/42467/2//COMMIT_MSG on one of the abandoned patch).

Comment 3 Giulio Fidente 2014-06-09 08:43:28 UTC
hi there, thanks for picking this up! It seems to be the keystone client as you suggested:

2014-06-09 08:41:36,538 1748 DEBUG openstack_auth.backend Beginning user authentication for user "admin".
2014-06-09 08:41:36,538 1748 DEBUG keystoneclient.session REQ: curl -i -X POST http://192.168.4.2:5000/v2.0/tokens -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": {"passwordCredentials": {"username": "admin", "password": "wrongpass"}}}'

my fault for not having noticed that in the first place; maybe the upstream LP bug I opened also is a duplicate of LP 1004114 then?

Comment 4 Julie Pichon 2014-06-09 09:26:15 UTC
I think so, so I  marked it as a duplicate upstream. It looks like a few people have reported it several times too, looking at the "Duplicates" history. I added a comment on the original bug (LP 1004114) as it seems the Keystone client patch was abandoned and might not get picked up again, feel free to chime in and add a comment with your opinion to that report as well.

Should we close this BZ or move it to another component? I had a quick browse through Keystone / Keystone client bugs but didn't notice anything related at first glance.

Comment 9 Nathan Kinder 2014-10-15 18:21:32 UTC
*** Bug 1153055 has been marked as a duplicate of this bug. ***

Comment 10 Mike Abrams 2014-10-20 06:13:25 UTC
behavior currently is that when keystone logs are set to debug, keystone now logs properly without passwords being written to the log files...just informational text.

However, horizon logs (/var/log/horizon/horizon.log /var/log/httpd/horizon_access.log /var/log/httpd/horizon_error.log) all log NOTHING after debug was set in /etc/openstack-dashboard/local-settings and the services restarted.

logs were triggered by the curl command above (with localhost substituted for your ip).

Please advise on the expected behavior from horizon.

Comment 11 Julie Pichon 2014-10-20 08:38:10 UTC
How did you configure logging to log at the DEBUG level in Horizon? Could you provide the LOGGING dictionary from /etc/openstack-dashboard/local_settings?

Comment 12 Mike Abrams 2014-10-20 10:19:19 UTC
Created attachment 948487 [details]
/etc/openstack-dashboard/local-settings logger section

please see attachment (1106328.out)

Comment 13 Julie Pichon 2014-10-20 13:09:40 UTC
Thanks Mike, the Keystone client is set to DEBUG and goes to the 'file' handler, which is set to DEBUG as well so that should be enough to verify this bug. If it was set like this before updating the keystone client, restarting httpd without any change should be enough to see the new output going to /var/log/horizon/horizon.log . I'm not sure why nothing at all would be logged. Is the DEBUG variable at the top of the file set to False? (This is more of a development debugging feature that should never be True on a production system.)

Comment 14 Mike Abrams 2014-10-21 09:34:28 UTC
Julie,  The debug variable was set to True through all of this, and still no logging; this behavior is experienced by a colleague of mine as well.

Please advise

Comment 16 errata-xmlrpc 2014-11-03 08:40:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2014-1784.html


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