当向Keycloak操作符用户添加组时,我得到一个用户未找到错误



我正在使用诸如realm之类的清单。Yaml和用户。Yaml使用的例子从这个github https://github.com/keycloak/keycloak-operator/tree/master/deploy/examples。我们的用户清单如下所示。当组被添加到这个文件时,我们从helm收到这个错误:

服务器错误(NotFound): keycloakusers.keycloak.org "example-user"没有找到

使用keycloak manifest创建组的正确方法是什么?

apiVersion: keycloak.org/v1alpha1
kind: KeycloakUser
metadata:
name: example-user
spec:
user:
username: "example-user"
email: "example-user@gmail.com"
enabled: True
emailVerified: True
# credentials:
#   - type: "password"
#     value: "password"
realmRoles:
- "offline_access"
- "uma_authorization"
- "user"
clientRoles:
account:
- "manage-account"
realm-management:
- "manage-users"
realmSelector:
matchLabels:
app: sso

当keycloak-user使用crd时,请查看下面的yaml。但是,您应该记住,组(您想要放置…)必须已经存在。

apiVersion: keycloak.org/v1alpha1
kind: KeycloakUser
metadata:
name: example-user
spec:
user:
username: "example-user"
email: "example-user@gmail.com"
enabled: True
emailVerified: True
# credentials:
#   - type: "password"
#     value: "password"
realmRoles:
- "offline_access"
- "uma_authorization"
- "user"
groups:
- "your group"
clientRoles:
account:
- "manage-account"
realm-management:
- "manage-users"
realmSelector:
matchLabels:
app: sso

相关内容

最新更新