jboss-tools - 在 keycloak-gatekeeper 的请求中找不到 session 错误

标签 jboss-tools

我正在尝试通过 keycloak 保护 kibana,但登录后,keycloak-gatekeeper 抛出多个错误并且浏览器显示 ERR_TO_MANY_REDIRECTS:

info    issuing access token for user   {"email": "xxx@example.com", "expires": "2019-03-23T00:18:30Z", "duration": "1m3.401805266s"}
error   no session found in request, redirecting for authorization      {"error": "authentication session not found"}

我的 keycloak-gatekeeper 配置文件是这样的:

skip-openid-provider-tls-verify: true
secure-cookie: false
discovery-url: https://keycloak.example.com/auth/realms/REALM
client-id: kibana
client-secret: xxx-xxx...
listen: 0.0.0.0:3000
enable-refresh-tokens: true
redirection-url: http://kibana.example.com/
encryption-key: AgXa7xRcoClDEU0ZDSH4X0XhL5Qy2Z2j
upstream-url: http://kibana:5601

我的 apache2 vhost 配置文件是这样的:

Define VHOST_KIBANA kibana.example.com
<VirtualHost ${VHOST_KIBANA}:80>
    ServerName ${VHOST_KIBANA}

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ProxyRequests On
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://127.0.0.1:8180/
    ProxyPassReverse / http://127.0.0.1:8180/

    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

什么可能导致该错误?

谢谢

最佳答案

问题出在 apache 配置上,这样它就可以正常工作了:

Define VHOST_KIBANA kibana.example.com
<VirtualHost ${VHOST_KIBANA}:80>
    ServerName ${VHOST_KIBANA}

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ProxyPreserveHost On

    ProxyPass / http://127.0.0.1:8180/
    ProxyPassReverse / http://127.0.0.1:8180/
</VirtualHost>

关于jboss-tools - 在 keycloak-gatekeeper 的请求中找不到 session 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55385869/

相关文章:

java - 从 Eclipse 启动 JBoss 7.1.1 失败

apache-camel - 如何安装/在哪里可以找到 jboss/fuse apache Camel 工具独立版

java - 在 Hibernate 视角下生成代码时忽略表前缀

java - EJB客户端错误

drools-guvnor - 如何在 OCP 环境中访问 RHDM 7.0 git 存储库?

java - Hibernate工具可以生成JPA POJO吗?

java - JBPM:从任务节点发出多个转换

JBoss 应用服务器管理控制台?

java - JBoss JMS 提供商

java - JBoss 工具部署错误 : This may be caused by your server's temporary deploy directory being on a different filesystem than the final destination