【发布时间】:2021-04-24 08:01:43
【问题描述】:
我在使这些步骤正常工作时遇到问题,记录在 Securing Applications and Services Guide 中。 stackoverflow 中的This thread 显示了一个效果不佳的选项。有人可以指出解决此问题以允许赤身裸体所需的步骤吗?
所附图片中的领域/客户端/策略/用户详细信息。 enter image description here
查询:
curl -k -X POST
–header ‘Content-Type: application/x-www-form-urlencoded’
–data-urlencode “client_id=starting-client”
–data-urlencode “client_secret=.....”
–data-urlencode “grant_type=urn:ietf:params:oauth:grant-type:token-exchange”
–data-urlencode “requested_subject=target-user”
https://localhost:8543/auth/realms/target_realm/protocol/openid-connect/token
回复:
{“error”:“access_denied”,“error_description”:“Client not allowed to exchange”}
服务器日志:
22:40:08,396 WARN [org.keycloak.events] (default task-149) type=TOKEN_EXCHANGE_ERROR, realmId=target_realm, clientId=starting-client, userId=null, ipAddress=172.17.0.1, error=not_allowed, reason=‘client not allowed to impersonate’, auth_method=token_exchange, grant_type=urn:ietf:params:oauth:grant-type:token-exchange, requested_subject=target-user, client_auth_method=client-secret
【问题讨论】:
标签: authentication keycloak impersonation