Skip to content

Commit 48d8cf4

Browse files
committed
token-scopes: Rephrase "crates scope" guide to only allow wildcards at the end
1 parent 67d07c6 commit 48d8cf4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

text/0000-crates-io-token-scopes.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ scope.
5656
The user will be able to opt into limiting which crates the token can act on by
5757
defining a crates scope.
5858

59-
The crates scope can be left empty to allow the token to act on all the crates
60-
owned by the user, or it can contain the comma-separated list of crate names
61-
the token can interact with. Crate names can contain `*` to match zero or more
62-
characters.
59+
The crates scope can contain a list of crate name patterns the token can
60+
interact with. Crate name patterns can either be regular crate names or they
61+
can end with a `*` character to match zero or more characters.
6362

64-
For example, a crates scope of `lazy_static,serde*` allows the token to act on
65-
the `lazy_static` crate or any present or future crates starting with `serde`
66-
(including `serde` itself), if the user is an owner of those crates.
63+
For example, a crate name pattern of `lazy_static` will only make the token
64+
apply to the corresponding crate, while `serde*` allows the token to act on
65+
any present or future crates starting with `serde` (including `serde` itself),
66+
but only if the user is an owner of those crates.
6767

6868
The crates scope will allow access to all present and future crates matching
6969
it. When an endpoint that doesn't interact with crates is called by a token
7070
with a crates scope, the crates scope will be ignored and the call will be
71-
authorized.
71+
authorized, unless limited by an endpoint scope (see above).
7272

7373
Tokens created before the implementation of this RFC will default to an empty
7474
crate scope filter (equivalent to no restrictions).

0 commit comments

Comments
 (0)