0

我目前正在使用 keycloak 15.0.1 keycloak 容器,并且正在尝试为默认主域中的管理员帐户配置 TOTP 身份验证(谷歌身份验证器)。出于这个问题的目的,我将使用本地容器。

从 Web UI 登录时正确应用配置,但问题是使用 admin-cli 时

我正在使用以下命令登录 admin-cli:

sh ./kcadm.sh config credentials --server http://localhost:8080/auth --realm master --user admin --client admin-cli --password <my_password>

这在没有 OTP 设置的情况下工作正常,但是当打开 OTP 时,我收到以下错误:

17:23:26,837 WARN  [org.keycloak.events] (default task-9) type=LOGIN_ERROR, realmId=master, clientId=admin-cli, userId=94468ce6-a5b2-4b90-a993-476583f5e05e, ipAddress=127.0.0.1, error=invalid_user_credentials, auth_method=openid-connect, grant_type=password, client_auth_method=client-secret, username=admin, authSessionParentId=88f1c289-f9b7-4267-833a-084ccac99816, authSessionTabId=7HBaV7p3DhA

我尝试添加一些参数以防它接受它:

  • --totp=
  • --otp=
  • -totp=
  • -otp=

它没有用,我在 keycloak 文档中进行了搜索,但我找不到任何关于如何做到这一点的地方。

有没有人在使用 TOTP 时尝试并成功连接到 admin-cli?

4

0 回答 0