powerdns-admin/powerdnsadmin
Mirko Vogt 282c630eb8 dyndns: Respond with HTTP header 'WWW-Authenticate' to unauthed requests
The common procedure for HTTP Basic Auth is that a client does /not/
immediately send out credentials via an 'Authorization'-header, but to
wait until the server tells the client to do so - which the server
indicates via the 'WWW-Authenticate'-header.

PowerDNS-Admin (and flask in general), though, abort the whole
communication if no Authorization header was found in the initial
request - resulting in '200 "badauth"'.

While this might work for /some/ HTTP clients - which right away add an
Authorization header crafted from provided credentials (via args or
extracted from given URL), this is /not/ standard and /not/ common.

Hence add the 'WWW-Authenticate'-header for every unauthenticated call
checking for dyndns authorisation.

Note, though, this changes the status code from 200 to 401 in this case,
which - given the explanation why 200 was chosen in the first place -
might cause side effects.
2021-10-20 15:12:17 +00:00
..
lib upd: improve user api (#878) 2021-03-16 19:39:53 +01:00
models Provision PDA user privileges based On LDAP Attributes (#980) 2021-08-05 19:37:48 +02:00
routes limit user to only create domains for the accounts he belongs to (#970) 2021-08-05 19:42:58 +02:00
services SAML improvements for Docker (#929) 2021-05-07 23:36:55 +02:00
static Offline installation and searchable inputs 2020-04-30 17:20:37 +00:00
templates Provision PDA user privileges based On LDAP Attributes (#980) 2021-08-05 19:37:48 +02:00
__init__.py Add punycode (IDN) support (#879) 2021-03-16 19:37:05 +01:00
assets.py Offline installation and searchable inputs 2020-04-30 17:20:37 +00:00
decorators.py dyndns: Respond with HTTP header 'WWW-Authenticate' to unauthed requests 2021-10-20 15:12:17 +00:00
default_config.py allow-server-side-sessions (#855) 2021-01-24 09:09:53 +01:00
swagger-spec.yaml upd: improve user api (#878) 2021-03-16 19:39:53 +01:00