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

Permit user-agent configuration #240

Closed
taywrobel opened this issue Mar 12, 2021 · 1 comment · Fixed by oras-project/oras-go#5 or oras-project/oras-go#6
Closed

Permit user-agent configuration #240

taywrobel opened this issue Mar 12, 2021 · 1 comment · Fixed by oras-project/oras-go#5 or oras-project/oras-go#6

Comments

@taywrobel
Copy link

Currently ORAS uses containerd under the hood, which is setting the user agent to be the containerd default of containerd/{version} here - https://github.com/containerd/containerd/blob/38604a76ca9b1a7c3e00eeeb92d2d3975c76e5d1/remotes/docker/resolver.go#L144-L146

As a registry maintainer it'd be preferable to have ORAS extend or overwrite that user agent so that we can discern between different types of tooling.

Since ORAS can be used as a library, it'd also be fantastic if the end user could overwrite that value as well and have it propagate up, so that tooling which is wanting to use ORAS (i.e. Homebrew) would also be able to set their own user agent to a more context-appropriate value.

Containerd allows for overriding the user agent value when creating a Resolver by setting headers in the ResolverOptions.

Once the config is added, it should be able to be included in the docker resolver options here - https://github.com/deislabs/oras/blob/75801fef923e9d9945f512494f4790cdf1c022cd/cmd/oras/resolver.go#L18-L20

@jdolitsky
Copy link
Contributor

This can be achieved using LoginWithOpts for authn/authz requests and ResolverWithOpts for normal requests

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