提问人:Vinetos 提问时间:6/1/2023 最后编辑:Hans Z.Vinetos 更新时间:9/10/2023 访问量:83
如何在 Apache 反向代理后面的 Quarkus 中使用 OIDC_CLAIM_* 标头?
How to use OIDC_CLAIM_* headers in Quarkus behind an Apache Reverse Proxy?
问:
我在 Apache 反向代理后面运行 Quarkus。
Apache 用于对用户进行身份验证,并将 HTTP 标头传递给后面的应用程序。mod_auth_openidc
OIDC_CLAIM_*
如何配置Quarkus读取HTTP头?有没有办法以“夸克”的方式@Inject这一点?OIDC_CLAIM_*
以下是相关的 HTTPD 配置:
<Location /java>
ProxyPreserveHost On
AuthType openid-connect
Require claim resource_access.apache-oidc.roles:admin-role
ProxyPass "http://java-app:8080"
ProxyPassReverse "http://java-app:8080"
</Location>
实际上,我发现使用的唯一方法@HeaderParam
@GET
public String get(@HeaderParam("OIDC_CLAIM_preferred_username") String username) {
return username;
}
它有效,但不是它应该的方式。我可以使用 Quarkus 检索标头并通过 CDI 访问其内容吗?OIDC_*
谢谢
答: 暂无答案
评论