php - Kanboard 和反向代理认证
问题描述
根据文档(https://docs.kanboard.org/en/latest/admin_guide/reverse_proxy_authentication.html),我尝试使用 REVERSE_PROXY_USER_HEADER 参数配置简单的身份验证。
为此,我像这样设置参数(data/config.php)!
define('REVERSE_PROXY_AUTH', true);
define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER');
define('REVERSE_PROXY_DEFAULT_ADMIN', 'admin');
define('REVERSE_PROXY_DEFAULT_DOMAIN', 'my-domain.fr');
我还更改了 apache2 日志格式以显示我的 HTTP 标头,并且我可以在相应的日志中看到我的“用户名”。
我的 HTTP 请求是这样的:
Host: kbsso.my-domain.fr
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Cookie: KB_SID=g6re22ivihojnle991idmo4vhh; KB_RM=4c14de632e17976bc894b9dd0f273c0415d0fef620b62b00bc8e782084775a97%7Cf47e8c6b8ab3721c60dd32fbc4ed129fedbeafc388ff66b3c9933e28c08d
Upgrade-Insecure-Requests: 1
REMOTE_USER: ex.valere.viandier
Pragma: no-cache
Cache-Control: no-cache
所以,我的问题是...
- 当 REVERSE_PROXY_AUTH 设置为 true 时,控制器会显示登录屏幕,但如果我尝试登录,我会收到“拒绝访问”HTML 页面。
- 当 REVERSE_PROXY_AUTH 设置为 false 时,控制器会显示登录屏幕,并且使用相同的用户帐户,我可以访问 kanboard。
文件说:
- 您的反向代理对用户进行身份验证并通过 HTTP 标头发送用户名。
- Kanboard 从请求中检索用户名
- 如有必要,将自动创建用户 打开一个新的 Kanboard 会话,假设它是有效的,没有任何提示
我尝试使用现有和不存在的用户,但我有同样的问题。我尝试使用 v1.2.5、v1.2.8 但没有办法...
你知道一个问题吗?
非常感谢 Valère
解决方案
推荐阅读
- angular - 填充数组并使其可使用 Angular Material 过滤
- java - Android OneSignal 通知无法打开“已关闭”应用程序
- android - 如何在 Android 应用程序中为服务器提供回调 url
- r - 在R中使用多个条件左连接
- emacs - 更改 Spacemacs/Emacs 当前行号的颜色
- sap - Fiori v/s CDS 中的分析图表
- c# - 如何获取有关最近连接的 USB 设备的信息?
- excel - 记录集标准的错误取决于键是文本还是数字
- java - Junit - 有界泛型方法中的测试约束
- spring - feign.RetryableException: 读取超时执行 GET http://forex-service/currency-exchange/from/EUR/to/INR\r\n\tat feign.FeignException.errorExecu