Skip to content

Commit 0366cd5

Browse files
committed
elaborate on the value of challenges
1 parent f68ea33 commit 0366cd5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

text/0000-cargo-asymmetric-tokens.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ The registry server will validate the PASETO, and check the footer and claims:
123123

124124
See the [Appendix: Token Examples](#token-examples) for a walk through of constructing some tokens.
125125

126+
We recommend the use of challenges to prevent some replay attacks. For example, if I accidentally `unyank` a version and then realize my mistake and `yank` that version again, an attacker with a copy of the traffic could replay the `unyank` request, reverting my `yank`. This replay attack should be prevented by using single-use challenges that registries must invalidate when they are used.
127+
126128
## Credential Processes
127129

128130
Credential Processes as defined in [RFC 2730](https://github.com/rust-lang/rfcs/pull/2730) are outside programs cargo can call on to change where and how secrets are stored. That RFC defines `special strings` which go in the `credential-process` field to describe what data the process needs from cargo. This RFC adds `{claims}`. If used Cargo will replace it with a JSON encoded set of key value pairs that should be in the generated token. Cargo will check that the output of such a process looks like a valid PASETO v3.public token that Cargo would have generated, and that the PASETO token includes all the claims Cargo provided. The credential process may add additional claims (e.g. 2fa, TOTP), as long as they are nested in `custom`.

0 commit comments

Comments
 (0)