1

I need to connect an Apache webserver on port 8079 with a Tomcat instance on port 8080 through mod_auth_openidc module (for a specific login). The purpose is to carry on the user identification through OpenID Connect to the webapp hosted on Tomcat with no need of further login request.

I configure OIDC according the OIDC server request (e.g. Google) and registered the client, I also enabled mod_jk. I'm not able to reach last mile. I also considered to use the PROXY/REVERSEPROXY within the virtualhost section on http.config apache file. So far this is not correcting redirecting as supposed..

Can someone provide help?

4

2 回答 2

0

您可以使用以下配置将受 mod_auth_openidc 保护的路径代理到 Tomcat 等后端服务器:

<Location "/">
  AuthType openid-connect
  Require valid-user
  ProxyPass http://tomcat:8080/
  ProxyPassReverse http://localhost:8080/
</Location>
于 2016-10-05T13:25:24.033 回答
0

当后端需要访问用户信息以进行授权或数据隔离时,您提供的解决方案是不够的。

我找到了一种更完整的存档方式。

<Location "/tomcat">
    AuthType openid-connect
    Require valid-user

    RequestHeader set Authorization "Bearer %{OIDC_access_token}e"

    ProxyPass "http://tomcat:8080"
    ProxyPassReverse "http://tomcat:8080"
</Location>
于 2020-09-07T20:24:14.710 回答