-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unable to authenticate against the 8000 OpenShift internal registry using a token. #43319
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
Comments
It is very unlikely we could get anything for .NET 9 - we are locking down in like a week and the containers team has several other things we are driving on. If you could provide pointers to the spec or experiential data about how podman/docker do auth we could maybe change this, but auth is a very scary area to change because it's not under good testing in this repo. |
A .NET 9 patch release would be fine too. And the change would be adding a fallback, so that would minimize the risk of introducing a regression in the existing auth mechanisms. |
I'm going to make a PR against It would be nice if we don't have to wait for a .NET 10 SDK to have this fixed. Do you recall for what registry the handling of |
It's required for handling identity tokens when doing registry auth. You can see it in use at regclient. See docs at docekr cli and similar usage in the docker CLI. |
Fixed by #43491. |
The .NET SDK can't authenticate against the OpenShift image when the
auth.json
has anauth
that starts with<token>:
.This case is treated special here:
sdk/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs
Lines 321 to 323 in 3390aa4
The use of the
Bearer
scheme is causing the authentication to fail. When I change it toBasic
(that is: removing the special case) then the authentication works.With podman debug logging, there is a single GET call to the realm uri. I assume it immediately goes for the Basic auth.
@baronfel can we make the .NET 9 SDK capable of supporting this scenario by also trying basic auth for
<token>
? I can work on a PR.For .NET 10, perhaps we can take a closer look at how
docker
andpodman
do the auth and try to mimic their behavior?cc @omajid
The text was updated successfully, but these errors were encountered: