mozilla / mozilla/authenticator-rs

Should we double-check attestation flags when serializing?

Open
#233 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
316
Forks
82
Avg merge
4d 20h
Merged PRs (30d)
1

Description

Regarding these TODOs:

The security device sends us a CTAP-response that contains both the flags (AT: response contains credential data, ED: response contains extensions) and the actual data. We deserialize that into a Rust struct.
We are then serializing it again into a different format, the one webauthn requires. The way we currently do it, is to just serialize the flags as given and check if our Rust-struct contains either credential data or extensions, and serialize them, too.

That means, we trust the device to set the correct flags, instead of double-checking them (== "is the AT-flag really set, if we have credential data?"). But when we start double-checking everything the device sends us, there will be a lot of sanity check code necessary.
I therefore think we can "just trust" the device here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the TODOs and changes referenced in pull request #230, then trace how CTAP response flags and credential or extension data are deserialized and serialized into the WebAuthn format. Determine whether consistency checks are required or whether trusting the security device is intentional; done should include a documented decision and any agreed validation work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.