Commit 9a70996
committed
feat(webauthn): LargeBlobStorage trait + in-memory + authenticator backends
Adds the public `LargeBlobStorage` async trait alongside two bundled
implementations:
- `MemoryLargeBlobStorage`: a HashMap-backed store, primarily for tests.
- `AuthenticatorLargeBlobStorage<'_, C>`: drives the CTAP 2.1
`authenticatorLargeBlobs(get)` command, parses the serialized
largeBlobArray, locates the entry matching the supplied per-credential
`largeBlobKey` (AES-256-GCM authenticated decryption), and decompresses
the deflated plaintext.
Only the read path is implemented in this PR. `LargeBlobStorage::write`
returns `Unsupported` in both bundled backends; the chunked write path
with `pinUvAuthParam` binding is reserved for a follow-up.
Includes 14 unit tests covering: in-memory round-trip, AEAD round-trip,
wrong-key rejection, multi-entry array selection, corrupted/truncated
array rejection, empty array handling, and a MockChannel-backed end-to-end
test of the authenticator read flow.
Refs: WebAuthn L3 §10.5, CTAP 2.2 §6.10 / §6.10.4 / §11.4.1 parent 0a719ce commit 9a70996
4 files changed
Lines changed: 852 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
0 commit comments