summaryrefslogtreecommitdiff
path: root/keystoneclient/access.py
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2013-09-26 15:33:00 +0100
committerSteven Hardy <shardy@redhat.com>2013-09-26 15:33:00 +0100
commit5b7a460bc3eb108e1d9df79fb5d3f97d3b06bf4b (patch)
treed7c19b82abbf491d10e440bdc00b8d0fcb83a02f /keystoneclient/access.py
parent5588abdf8a8242fbce6a8f41e0a59c1ad0f6f925 (diff)
downloadpython-keystoneclient-5b7a460bc3eb108e1d9df79fb5d3f97d3b06bf4b.tar.gz
Allow v2 client authentication with trust_id
It should be possible to authenticate against the v2 tokens API with a trust_id, because it suports rescoping an existing token to a trust, this patch adds client support for this. Note with the current keystone code it's necessary to pass the trustor tenant ID when rescoping with a trust where impersonation==True, e.g: c = client_v2.Client(username=TRUSTEE_USERNAME, password=TRUSTEE_USERNAME, tenant_name=TRUSTEE_TENANT_NAME, auth_url=OS_AUTH_URL_V2) c.authenticate(trust_id=trust_i.id, tenant_id=TRUSTOR_TENANT_ID) Change-Id: I177c41af298b7437e2c6fb437aa9ce9a09773b9d Closes-Bug: #1231483
Diffstat (limited to 'keystoneclient/access.py')
-rw-r--r--keystoneclient/access.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/keystoneclient/access.py b/keystoneclient/access.py
index 53cb0ff..e54e986 100644
--- a/keystoneclient/access.py
+++ b/keystoneclient/access.py
@@ -391,11 +391,11 @@ class AccessInfoV2(AccessInfo):
@property
def trust_id(self):
- return None
+ return self.get('trust', {}).get('id')
@property
def trust_scoped(self):
- return False
+ return 'trust' in self
@property
def project_id(self):