[Extensions] Handle unknown extensions

未关闭
#81 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
rust

调研方向

首先跟踪 ClientExtensionParsing 和 ClientExtension trait,以及现有的扩展处理路径;issue 中没有指定文件或测试。定义未知扩展和输入解析失败时的行为,包括将未知数据保留为 CBOR、仅忽略失败的扩展,并继续处理 request。

由索引模型根据 Issue 内容生成。

描述

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?

  trait ClientExtensionParsing<G, C> where G: TryFrom<cbor::Map>, C: TryFrom<cbor::Map> {
    const MAKE_INPUT_KEY: &str;
    const GET_INPUT_KEY: &str;
  }
  trait ClientExtension<G, C>: ClientExtensionProcessing<G, C> + ClientExtensionParsing<G, C>

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

主要语言
Rust
星标
602
派生
33
平均合并
1 天 13 小时
30 天内合并 PR
9

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

linux-credentials/libwebauthn 的其他 Issue

查看 linux-credentials/libwebauthn 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。