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

login: allow passing additional args to provider #12499

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Aug 14, 2023

As part of moving asymmetric token support to a credential provider in #12334, support for passing --key-subject to cargo login was removed.

This change allows passing additional arguments to credential providers when running cargo login. For example:
cargo login -- --key-subject foo.

The asymmetric token provider (cargo:paseto) is updated to take advantage of this and re-enables setting --key-subject from cargo login.

r? @Eh2406

cc #8933

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-interacts-with-crates.io Area: interaction with registries A-registry-authentication Area: registry authentication and authorization (authn authz) Command-login S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2023
@arlosi arlosi removed the A-interacts-with-crates.io Area: interaction with registries label Aug 14, 2023
@rustbot rustbot added the A-interacts-with-crates.io Area: interaction with registries label Aug 14, 2023
@Eh2406
Copy link
Contributor

Eh2406 commented Aug 16, 2023

Looks good to me.

@ehuss
Copy link
Contributor

ehuss commented Aug 17, 2023

Seems reasonable to me.

@bors r=Eh2406

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

📌 Commit 589a111 has been approved by Eh2406

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2023
bors added a commit that referenced this pull request Aug 17, 2023
login: allow passing additional args to provider

As part of moving asymmetric token support to a credential provider in #12334, support for passing `--key-subject` to `cargo login` was removed.

This change allows passing additional arguments to credential providers when running `cargo login`. For example:
`cargo login -- --key-subject foo`.

The asymmetric token provider (`cargo:paseto`) is updated to take advantage of this and re-enables setting `--key-subject` from `cargo login`.

r? `@Eh2406`

cc #8933
@bors
Copy link
Collaborator

bors commented Aug 17, 2023

⌛ Testing commit 589a111 with merge 609ab73...

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

☀️ Test successful - checks-actions
Approved by: Eh2406
Pushing 609ab73 to master...

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@weihanglo
Copy link
Member

weihanglo commented Aug 17, 2023

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

See

@bors r=Eh2406

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

📌 Commit 589a111 has been approved by Eh2406

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

☀️ Test successful - checks-actions
Approved by: Eh2406
Pushing 37a0514 to master...

@bors bors merged commit 37a0514 into rust-lang:master Aug 17, 2023
19 checks passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 19, 2023
Update cargo

15 commits in 7c3904d6c3ed54e8a413023519b55a536ad44d5b..80eca0e58fb2ff52c1e94fc191b55b37ed73e0e4
2023-08-14 20:11:43 +0000 to 2023-08-19 00:52:06 +0000
- chore: Downgrade serde below the binary blob (rust-lang/cargo#12528)
- Improve error message for when no credential providers are available (rust-lang/cargo#12526)
- Fix typo: "use" -> "used" (rust-lang/cargo#12522)
- Document layout SemVer compatibility. (rust-lang/cargo#12169)
- Make cargo-credential-gnome-secret built-in as cargo:libsecret (rust-lang/cargo#12521)
- login: allow passing additional args to provider (rust-lang/cargo#12499)
- cargo-credential-gnome-secret: dynamically load libsecret (rust-lang/cargo#12518)
- credential-providers: make 1password no longer built-in (rust-lang/cargo#12507)
- Print environment variables for `cargo run` in extra verbose mode (rust-lang/cargo#12498)
- chore(cargo-util): bump version to 0.2.6 (rust-lang/cargo#12517)
- credential: rename cargo:basic to cargo:token-from-stdout (rust-lang/cargo#12512)
- fix(xtask-bump-check): query by package name to detect changes (rust-lang/cargo#12513)
- ci: use pull request head commit whenever possible (rust-lang/cargo#12508)
- Update hermit-abi (rust-lang/cargo#12504)
- Crate checksum lookup query should match on semver build metadata (rust-lang/cargo#11447)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 19, 2023
Update cargo

15 commits in 7c3904d6c3ed54e8a413023519b55a536ad44d5b..80eca0e58fb2ff52c1e94fc191b55b37ed73e0e4
2023-08-14 20:11:43 +0000 to 2023-08-19 00:52:06 +0000
- chore: Downgrade serde below the binary blob (rust-lang/cargo#12528)
- Improve error message for when no credential providers are available (rust-lang/cargo#12526)
- Fix typo: "use" -> "used" (rust-lang/cargo#12522)
- Document layout SemVer compatibility. (rust-lang/cargo#12169)
- Make cargo-credential-gnome-secret built-in as cargo:libsecret (rust-lang/cargo#12521)
- login: allow passing additional args to provider (rust-lang/cargo#12499)
- cargo-credential-gnome-secret: dynamically load libsecret (rust-lang/cargo#12518)
- credential-providers: make 1password no longer built-in (rust-lang/cargo#12507)
- Print environment variables for `cargo run` in extra verbose mode (rust-lang/cargo#12498)
- chore(cargo-util): bump version to 0.2.6 (rust-lang/cargo#12517)
- credential: rename cargo:basic to cargo:token-from-stdout (rust-lang/cargo#12512)
- fix(xtask-bump-check): query by package name to detect changes (rust-lang/cargo#12513)
- ci: use pull request head commit whenever possible (rust-lang/cargo#12508)
- Update hermit-abi (rust-lang/cargo#12504)
- Crate checksum lookup query should match on semver build metadata (rust-lang/cargo#11447)

r? ghost
@ehuss ehuss added this to the 1.73.0 milestone Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. A-interacts-with-crates.io Area: interaction with registries A-registry-authentication Area: registry authentication and authorization (authn authz) Command-login S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants