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

Allow requiring authentication for all operations #7091

Closed
jdemilledt opened this issue Jul 3, 2019 · 9 comments
Closed

Allow requiring authentication for all operations #7091

jdemilledt opened this issue Jul 3, 2019 · 9 comments
Labels
A-registries Area: registries C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@jdemilledt
Copy link

Describe the problem you are trying to solve
Currently, for methods such as search, cargo does not offer authentication to alternative registries. For companies with private projects, this is an issue.

Describe the solution you'd like
Have a config option (or automatically) to pass Authorization headers to all API functions.

Notes
Adds on to #6843.

@jdemilledt jdemilledt added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 3, 2019
@jdemilledt
Copy link
Author

I am beginning to program a solution to this.

@ehuss ehuss added the A-registries Area: registries label Jul 5, 2019
@ehuss
Copy link
Contributor

ehuss commented Jul 5, 2019

This may need an RFC process to move forward, since authentication can be a tricky thing, and different people may have different requirements.

I think ideally the authentication requirements for a registry would be defined in config.json. Just including the token in more requests would be trivial. But there may be more to do, and it would be good if was easy to extend in the future.

cc #6843

@jdemilledt
Copy link
Author

@TimDiekmann
Copy link
Member

TimDiekmann commented Sep 13, 2019

This may need an RFC process to move forward, since authentication can be a tricky thing, and different people may have different requirements.

Currently, all methods but search and download passes the authentication token. It's inconsistent to not pass it to those methods, and - as you mentioned - it would be trivial to implement it.

Sure, token based authentication won't fulfill all users need, but when another authentication method will be implemented, the other API methods has to be changed as well and the tokens may be used as default.

@mcorbin
Copy link

mcorbin commented Dec 12, 2019

I'm also waiting for this feature.
I had to disable authentication for search and download on my alternative registry, which feels a bit strange.

@lskillen
Copy link

👍 from us at @cloudsmith-io; we've got customers that have asked us to implement the search endpoints, but without authentication this makes it difficult to do that.

@superstator
Copy link

Has there been any progress made on this? We're trying to encourage rust/cargo adoption in a corporate environment (using Artifactory), but requiring anonymous access is a pretty big showstopper. Happy to chip in if there's an opportunity to help move it along!

@ehuss
Copy link
Contributor

ehuss commented Nov 18, 2021

There is currently an RFC up for review at rust-lang/rfcs#3139.

@ehuss
Copy link
Contributor

ehuss commented Mar 11, 2022

The RFC is now accepted. I'm going to close in favor of the tracking issue at #10474.

@ehuss ehuss closed this as completed Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-registries Area: registries C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

6 participants