[Openstack-security] [Bug 1247217] Fix merged to oslo-incubator (master)

OpenStack Infra 1247217 at bugs.launchpad.net
Fri Nov 8 00:41:53 UTC 2013


Reviewed:  https://review.openstack.org/55193
Committed: http://github.com/openstack/oslo-incubator/commit/76b0cd10c414ae71e6f041adb431460b3337c63d
Submitter: Jenkins
Branch:    master

commit 76b0cd10c414ae71e6f041adb431460b3337c63d
Author: Lance Bragstad <ldbragst at us.ibm.com>
Date:   Mon Nov 4 22:35:36 2013 +0000

    Add mask password impl from other projects
    
    A couple of different projects have an implementation for 'masking'
    passwords in logs and wsgi output.
    
    This seems like something that should go into Oslo-incubator as a common
    implementation. This implementation is based off the following two
    implementations in Keystone and Nova:
    
      https://review.openstack.org/#/c/26487/12
      https://review.openstack.org/#/c/49664/
    
    Partial-Bug: #1247217
    
    Change-Id: I2b1bbb4d3ddaa163573b685b3e3a5e8a3977e390

-- 
You received this bug notification because you are a member of OpenStack
Security Group, which is subscribed to OpenStack.
https://bugs.launchpad.net/bugs/1247217

Title:
  Sanitize passwords when logging payload in wsgi for API Extensions

Status in OpenStack Compute (Nova):
  Confirmed
Status in Oslo - a Library of Common OpenStack Code:
  In Progress

Bug description:
  The fix for bug 1231263 ( https://bugs.launchpad.net/nova/+bug/1231263
  ) addressed not logging the clear-text password in the nova wsgi.py
  module for the adminPass attribute for the Server Change Password REST
  API, but this only addressed that specific attribute.  Since Nova has
  support for the ability to add REST API Extensions (in the contrib
  directory), there could any number of other password-related
  attributes in the request/response body for those additional
  extensions.

  Although it would not be possible to know all of the various sensitive
  attributes that these API's would pass in the request/response (the
  only way to totally eliminate the exposure would be to not log the
  request/response which is useful for debugging), I would like to
  propose a change similar to the one that was made in keystone (under
  https://bugs.launchpad.net/keystone/+bug/1166697) to mask the password
  in the log statement for any attribute that contains the "password"
  sub-string in it.

  The change would in essence be to update the _SANITIZE_KEYS /
  _SANITIZE_PATTERNS lists in the nova/api/openstack/wsgi.py module to
  include a pattern for the "password" sub-string.

  Also, for a slight performance benefit, it may be useful to put a
  check in to see if debug logging level is enabled around the debug
  statement that does the sanitize call (since the request/response
  bodies could be fairly large and wouldn't want to take the hit to do
  the pattern matches if debug isn't on).

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1247217/+subscriptions




More information about the Openstack-security mailing list