Merge "Don't set context auth_token in heat_keystoneclient"
This commit is contained in:
commit
59be7efed1
heat
@ -173,9 +173,6 @@ class KeystoneClientV3(object):
|
||||
if not client.auth_ref.trust_scoped:
|
||||
LOG.error(_("trust token re-scoping failed!"))
|
||||
raise exception.AuthorizationFailure()
|
||||
# All OK so update the context with the token
|
||||
self.context.auth_token = client.auth_ref.auth_token
|
||||
self.context.auth_url = kwargs.get('auth_url')
|
||||
# Sanity check that impersonation is effective
|
||||
if self.context.trustor_user_id != client.auth_ref.user_id:
|
||||
LOG.error(_("Trust impersonation failed"))
|
||||
|
@ -400,6 +400,7 @@ class KeystoneClientTest(HeatTestCase):
|
||||
heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
|
||||
client = heat_ks_client.client
|
||||
self.assertIsNotNone(client)
|
||||
self.assertIsNone(ctx.trust_id)
|
||||
|
||||
def test_init_v3_bad_nocreds(self):
|
||||
|
||||
@ -547,6 +548,7 @@ class KeystoneClientTest(HeatTestCase):
|
||||
ctx.trustor_user_id = 'trustor_user_id'
|
||||
heat_ks_client = heat_keystoneclient.KeystoneClient(ctx)
|
||||
self.assertIsNotNone(heat_ks_client.client)
|
||||
self.assertIsNone(ctx.auth_token)
|
||||
|
||||
def test_trust_init_fail(self):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user