admin管理员组

文章数量:1648345

Keycloak 在解决服务之间的通信的时候可以使用 service account 功能,也就是服务账号。每一个 Keycloak Realm 下的 client 都可以包含一个 service account 账号。这个 service account 账号的概念来自于 OAuth 2.0 的 Client Credential Grant 规范。

Service Account 和用户账号的区别

Service Account 和用户账号的不同之处在于 Service Account 使用 client secret登录,登录后只会生成 access token 不会生成 refresh token。 因为每个 keycloak 的 client 只能有一个Service Account,所以 Service Account 有专门的角色分配UI来配置它的权限。

项目 Service Account 用户账号
数量 一个 client 一个 一个realm下每一个用户有一个账号
登录 用户名: client 名称,密码:Client Secret 用户的用户名,用户的密码
生成的Token Access Token Access Token 和 Refresh Token
角色分配 使用 Service Account 专有的分配方式 使用用户角色分配

Service Account 的用法

本文标签: 如何使用账号功能ServiceKeycloak