-
Notifications
You must be signed in to change notification settings - Fork 642
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
Add nerdctl version to User-Agent header #704
base: main
Are you sure you want to change the base?
Conversation
Why do you need to distinguish? |
Hey @AkihiroSuda, Our apologies for not explaining this super clearly; we’ll be sure to open issues for changes like this first next time. We’d like to see nerdctl have a distinct User-Agent for the same reasons we’d like to see other clients have distinct User-Agent strings: (a) if our customers use nerdctl and run into problems, a distinct User-Agent string helps us isolate relevant logs so we can more effectively troubleshoot and reproduce any behavior, and (b) understanding usage of different clients (like nerdctl) helps us understand if there are additional features we can develop for the registry or if there are opportunities for us to help out in the clients themselves. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, NOTLGTM.
I don't think we should leak unnecessary information that can be used for identifying users (and also for finding vulnerable versions of clients, potentially) without the user's consent.
Maybe we can extend EDIT: |
Further discussion is on containerd/containerd#6474. I'd still like to see this change made as I think that having nerdctl version information is valuable to the ecosystem at large. |
Another issue I have encountered that this will solve is that the User-Agent header is the default "Go-http-client" when executing a nerdctl login command. |
Signed-off-by: Ziwen Ning <[email protected]>
Curious what is our thinking overall on this now, and if it has evolved over the last 3 years. Personal 2 cents:
Now:
Where do you folks stand? |
At least we should hide the git commit hash Not just for anonymity... |
Yep. I must say I am ambivalent on this. I do definitely support using a specific UA for point b. mentioned above as I said - but I do think server-side behavioral adaptation based on UA sniffing is just abhorrent (there is a reason the frontend world moved to feature testing rather than UA sniffing, and that any operator worth their salt are instead looking at request urls and overall behaviors rather than UA). Someone in the kube discussion you provided is saying just as much - waf rules on UA are idiotic and very easy to workaround. |
Integrating That will make @samuelkarp would that change on |
Right now, nerdctl reports its user-agent string as "containerd/${containerd_version}`, so container registries can't distinguish nerdctl pulls from containerd pulls. It would be useful to re-set the user-agent as "nerdctl/${nerdctl_version} containerd/${containerd_version}".
Signed-off-by: Ziwen Ning [email protected]