WebAuthn credential transport:將連線方式作為提示使用
WebAuthn credential descriptor 中的 `transports` 列出用戶端已知可能連到某項憑證的通訊方式,例如 `usb`、`nfc`、`ble`、`internal` 或 `hybrid`。這些提示不能證明憑證可信、屬於誰或目前可用,因此不要單獨將其作為存取控制依據。
WebAuthn credential transport:將連線方式作為提示使用
WebAuthn credential descriptor 中的 transports 列出用戶端已知可能連到某項憑證的通訊方式,例如 usb、nfc、ble、internal 或 hybrid。這些提示不能證明憑證可信、屬於誰或目前可用,因此不要單獨將其作為存取控制依據。
本文介紹 W3C WebAuthn Level 3 的 AuthenticatorTransport 和 credential descriptor。瀏覽器、作業系統和驗證器支援的值及行為可能不同。
transport 不等於 attachment
transports 協助用戶端尋找並連線驗證器。authenticatorAttachment 則另外回報成功操作使用的是平台驗證器(platform),還是可跨裝置使用的驗證器(cross-platform)。transport 值無法判定 attachment 類型或備份資格。同一憑證可能透過多種方式存取;這些值不是強度評分。
如何處理這些提示
可以將註冊時提供的 transport 提示與憑證紀錄一起儲存。不要把未驗證的瀏覽器或使用者輸入提升為信任政策。
在登入要求的 `allowCredentials` 項目加入已儲存提示,可能協助使用者代理尋找驗證器。缺少某個值不一定表示該方式無法使用。
不要只因提示未知或實際連線方式不同而拒絕驗證。用戶端成功後,RP 仍須驗證 assertion,包括簽章、challenge、origin 和 RP ID。
僅向使用者顯示已在支援環境確認可用的方式。不要推斷「USB 就代表公司擁有的驗證器」。
參考資料
W3C, [Web Authentication Level 3: Authenticator Transport](https://www.w3.org/TR/webauthn-3/#enumdef-authenticatortransport)
W3C, [Web Authentication Level 3: Credential Descriptor](https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialdescriptor)