Skip to content

Commit

Permalink
api/challenge-response: document nonce size limits
Browse files Browse the repository at this point in the history
Document limitations for the nonce and nonceSize parameters
for /newSession requests.

Signed-off-by: setrofim <setrofim@gmail.com>
  • Loading branch information
setrofim committed Sep 28, 2023
1 parent 38646cd commit 55bd76d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions api/challenge-response/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ session expiry has elapsed.
}
```

`nonceSize` must be between `8` and `64`. Analogously, `nonce` must be between
8 and 64 bytes when decoded (which means the specified base64 string must be no
longer than 88 bytes).

### Asynchronous verification

* Submit evidence for this session:
Expand Down
5 changes: 3 additions & 2 deletions api/challenge-response/challenge-response.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ paths:
- name: nonceSize
in: query
description: >
number of bytes of the returned nonce
number of bytes of the returned nonce. Must be between 8 and 64.
required: false
schema:
type: integer
- name: nonce
in: query
description: >
the API server should not generate a nonce for this session and
use instead the one supplied by the client
use instead the one supplied by the client. The supplied value must
decode to a byte sequence between 8 and 64 bytes long.
required: false
schema:
type: string
Expand Down
3 changes: 2 additions & 1 deletion api/challenge-response/schemas/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ components:
type: string
format: byte
description:
base64 encoded 32, 48, or 64 bytes random value
base64 encoded random value. Must be between 8 and 64 bytes long in
its raw form (the base64 encoding must be no longer than 88 bytes).
example: MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=
expiry:
type: string
Expand Down

0 comments on commit 55bd76d

Please sign in to comment.