-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Set custom registryAuthorizer for Go client #12584
Comments
Thanks, a PR for this would be welcome I think. #12144 never received any follow up, so aged out.
Keep in mind, a PR to allow supplying a customer authorizer would only help SDK users. For the Helm CLI, this logic is going to be necessarily fixed. |
Fixes: helm#12584 This change makes the authorizer and registryAuthorizer of the registry client configurable via options. This allows Go SDK users to override the authentication behavior of the client. This PR makes both the authorizer and registryAuthorizer configurable because depending on the exact scenario that may be needed. The default registryAuthorizer only supports a specific implementation of the authorizer.
This is OK for my usecase 👍 PR is here: #12588 I verified this locally with the following code in my repo: hc := helm.Configuration{}
// Create a new client that **will not** use authentication. This prevents
// the user's stale credentials from being used.
client, err := registry.NewClient(registry.ClientOptAuthorizer(&dockerauth.Client{}))
if err != nil {
return nil, err
}
hc.RegistryClient = client |
Fixes: helm#12584 This change makes the authorizer and registryAuthorizer of the registry client configurable via options. This allows Go SDK users to override the authentication behavior of the client. This PR makes both the authorizer and registryAuthorizer configurable because depending on the exact scenario that may be needed. The default registryAuthorizer only supports a specific implementation of the authorizer. Signed-off-by: Ryan Nowak <[email protected]>
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs. |
I have a similar use case and I'm excited to see #12588 is targeted for the 3.15 / May 8 milestone. I see it was approved last year but not merged -- is there anything still holding it back? |
Fixes: helm#12584 This change makes the authorizer and registryAuthorizer of the registry client configurable via options. This allows Go SDK users to override the authentication behavior of the client. This PR makes both the authorizer and registryAuthorizer configurable because depending on the exact scenario that may be needed. The default registryAuthorizer only supports a specific implementation of the authorizer. Signed-off-by: Ryan Nowak <[email protected]>
@gjenkins8 as you mentioned here, there's still need for a fix to to avoid using stale credentials. Is there another issue tracking that, or? |
Summary
We're encountering issues doing a programmatic pull from
ghcr.io
. Specifically, the user might have cached or stale credentials in their docker credential store. The default Helm client will send these credentials even if they are known to be expired.Our chart is public, and we would be unblocked if we could force the Helm client to use anonymous access.
Solutions
I found this issue: #12144 which seems similar.
If we could override the authorizer using options here then I think this would do what we wanted.
Are you open to a PR that adds an option for this?
I'm thinking it will look something like this:
The text was updated successfully, but these errors were encountered: