diff --git a/CHANGES/1605.bugfix b/CHANGES/1605.bugfix new file mode 100644 index 000000000..564466c4f --- /dev/null +++ b/CHANGES/1605.bugfix @@ -0,0 +1,2 @@ +Fixed a bug that caused the registry to not accept requests from anonymous users when token +authentication was disabled. diff --git a/pulp_container/app/token_verification.py b/pulp_container/app/token_verification.py index 119a61f26..5e04fb2a6 100644 --- a/pulp_container/app/token_verification.py +++ b/pulp_container/app/token_verification.py @@ -74,6 +74,9 @@ def authenticate(self, request): If basic authentication could not success, remote webserver authentication is considered. """ + if request.headers.get("Authorization") == "Basic Og==": + return (AnonymousUser, None) + try: user = super().authenticate(request) except AuthenticationFailed: