Skip to content

Commit d4cad47

Browse files
committed
clarify that token scopes allow interacting with future matches
1 parent d0ee1db commit d4cad47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ the token can interact with. Crate names can contain `*` to match one or more
6969
characters.
7070

7171
For example, a crates scope of `serde,serde-*` allows the token to act on the
72-
`serde` crate or any crate starting with `serde-`, if the user is an owner of
73-
those crates.
72+
`serde` crate or any present or future crates starting with `serde-`, if the
73+
user is an owner of those crates.
7474

7575
The crates scope will allow access to all present and future crates matching
7676
it. When an endpoint that doesn't interact with crates is called by a token
@@ -132,9 +132,9 @@ foo,foo-*
132132
Any combination of those characters is allowed, but crates.io might define a
133133
complexity limit for the generated regular expressions.
134134

135-
Every time an endpoint acting on a crate is called the regex is desugared,
136-
compiled and used to match the crate name. If no match is found the request is
137-
denied.
135+
The pattern will be evaluated during each API call, and if no match is found
136+
the request will be denied. Because it's evaluated every time, a crates scope
137+
will allow interacting with matching crates published after token creation.
138138

139139
The check for the crates scope is separate from crate ownership: having a scope
140140
that technically permits to interact with a crate the user doesn't own will be

0 commit comments

Comments
 (0)