-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegistryAuthentication fails to fall back to PulpRemoteUserAuthentication if no authorization header exists #1577
Labels
Comments
Example headers:
|
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 13, 2024
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 13, 2024
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 13, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are using anonymous tokens. In the end, authorized users cannot push or pull content from Pulp. closes pulp#1577
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 13, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes pulp#1577
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 16, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes pulp#1577
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 22, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes pulp#1577
lubosmj
added a commit
to lubosmj/pulp_container
that referenced
this issue
Apr 23, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes pulp#1577
lubosmj
added a commit
that referenced
this issue
Apr 23, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577
github-project-automation
bot
moved this from In Progress
to Done
in Pulp Container Roadmap
Apr 23, 2024
patchback bot
pushed a commit
that referenced
this issue
Apr 23, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
lubosmj
added a commit
that referenced
this issue
Apr 23, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
patchback bot
pushed a commit
that referenced
this issue
Jun 27, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
lubosmj
added a commit
that referenced
this issue
Jun 27, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
mdellweg
pushed a commit
that referenced
this issue
Dec 4, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
mdellweg
pushed a commit
that referenced
this issue
Dec 4, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
mdellweg
pushed a commit
that referenced
this issue
Dec 4, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
mdellweg
pushed a commit
that referenced
this issue
Dec 4, 2024
If the header is not valid, DRF returns None when calling the authenticate() method. This can cause troubles when users are leveraging the remote authentication because Pulp thinks they are anonymous users. In the end, authorized users cannot push or pull content from Pulp. This affects only admin users in scenarios where the token authentication is disabled. closes #1577 (cherry picked from commit b1c5d70)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
I believe any version of pulp-container that supports container push (for me, specifically 2.16.3)
Describe the bug
The following auth settings are set:
When trying to push container content (like blobs) to Pulp, authentication always fails even if REMOTE_USER is correctly set to 'admin'.
It's caused by the following:
pulp_container/pulp_container/app/token_verification.py
Lines 82 to 88 in ef0a194
If there is no auth header, or if it doesn't have "Bearer ..." in it,
super().authenticate(request)
returnsNone
instead of throwingAuthenticationFailed
. This in turn causes the AnonymousUser to be used instead of admin.The rules for returning
None
vs throwingAuthenticationFailed
are here: https://github.com/encode/django-rest-framework/blob/085b7e166ba80aa973645e5249b441f2dbdc0c96/rest_framework/authentication.py#L66-L67To Reproduce
Try to push container content, like blobs with the settings above. HTTP_REMOTE_USER should be set to 'admin'.
Expected behavior
Auth is successful
Additional context
This was tested on a Katello development install with in-development container push code. Ping me if anything should be tested on my environment.
The text was updated successfully, but these errors were encountered: