-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-registry-authenticationArea: registry authentication and authorization (authn authz)Area: registry authentication and authorization (authn authz)Command-ownerCommand-yankS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Problem
In #15057 and #16046 , we deprecated cargo login <token>
and cargo publish --token
to avoid tokens being in shell history. There are still places we accept or even require --token
.
- feat (publish): deprecate
--token
option #16046 (comment) pointed out thatcargo yank
andcargo owner
still accepts--token
. - @omskscream also pointed outs the
--index
option requires--token
to be specified. I personally forgot the reason:cargo/src/cargo/ops/registry/mod.rs
Lines 132 to 134 in 029de48
if is_index && token_required.is_some() && token_from_cmdline.is_none() { bail!("command-line argument --index requires --token to be specified"); }
Proposed Solution
Soft-Deprecate them
- For
cargo yank
andcargo owner
, hide them from doc and help manual. When being used, print a warning. ForSee Soft-deprecate the--index
requiring--token
, figure out why we needed it, and suggest an alternative if possible--token
flag everywhere #16049 (comment) and Soft-deprecate the--token
flag everywhere #16049 (comment)
Metadata
Metadata
Assignees
Labels
A-registry-authenticationArea: registry authentication and authorization (authn authz)Area: registry authentication and authorization (authn authz)Command-ownerCommand-yankS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.