debug message never includes identity values
Bug #1408602 reported by
Alistair Coles
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keystonemiddleware |
Fix Released
|
Medium
|
Alistair Coles |
Bug Description
auth_token debug log generates the following output i.e. all identity attribute values are shown as 'None' even when identity attributes are populated in the request environment:
Jan 8 10:10:17 localhost proxy-server: Received request from user: user_id None, project_id None, roles None service: user_id None, project_id None, roles None
The root cause is that the _fmt_msg() function constructs a debug message using
identity attributes from the request environ dict, but
accesses these using keys such as X_USER_ID, when the
correct key should be HTTP_X_USER_ID. Consequently no
identity attribute values are ever included in the debug
log message.
Changed in keystonemiddleware: | |
assignee: | nobody → Alistair Coles (alistair-coles) |
status: | New → In Progress |
Changed in keystonemiddleware: | |
importance: | Undecided → Medium |
Changed in keystonemiddleware: | |
milestone: | none → 1.4.0 |
Changed in keystonemiddleware: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/145505 /git.openstack. org/cgit/ openstack/ keystonemiddlew are/commit/ ?id=dcce0d6367c a326c79269a9be1 43efee519a3174
Committed: https:/
Submitter: Jenkins
Branch: master
commit dcce0d6367ca326 c79269a9be143ef ee519a3174
Author: Alistair Coles <email address hidden>
Date: Wed Jan 7 13:52:06 2015 +0000
Fix environ keys missing HTTP_ prefix
The _fmt_msg() function constructs a debug message using
identity attributes from the request environ dict, but
accesses these using keys such as X_USER_ID, when the
correct key should be HTTP_X_USER_ID. Consequently no
identity attribute values are ever included in the debug
log message.
This patch adds the missing HTTP_ prefix to the keys and
adds an assertion to the unit tests to verify that the debug
log is generated as expected.
Closes-Bug: 1408602 a20ae581105de1f 8964497e5a2
Change-Id: Ib309abcb3d0f15