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:
@@ -182,7 +182,7 @@ class RequestTokenTests(TokenTests):
|
|||||||
self.assertEqual(request_secret, request_token.secret)
|
self.assertEqual(request_secret, request_token.secret)
|
||||||
|
|
||||||
# Assert that the project id is in the header
|
# 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
|
req_headers = self.requests.last_request.headers
|
||||||
|
|
||||||
oauth_client = oauth1.Client(consumer_key,
|
oauth_client = oauth1.Client(consumer_key,
|
||||||
|
@@ -58,7 +58,7 @@ class RequestTokenManager(base.CrudManager):
|
|||||||
|
|
||||||
def create(self, consumer_key, consumer_secret, project):
|
def create(self, consumer_key, consumer_secret, project):
|
||||||
endpoint = utils.OAUTH_PATH + '/request_token'
|
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,
|
oauth_client = oauth1.Client(consumer_key,
|
||||||
client_secret=consumer_secret,
|
client_secret=consumer_secret,
|
||||||
signature_method=oauth1.SIGNATURE_HMAC,
|
signature_method=oauth1.SIGNATURE_HMAC,
|
||||||
|
Reference in New Issue
Block a user