Project ID in OAuth headers was missing

If running Keystone under Apache with mod_wsgi, the extra
headers were not being passed forward. These headers include:
i) the Requested_Project_Id header, and ii) The Authorization
headers with the oauth values.

For i) we have to rename the header to use dashes (-), and not
underscores (_), since mod_wsgi does not propogate the header
otherwise. For ii) we need to add `WSGIPassAuthorization On`
in the keystone vhost file. This should be done on the server
side.

For more info see note #2 here:
http://modwsgi.readthedocs.org/en/latest/release-notes/version-4.3.0.html#bugs-fixed

Closes-Bug: #1392584
Change-Id: Id84e883b357408d25797155a72119f4c9898ca76
This commit is contained in:
Steve Martinelli
2014-11-13 16:24:29 -05:00
parent 28ea0a8e36
commit a60978ed73
2 changed files with 2 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ class RequestTokenTests(TokenTests):
self.assertEqual(request_secret, request_token.secret)
# Assert that the project id is in the header
self.assertRequestHeaderEqual('requested_project_id', project_id)
self.assertRequestHeaderEqual('requested-project-id', project_id)
req_headers = self.requests.last_request.headers
oauth_client = oauth1.Client(consumer_key,

View File

@@ -58,7 +58,7 @@ class RequestTokenManager(base.CrudManager):
def create(self, consumer_key, consumer_secret, project):
endpoint = utils.OAUTH_PATH + '/request_token'
headers = {'requested_project_id': base.getid(project)}
headers = {'requested-project-id': base.getid(project)}
oauth_client = oauth1.Client(consumer_key,
client_secret=consumer_secret,
signature_method=oauth1.SIGNATURE_HMAC,