We are sending requests to an external API. It is an public API but still requires to sent basic auth authentication. Since it is a public user with no further access this is no security issue. But when those requests are executed the password manager keeps asking to save the basic auth data for this external url. This is annoying and the users on the website might get confused why they suddenly can save a username and password for a domain they do not know.
I would like to know if we can somehow make password managers in general ignore those requests.
So far we only noticed last pass with this behavior (bitwarden and chrome build in do not show this behavior). I am wondering if it is a problem specifically with the last pass extension or if it might be happening with other managers too.
My research so far did not show any results.
It can be reproduced in this fiddle with the an request like this:
(function() {
superagent('GET', 'https://httpbin.org/anything')
.auth('Username', 'Password')
.type('application/json')
.then(res => {
console.debug('res', res);
})
.catch(err => {
console.debug('err', err)
});
})();
This is how last pass asks to save the credentials:
As per comment suggested I tried to implement the url as username:password@example.com
and LastPass does not recognize this anymore.
I verified via curl that the API works with this syntax but when I implemented it into like this:
(function() {
superagent('GET', 'https://username:password@httpbin.org/anything')
.auth('Username', 'Password')
.type('application/json')
.then(res => {
console.debug('res', res);
})
.catch(err => {
console.debug('err', err)
});
})();
the API does not accept this anymore.
I contacted the developer of the API and he said the request did not contain the authentication information. I wonder if the browser somehow stripped it out? When accessing the URL directly in the browser it works, but is the browser converting it behind the scenes into a header?
Calling the URL in Firefox shows an authentication header but in chrome it does not. Either way both seem to work.