Skip to content

Commit beee863

Browse files
committed
Inside Rust: Add "API token scopes" blog post
1 parent 58d5332 commit beee863

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: post
3+
title: "API token scopes"
4+
author: Tobias Bieniek
5+
team: the crates.io team <https://www.rust-lang.org/governance/teams/crates-io>
6+
---
7+
8+
Roughly three years ago [Pietro Albini](https://github.com/pietroalbini) opened an RFC called ["crates.io token scopes"](https://github.com/rust-lang/rfcs/pull/2947). This RFC described an improvement to the existing API tokens, that everyone is using to publish crates to the [crates.io](https://crates.io/) package registry. The proposal was to make it possible to restrict API tokens to 1) certain operations and 2) certain crates.
9+
10+
Unfortunately, the crates.io team members were quite busy at the time, so it took a while for this proposal to get accepted. To be precise, during the [EuroRust](https://eurorust.eu) conference in October 2022 we talked about the RFC again and after a few modifications the RFC was moved into FCP status and then finally merged.
11+
12+
The implementation was started soon after, but was paused again due to other priorities at the time. Fortunately, I was lucky enough to get one of the software engineering jobs at the [Rust Foundation](https://rustfoundation.org/), so in early April the development continued, and I am happy to report:
13+
14+
**API token scopes on crates.io are now in a public beta testing period!**
15+
16+
For details on what these token scopes are and how they are supposed to work, I recommend reading through the [RFC](https://github.com/rust-lang/rfcs/pull/2947). If you want to try them out, you can go to <https://crates.io/settings/tokens/new> and create a new API token scoped to the operations and crates you want:
17+
18+
![Screenshot of the "New API Token" page](../../../../images/inside-rust/2023-05-09-api-token-scopes/screenshot.png)
19+
20+
Please note that this page is currently not reachable from the regular user interface, you have to access it via URL directly while we test it out.
21+
22+
Finally, if you notice any issues, or if you have any questions don't hesitate to find us on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/318791-t-crates-io/topic/token.20scopes) or open an issue on [GitHub](https://github.com/rust-lang/crates.io/issues/new/choose).
Loading

0 commit comments

Comments
 (0)