From aa0216d66e558d06d89ad4ccf5ffc4061dc5ccd7 Mon Sep 17 00:00:00 2001 From: Alan Bishop Date: Wed, 22 Nov 2017 10:47:56 -0500 Subject: [PATCH] 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 --- castellan/key_manager/barbican_key_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/castellan/key_manager/barbican_key_manager.py b/castellan/key_manager/barbican_key_manager.py index e10f838e..0a4bdd5e 100644 --- a/castellan/key_manager/barbican_key_manager.py +++ b/castellan/key_manager/barbican_key_manager.py @@ -172,7 +172,10 @@ class BarbicanKeyManager(key_manager.KeyManager): return identity.Token( auth_url=self.conf.barbican.auth_endpoint, 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: msg = _("context must be of type KeystonePassword, " "KeystoneToken, or RequestContext.")