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

TUF client should set (or enable application to set) HTTP user-agent #1139

Open
jku opened this issue May 3, 2023 · 1 comment
Open

TUF client should set (or enable application to set) HTTP user-agent #1139

jku opened this issue May 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jku
Copy link
Member

jku commented May 3, 2023

Description

Currently cosign user-agent when downloading TUF metadata is Go-http-client/2.0,gzip. It would be helpful if it had more details, something like cosign/2.0.2 go-tuf/0.5.2 Go-http-client/2.0 -- or whatever combination makes sense and is easy to implement.

cosign currently initializes the singleton TUF client with tuf.Initialize(ctx, mirror, rootFileBytes);. Code in this repository then ends up calling client.HTTPRemoteStore(mirror, nil, nil) from the go-tuf codebase: here the second argument is an options struct that could include the useragent.

So at least one option here would be to add an optional useragent argument to tuf.Initialize() so that cosign could use it.

@jku jku added the enhancement New feature or request label May 3, 2023
@haydentherapper
Copy link
Contributor

This would be great. @bobcallaway and I had actually discussed this previously when trying to figure out which clients were accessing the remote TUF repo. Specifying both the version of go-tuf and the library using it would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants