linux-credentials / linux-credentials/libwebauthn

[Extensions] Handle unknown extensions

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
579
Forks
27
Avg merge
4d 6h
Merged PRs (30d)
1

Description

Extensions unknown to the client should be passed through as CBOR. Maybe the trait itself could expose the expected input key, and if no extension is found, the extension data can be passed as-is?
```rust
trait ClientExtensionParsing where G: TryFrom, C: TryFrom {
const MAKE_INPUT_KEY: &str;
const GET_INPUT_KEY: &str;
}
trait ClientExtension: ClientExtensionProcessing + ClientExtensionParsing
```

Ideally, if we fail to parse input for an extension, we should ignore the individual extension - but continue with the rest of the request. Maybe the trait for each extension could be generic over its input type, and perform parsing, with a Result so the caller can handle these errors appropriately?

_Originally posted by @AlfioEmanueleFresta in https://github.com/linux-credentials/libwebauthn/issues/77#issuecomment-2674105649_

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 tracing the ClientExtensionParsing and ClientExtension traits and the existing extension processing path; no files or tests are named in the issue. Define the behavior for unknown extensions and input parse failures, including preserving unknown data as CBOR, ignoring only the failing extension, and continuing the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication, 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.