commit 8c159a2eb4d61f2b9691fbfa1288bcda2156f3f1
Author: Matt Riedemann <email address hidden>
Date: Fri Oct 17 07:53:05 2014 -0700
Don't set X-Auth-Token key in http session header if no token provided
Commit f980fc549247fa2deb87dfacebc6d8d13ccd45d1 changed how the
X-Auth-Token header was scrubbed when logging the request, but
effectively made the value required which can lead to an AttributeError
if the value for the header is None.
The value can be None if you're using Nova but don't have Nova
configured with auth_strategy='keystone' (see
nova.image.glance._create_glance_client for details).
This patch simply checks if the auth_token is set in the http client
object and if not, it doesn't set the X-Auth-Token key in the session
header.
Reviewed: https:/ /review. openstack. org/129289 /git.openstack. org/cgit/ openstack/ python- glanceclient/ commit/ ?id=8c159a2eb4d 61f2b9691fbfa12 88bcda2156f3f1
Committed: https:/
Submitter: Jenkins
Branch: master
commit 8c159a2eb4d61f2 b9691fbfa1288bc da2156f3f1
Author: Matt Riedemann <email address hidden>
Date: Fri Oct 17 07:53:05 2014 -0700
Don't set X-Auth-Token key in http session header if no token provided
Commit f980fc549247fa2 deb87dfacebc6d8 d13ccd45d1 changed how the
X-Auth-Token header was scrubbed when logging the request, but
effectively made the value required which can lead to an AttributeError
if the value for the header is None.
The value can be None if you're using Nova but don't have Nova 'keystone' (see image.glance. _create_ glance_ client for details).
configured with auth_strategy=
nova.
This patch simply checks if the auth_token is set in the http client
object and if not, it doesn't set the X-Auth-Token key in the session
header.
Closes-Bug: #1381295
Change-Id: Ie285d5253df28a 9f0f964147a53c9 9ceaa919c5c