【问题标题】:using Keycloak with icCube - how to get it to work (missing Keycloak context token)?将 Keycloak 与 icCube 一起使用 - 如何使其工作(缺少 Keycloak 上下文令牌)?
【发布时间】:2019-07-12 13:21:58
【问题描述】:

我在icCube前尝试使用Keycloak,遇到了一些问题。可能有人可以帮忙。

到目前为止完成:

关于keycloak:

  • 创建了 Realm icCube 和客户端 iccube,有 2 个用户:管理员和用户
  • 创建了 2 个角色:管理员和销售

json文件是:

  {
  "realm": "icCube",
  "auth-server-url": "http://192.168.178.32:8080/auth",
  "ssl-required": "external",
  "resource": "iccube",
  "verify-token-audience": true,
  "credentials": {
    "secret": ".... secret ...."
  },
  "confidential-port": 0,
  "policy-enforcer": {}
}

现在,当我在 icCube.xml 更改后重新启动 icCube 并尝试登录时,我在日志中收到错误:

[               qtp689602108-25] [DEBUG] (12-07-19 15:14:35.560 CEST) [auth] Keycloak auth. started
[               qtp689602108-25] [ERROR] (12-07-19 15:14:35.581 CEST) [auth] missing Keycloak context token

如何解决这个错误?我想这与 Keycloak 中的设置有关,但我无法弄清楚究竟是什么?

日志中的其他信息 将完整的日志放在这里有点过分,但这些可能是有趣的行:

[                          main] [ INFO] (12-07-19 15:14:02.891 CEST)       filter mapping : Keycloak OIDc
[                          main] [ INFO] (12-07-19 15:14:02.891 CEST)                      : crazydev.iccube.ux.processor.servlet.UxRestApiServlet-348ad293
[                          main] [ INFO] (12-07-19 15:14:02.891 CEST)       filter mapping : Passthrough
[                          main] [ INFO] (12-07-19 15:14:02.891 CEST)                      : crazydev.iccube.ux.processor.servlet.UxRestApiServlet-348ad293
[                          main] [ INFO] (12-07-19 15:14:02.891 CEST)       filter mapping : HTTP Basic Authentication
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.server.xmla.IcCubeXmlaOverHttpHandler-30f74e79
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)       filter mapping : Keycloak OIDc
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.gwt.server.reporting.component.OlapReportingServlet-2c88a3e8
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)       filter mapping : Passthrough
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.gwt.server.reporting.component.OlapReportingServlet-2c88a3e8
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)       filter mapping : Keycloak OIDc
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.server.gvi.GviServlet-68ac9ec5
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)       filter mapping : Passthrough
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.server.gvi.GviServlet-68ac9ec5
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)       filter mapping : GVI Authentication (logout)
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.server.gvi.GviServlet-68ac9ec5
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)       filter mapping : Print Authentication
[                          main] [ INFO] (12-07-19 15:14:02.892 CEST)                      : crazydev.iccube.server.print.IcCubePrintServlet-a50d709

[                          main] [DEBUG] (12-07-19 15:14:03.521 CEST) Use authServerUrl: http://192.168.178.32:8080/auth, tokenUrl: http://192.168.178.32:8080/auth/realms/icCube/protocol/openid-connect/token, relativeUrls: NEVER
[                          main] [ INFO] (12-07-19 15:14:03.543 CEST) [keycloak] Keycloak is using a per-deployment configuration.
[                          main] [DEBUG] (12-07-19 15:14:03.545 CEST) [auth] passthrough : configured

【问题讨论】:

    标签: keycloak iccube


    【解决方案1】:
    missing Keycloak context token
    

    表示尚未执行 Keycloak 身份验证。

    Keycloak 实际身份验证出现问题的可能性更大。

    提示:确保您在尝试登录 icCube 服务器时通过了重定向到 Keycloak 服务器身份验证页面的步骤。

    【讨论】:

    • 我找到了,文档说您不能使用链接 /icCube/icCube.html 并改用 /icCube/console。这个“错误”让我陷入了困境。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-11
    • 1970-01-01
    • 1970-01-01
    • 2017-01-03
    • 2019-04-21
    • 2018-04-14
    • 2022-11-13
    相关资源
    最近更新 更多