Skip to content

Option to enable authentication for all cargo API routes #176

@fsavy-tehtris

Description

@fsavy-tehtris

With the stabilization of credential-process in cargo, more routes can be protected with a token that cargo can provide. (this is kinda related to #93)

Are there any plans to add authentication to these other routes (I'm mostly interested in download)?

From a quick glance, I believe this could be achieved by adding an Auth parameter like it's done in publish:

pub(crate) async fn put(
State(state): State<Arc<AppState>>,
Auth(author): Auth,

We also probably need an additional configuration value to let users enable or disable this feature. Would you welcome a PR with such modifications?

Metadata

Metadata

Assignees

Labels

C-enhancementCategory: EnhancementM-apiModule: Programmatic APIP-mediumPriority: Medium

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions