在icCube中使用Keycloak-如何使其工作(缺少Keycloak上下文令牌)?

时间:2019-07-12 13:21:58

标签: keycloak iccube

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

到目前为止已完成:

关于密钥斗篷:

  • 创建了Realm icCube和客户端iccube,其中有2个用户:admin和user
  • 创建了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

1 个答案:

答案 0 :(得分:1)

missing Keycloak context token

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

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

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