diff --git a/CHANGES/5819.bugfix b/CHANGES/5819.bugfix new file mode 100644 index 0000000000..3adab56b0d --- /dev/null +++ b/CHANGES/5819.bugfix @@ -0,0 +1 @@ +Add an `authentication_header` method to make JSONHeaderRemoteAuthentication return proper 401 when the request is not properly authenticated. diff --git a/pulpcore/app/authentication.py b/pulpcore/app/authentication.py index 93b0be8ce9..6187506e2b 100644 --- a/pulpcore/app/authentication.py +++ b/pulpcore/app/authentication.py @@ -72,3 +72,6 @@ def authenticate(self, request): _logger.debug(_("User {user} authenticated.").format(user=remote_user)) return (user, None) + + def authenticate_header(self, request): + return "JSONHeaderRemoteAuthentication"