Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

セキュリティキーを登録できない #8691

Closed
u1-liquid opened this issue May 16, 2022 · 5 comments
Closed

セキュリティキーを登録できない #8691

u1-liquid opened this issue May 16, 2022 · 5 comments
Labels
🐛Bug Unexpected behavior packages/backend Server side specific issue/PR

Comments

@u1-liquid
Copy link
Contributor

💡 Summary

セキュリティキーを登録しようとすると
unsupported fmtというエラーが発生して登録できない
・エラーが発生してもエラーポップアップは発生してない

🥰 Expected Behavior

「セキュリティキーを登録する」ボタンを押すとセキュリティキーが登録される

🤬 Actual Behavior

image
「セキュリティキーを登録する」ボタンを押すとぐるぐるアニメーションが無限に発生する

以下のようなエラーがコンソールに残っている

Uncaught (in promise) 
Object
  code: "INTERNAL_ERROR"
  id: "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
  info:
    e:
      code: "Error"
      message: "unsupported fmt"
      stack: "Error: unsupported fmt\n    at file:///misskey/packages/backend/built/server/api/endpoints/i/2fa/key-done.js:64:15\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async default (file:///misskey/packages/backend/built/server/api/call.js:89:12)"
      [[Prototype]]: Object
    [[Prototype]]: Object
  kind: "server"
  message: "Internal error occurred. Please contact us if the error persists."
  [[Prototype]]: Object

📝 Steps to Reproduce

  1. セキュリティキー登録画面を開く
  2. セキュリティキーをタッチ、名前を入力
  3. 「セキュリティキーを登録する」ボタンを押す

📌 Environment

Misskey version: 12.110.1 (misskey.io)
Your OS: Windows 11 Pro 22H2 22621.1
Your browser: Google Chrome 103.0.5057.3(Official Build)dev (64 ビット)

@u1-liquid u1-liquid added the ⚠️bug? This might be a bug label May 16, 2022
@u1-liquid
Copy link
Contributor Author

現在未対応のAttestation値だったのが原因だった

標準のTR文書によると
https://www.w3.org/TR/webauthn-2/#sctn-attstn-fmt-ids

Attestation statement format identifierとして定義されてるのは

  • packed
  • tpm
  • android-key
  • android-safetynet
  • fido-u2f
  • none
  • apple

現在実装済みのAttestationは

export const procedures = {

  • packed
  • android-key
  • android-safetynet
  • fido-u2f
  • none

らしい

tpmとappleを実装すればいいのかな?

実装にあたって参考になりそうなレポジトリー
https://github.com/duo-labs/webauthn/tree/master/protocol

@u1-liquid
Copy link
Contributor Author

Misskeyのコード内で実装するよりこういったライブラリを使ったほうがメンテナンスに良さそう

クライアントサイド https://github.com/github/webauthn-json
サーバーサイド https://github.com/webauthn-open-source/fido2-lib

@tamaina
Copy link
Contributor

tamaina commented May 17, 2022

(自前実装なことにびっくりしている)

@4ioskd
Copy link

4ioskd commented May 28, 2022

同じく、自前実装ということにびっくり。

Roadmapの「(2) Improve functionality」に加えてはどうでしょうか。
https://github.com/misskey-dev/misskey/blob/develop/ROADMAP.md

(あとラベルはFeatureとか付けた方が良さそう?)

@syuilo
Copy link
Member

syuilo commented Sep 8, 2023

done

@syuilo syuilo closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior packages/backend Server side specific issue/PR
Projects
None yet
Development

No branches or pull requests

5 participants