I have the following setup:
- Web server:
alice.example.org
(Login by HTML page, username1/password1) - Web server:
bob.example.org
(Login by HTML page, username2/password2) - HTTP Proxy:
proxy.example.org
(Login by HTTP basic auth, username1/password1) - KeePass 2.52 with KeePassRPC Plugin 1.14.0 and latest Firefox/Chrome plugins
- 3 KeePass entries with URLs set to
https://alice.example.org/login.php
,https://bob.example.org/login.php
,proxy.example.org
- A
pac.js
proxy auto configuration file used by Firefox and Chrome:
var FindProxyForURL = function(url, host) {
"use strict";
if (shExpMatch(host,'alice.example.org.org')) {
return 'HTTPS proxy.example.org:3128; DIRECT;';
}
if (shExpMatch(host,'bob.example.org.org')) {
return 'HTTPS proxy.example.org:3128; DIRECT;';
}
return 'DIRECT';
};
Now the bug/problem:
- When I visit
alice.example.org
first, a HTTP basic auth dialog pops up, I select the only existing entry (username1
) and the proxy allows me access to the otherwise unreachable web server, where I can login by entering the login data on a HTML page. If I visitbob.example.org
next, the page also loads fine since the proxy authentication is cached in my browser - When I visit
bob.example.org
first, a HTTP basic auth dialog pops up, but I am only presented with theusername2
login option.username2
is the account forbob.example.org
, but currentlyproxy.example.org
is asking me for login details, so the login details forproxy.example.org
should be offered, not the ones forbob.example.org
. When I click to login withusername2
, the dialog pops up again and again since the proxy authentication is done with the wrong credentials.