Fix error validate token when run cron trigger
A trust client can't do validate token when run cron trigger This patch will fix that. Change-Id: I793fbfec03032d9ff7137c11becb6d1c18ec54bc Closes-Bug: #1843175
This commit is contained in:
parent
7698c3def0
commit
51b7dd0c6d
@ -223,8 +223,12 @@ def obtain_service_catalog(ctx):
|
|||||||
"'trust_id' must be provided in the admin context."
|
"'trust_id' must be provided in the admin context."
|
||||||
)
|
)
|
||||||
|
|
||||||
trust_client = client_for_trusts(ctx.trust_id)
|
# trust_client = client_for_trusts(ctx.trust_id)
|
||||||
token_data = trust_client.tokens.get_token_data(
|
# Using trust client, it can't validate token
|
||||||
|
# when cron trigger running because keystone policy
|
||||||
|
# don't allow do this. So we need use admin client to
|
||||||
|
# get token data
|
||||||
|
token_data = _admin_client().tokens.get_token_data(
|
||||||
token,
|
token,
|
||||||
include_catalog=True
|
include_catalog=True
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user