在 Keycloak 中,我看到有一个 CRUD API 来创建资源(和范围):
http://${主机}:${端口}/auth/realms/${realm_name}/authz/protection/resource_set http://%24%7Bhost%7D:%24%7Bport%7D/auth/realms/%24%7Brealm_name%7D/authz/protection/resource_set
Create resource set description: POST /resource_set
Read resource set description: GET /resource_set/{_id}
Update resource set description: PUT /resource_set/{_id}
Delete resource set description: DELETE /resource_set/{_id}
但我没有看到 CRUD 授权策略、权限的 API。
我尝试通过 Protection/resource_set 端点创建策略但失败了:
POST:“政策”:[ {...} ]
=> 无法识别的字段“政策”
有没有办法通过 API 进行 CRUD 授权策略/权限?
(我没有使用java客户端 - 我想用邮递员来做这件事)
任何帮助将不胜感激
好吧,发现了一些东西...
当像这样请求 API 端点时,您可以获得策略/权限的访问权限:
http://${主机}:${端口}/auth/admin/realms/${realm_name}/clients/${client_id}/authz/resource-server/policy/user/${policy_id} http://%24%7Bhost%7D:%24%7Bport%7D/auth/admin/realms/%24%7Brealm_name%7D/clients/%24%7Bclient_id%7D/authz/resource-server/policy/user/%24%7Bpolicy_id%7D
但我在官方文档中仍然找不到关于此的内容......
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)