admin管理员组文章数量:1318580
I am trying to figure out how to perform lightweight access token exchange in Keycloak 26. So far I was able to make it work with regular access token with the following:
# get the access token
access_token_1=$(curl -Ss -X 'POST' "http://localhost:8000/auth/realms/master/protocol/openid-connect/token" -d "client_id=admin-cli&grant_type=password&username=admin&password=qwerty12345&scope=openid" | jq -r .access_token)
# exchange it for access token in another realm
access_token_2=$(curl -Ss -X 'POST' "http://localhost:8000/auth/realms/abc/protocol/openid-connect/token" -d "client_id=admin-cli&grant_type=urn:ietf:params:oauth:grant-type:token-exchange&subject_token=$access_token_1&audience=admin-cli" | jq -r .access_token)
When I switch admin-cli
client to always use lightweight access token the procedure above fails on the second step with error subject_token validation failure
. In the logs I can see
Failed to verify identity token: Key not found
message.
The reason why I want to use lightweight access token is that I have hundreads of realms in my setup and regular access token is way to big (over 60KB).
The ultimate goal here is to use access token from master
realm to exchange it to token that belongs to another user in another realm (impersonation).
本文标签: oauth 20Token exchange with lightweight access tokenStack Overflow
版权声明:本文标题:oauth 2.0 - Token exchange with lightweight access token - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742045862a2417778.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论