Skip to content
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

issues working with the OpenShift internal image registry #466

Closed
tmds opened this issue Jun 23, 2023 · 10 comments · Fixed by dotnet/sdk#33753
Closed

issues working with the OpenShift internal image registry #466

tmds opened this issue Jun 23, 2023 · 10 comments · Fixed by dotnet/sdk#33753

Comments

@tmds
Copy link
Member

tmds commented Jun 23, 2023

OpenShift container platform comes with an internal image registry.

I tried using the sdk container tooling with it and ran in two authentication related issues:

The registry doesn't include service on the WWW-Authenticate header. andAuthHandshakeMessageHandler handles this as a required parameter.
Maybe we can relax this, and treat is similar to scope?

When the blob uploads are performed, the registry doesn't like receiving a blob without an authentication header. It forcibly closes the TCP connection. In this case the AuthHandshakeMessageHandler won't make another attempt to add an authentication header.
Probably by the time we're uploading blobs we can add the authentication headers on the first request?
That will also save a round-trip to the server.

cc @baronfel

@baronfel
Copy link
Member

I think the first problem (missing service) is included in dotnet/sdk#32371 as part of another issue reported on this repo, and the second problem (missing auth header) is part of dotnet/sdk#33500 - want to take a look at those and see if that assessment matches what you see?

@tmds
Copy link
Member Author

tmds commented Jun 26, 2023

I think the first problem (missing service) is included in dotnet/sdk#32371 as part of another issue reported on this repo,

The internal registry doesn't include the service on the Bearer. This will fix it: https://github.com/dotnet/sdk/pull/32371/files#r1241825861

@tmds
Copy link
Member Author

tmds commented Jun 26, 2023

the second problem (missing auth header) is part of dotnet/sdk#33500

👍 Yes, this fixes the issue with the upload by using the the cached header.

@baronfel
Copy link
Member

dotnet/sdk#32371 is almost certainly not going to make 7.0.400, but we should retarget it and try to get it into 8.0.100. The auth header part of this issue has been merged now.

@tmds
Copy link
Member Author

tmds commented Jun 29, 2023

dotnet/sdk#32371 is almost certainly not going to make 7.0.400, but we should retarget it and try to get it into 8.0.100. The auth header part of this issue has been merged now.

I've included a suggestion that will fix the issue with the OpenShift internal registry: https://github.com/dotnet/sdk/pull/32371/files#r1241825861.

If it would be of help, I can port the PR to 8.0.

@baronfel
Copy link
Member

That would be lovely @tmds. The real blocker is I am having a hard time getting the test working in CI - the test is supposed to configure and run a local registry that is configured to trigger the problem (a non-URI realm) and then verify that we can still communicate with the local registry, but the CI runner isn't correctly standing up the local registry.

@tmds
Copy link
Member Author

tmds commented Jun 30, 2023

I'll look into this next week.

@baronfel
Copy link
Member

baronfel commented Aug 9, 2023

@tmds had a chance to validate this in the live version of the container tooling? I expect it to work great, just looking to close out old issues.

@baronfel baronfel added this to the 8.0.100 milestone Aug 9, 2023
@tmds
Copy link
Member Author

tmds commented Sep 8, 2023

I ran the tooling successfully against the internal registry.

@tmds tmds closed this as completed Sep 8, 2023
@baronfel
Copy link
Member

baronfel commented Sep 8, 2023

Love to see it 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants