我正在使用带有 Apache 的 mod_auth_openidc 和 varnish 在 Grafana 前面捕获反向代理来卸载 SSO OAuth2;一旦我登录,一段时间后我得到以下获取错误,因为我调查了这个问题;发现 OAuth 令牌已过期且 mod_auth_openidc 无法刷新令牌;我能够追踪流量
Failed to fetch dashboard
NetworkError when attempting to fetch resource.
mod_auth_openidc 令牌刷新流程
- 令牌过期,http get 调用被重定向到带有 HTTP 302 的 oauth 服务器
- 重定向失败并出现 http 403 错误 使用 HTTP 选项方法而不是 get 或 post
火狐网络流量——
如果浏览器刷新并加载了整个页面,一切都很好,奇怪
- mod_auth_openidc 使用 http 302 重定向到 oauth 服务器
- 令牌被刷新,oauth 服务器使用 http 302 重定向到应用程序
- 页面加载了 http 200
火狐网络流量——
似乎 OAuth 服务器没有处理 HTTP 选项方法;我尝试使用“要求方法 GET POST”在 Apache 级别禁用,然后 mod_auth_openidc 不起作用;任何积分或帮助表示赞赏
- 谢谢