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/remote: HTTP client with custom/authentication headers #99

Open
lucab opened this issue Jul 5, 2017 · 3 comments
Open

tuf/remote: HTTP client with custom/authentication headers #99

lucab opened this issue Jul 5, 2017 · 3 comments

Comments

@lucab
Copy link
Contributor

lucab commented Jul 5, 2017

I was looking into the feasibility of integrating this crate into a docker client, as the docker registry has a TUF-based trusted distribution extension called notary.

One initial issue I'm seeing is that the docker notary endpoints require authentication via HTTP header, but I'm not seeing any direct way of setting custom headers on the internally-built request. Do you have any suggestions in that direction? Should ConfigBuilder grow some way to take a third-party function which manipulate the RequestBuilder before sending it?

@heartsucker
Copy link
Contributor

heartsucker commented Jul 5, 2017

This likely wouldn't be compatible with Notary since the spec has moved on from a rigid definition of metadata fields, encodings, and data interchange formats. One consumer of this lib already had problems because this deviates from the Python reference implementation: #93

It is possible that Notary and the Python impl both followed an old version of the draft to the T and are compatible, but that likely would not be the case between future implementations.

However, if in general you want to be able to set custom headers, that should be possible.

@lucab
Copy link
Contributor Author

lucab commented Jul 6, 2017

Thanks for the forewarning, I literally just started scratching the surface of this so it may as well turn out to be non-compatible. I'll report back once I'll get interesting datapoints.

@heartsucker
Copy link
Contributor

heartsucker commented Jul 6, 2017

It actually looks like rustup is pinned to hyper 0.9.8 right now, so it would probably make more sense to have rust-tuf and rustup both meet at 0.10 instead of advancing them both to 0.11.

I opened an upstream issue to address that: rust-lang/rustup#1195

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

No branches or pull requests

2 participants