gpt4 book ai didi

android - PublicKeyCredentials Webauthn "internal"身份验证在 Android (Android Saftynet) 上缺少 userHandle

转载 作者:行者123 更新时间:2023-12-05 00:17:52 24 4
gpt4 key购买 nike

我目前可以使用以下方法创建 publicKeyCredentials:

navigator.credentials.create({
challenge: Uint8Array.from('CCCCCCCCCCCCCCCCCCCCCC', c => c.charCodeAt(0)),
rp: {
id,
name: 'rpName'
},
user: {
id: Uint8Array.from('userHandleId', c => c.charCodeAt(0)),
name: 'userName',
displayName: 'DisplayName'
},
pubKeyCredParams: [{alg: -7, type: 'public-key'}],
authenticatorSelection: {
userVerification: 'discouraged',
authenticatorAttachment: 'platform',
requireResidentKey: true, // don't seem to do anything with android-saftynet
residentKey: 'required' // don't seem to do anything with android-saftynet
},
timeout: 60000,
attestation: 'direct'
})
然后使用以下命令检索凭证:
navigator.credentials.get({
publicKey: {
challenge: generateChallenge(),
allowCredentials: [{
id: decodeArray(id),
type: 'public-key'
}],
timeout: 60000,
transport: ['internal'],
userVerification: 'discouraged'
},
})
此流程适用于我所有的苹果设备,但是,在 Android 上,凭据的“fmt”是“android-saftynet”,它似乎不支持 userHandles。
我可以在 Android 上强制使用任何可以保存 userHandles 的格式吗?或者另一种使用 publicKeyCredential 存储信息以允许我支持无用户名 webauthn 流的方式?
编辑:看起来 android-saftynet 不支持 userHandle。有谁知道是否有支持 userHandle 的 Android 身份验证器流程? (除了 USB 身份验证流程)

最佳答案

证明(具有各种格式,例如 android-safetynet )和无用户名流是两个完全独立的概念。您可以在没有证明的情况下拥有无用户名流(格式 none )。
Attestation 允许您验证身份验证器本身 - 身份验证器是否实际上是 iPhone、Yubikey 或(非根)Android 设备,以及 key Material 的存储方式或指纹扫描仪的误报率等属性。更多详情见https://fidoalliance.org/fido-technotes-the-truth-about-attestation/https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651
在 WebAuthn 级别 1 中,即使用户代理不支持无用户名注册(使用 requireResidentKey: true),也允许继续进行(参见 authenticatorMakeCredential operation step 20)。在第 2 级中,发生了一些变化:

  • 常驻 key 现在称为客户端可发现凭据,
  • requireResidentKey bool 值更改为 residentKey枚举,但仍然支持向后兼容,
  • authenticatorMakeCredential操作已更改为在 step 4 中返回错误如果不支持客户端可发现凭据,
  • credProps extension添加以确定是否创建了客户端可发现凭据,无论是应 RP 的请求还是因为身份验证器选择(step 7.4)。

  • 在撰写本文时,使用 Chrome 97 的 Android 不支持无用户名身份验证(带有一个空的 allowCredentials 数组)。这是一个 known issue一阵子。

    关于android - PublicKeyCredentials Webauthn "internal"身份验证在 Android (Android Saftynet) 上缺少 userHandle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70773179/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com