Include domain info when creating identity token
Include the project domain info (name and ID) when creating an identity token that's associated with a RequestContext. This ensures the keystone v3 auth plugin will be used whenever possible. Without the domain info, the v2 plugin would be the only possible choice. Closes-Bug: #1733898 Change-Id: I8b177725db71002d8eca835a7d5367d7911cf347
This commit is contained in:
parent
ac4fc22681
commit
aa0216d66e
@ -172,7 +172,10 @@ class BarbicanKeyManager(key_manager.KeyManager):
|
|||||||
return identity.Token(
|
return identity.Token(
|
||||||
auth_url=self.conf.barbican.auth_endpoint,
|
auth_url=self.conf.barbican.auth_endpoint,
|
||||||
token=context.auth_token,
|
token=context.auth_token,
|
||||||
project_id=context.tenant)
|
project_id=context.project_id,
|
||||||
|
project_name=context.project_name,
|
||||||
|
project_domain_id=context.project_domain_id,
|
||||||
|
project_domain_name=context.project_domain_name)
|
||||||
else:
|
else:
|
||||||
msg = _("context must be of type KeystonePassword, "
|
msg = _("context must be of type KeystonePassword, "
|
||||||
"KeystoneToken, or RequestContext.")
|
"KeystoneToken, or RequestContext.")
|
||||||
|
Loading…
Reference in New Issue
Block a user