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
Alan Bishop
5 years ago
171 | 171 | return identity.Token( |
172 | 172 | auth_url=self.conf.barbican.auth_endpoint, |
173 | 173 | token=context.auth_token, |
174 | project_id=context.tenant) | |
174 | project_id=context.project_id, | |
175 | project_name=context.project_name, | |
176 | project_domain_id=context.project_domain_id, | |
177 | project_domain_name=context.project_domain_name) | |
175 | 178 | else: |
176 | 179 | msg = _("context must be of type KeystonePassword, " |
177 | 180 | "KeystoneToken, or RequestContext.") |