Skip to content

Remove -Zasymmetric-token / cargo:paseto - #17486

Merged
Muscraft merged 1 commit into
rust-lang:masterfrom
epage:paseto
Sep 17, 2026
Merged

Muscraft merged 1 commit into
rust-lang:masterfrom
epage:paseto

Conversation

@epage

@epage epage commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This feature has been stale for s significant time. Since then, we've decided to improve security through:

  • trusted publishing
  • deprecating storing tokens in plain text, preferring OS native credential stores

Keeping it around has costs:

  • build time
  • test time
  • needs to be taken into account for any config system refactors

See also https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Should.20we.20drop.20paseto.3F/with/624770308

How to test and review this PR?

LLM disclosure: the initial draft was written by an LLM which I then reviewed and changed. @weihanglo has agreed to review this.

This feature has been stale for s significant time.
Since then, we've decided to improve security through:
- trusted publishing
- deprecating storing tokens in plain text, preferring OS native
  credential stores

Keeping it around has costs:
- build time
- test time
- needs to be taken into account for any config system refactors

See also https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Should.20we.20drop.20paseto.3F/with/624770308
@rustbot rustbot added A-configuration Area: cargo config files and env vars A-documenting-cargo-itself Area: Cargo's documentation A-interacts-with-crates.io Area: interaction with registries A-registry-authentication Area: registry authentication and authorization (authn authz) A-testing-cargo-itself Area: cargo's tests labels Sep 17, 2026
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

r? @Muscraft

rustbot has assigned @Muscraft.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Muscraft, @epage, @weihanglo
  • @Muscraft, @epage, @weihanglo expanded to Muscraft, epage, weihanglo
  • Random selection from Muscraft, weihanglo

@rustbot rustbot added A-unstable Area: nightly unstable support S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2026
Comment on lines -723 to 670
struct Mutation<'a> {
mutation: &'a str,
name: Option<&'a str>,
vers: Option<&'a str>,
cksum: Option<&'a str>,
}
struct Mutation {}

@epage epage Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured Some(Mutation) | None made intent in APIs more clear than true | false so I kept the struct around. I also considered an enum but felt this worked just as well and minimized the change

View changes since the review

@epage epage added the T-cargo Team: Cargo label Sep 17, 2026
Comment thread src/workspace/features.rs
// Please keep this list lexicographically ordered.
advanced_env: bool,
any_build_script_metadata: bool = ("Allow any build script to specify env vars via cargo::metadata=key=value"),
asymmetric_token: bool = ("Allows authenticating with asymmetric tokens"),

@epage epage Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing precedence fr removing a -Z besides stabilization. I could instead keep it and error on use. I started the PR in the simpler state.

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into what rustc does in this scenario and it appears they just go ahead and remove the -Z flag.

@Muscraft Muscraft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Muscraft
Muscraft added this pull request to the merge queue Sep 17, 2026
Merged via the queue into rust-lang:master with commit 8814ead Sep 17, 2026
31 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 17, 2026
@epage
epage deleted the paseto branch September 17, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-configuration Area: cargo config files and env vars A-documenting-cargo-itself Area: Cargo's documentation A-interacts-with-crates.io Area: interaction with registries A-registry-authentication Area: registry authentication and authorization (authn authz) A-testing-cargo-itself Area: cargo's tests A-unstable Area: nightly unstable support T-cargo Team: Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants