I did this
I expected the following
When allow_backup_eligible_upgrade is allowed finish_passkey_authentication() should return an AuthenticationResult to make it possible to actually upgrade backup_eligible
What actually happened
finish_passkey_authentication() returns the CredentialMayNotBeHardwareBound error, which makes it seemingly impossible to migrate those credentials.
Version (and git commit)
webauthn-rs 0.5.2 (tag 0.5.2)
Operating System / Version
Linux 6.15.9-zen1-1-zen
Any other comments
Is this the intended behavior or am I missing something here? Or is there some other way to update the credential before calling finish_passkey_authentication()?
Since the CredentialV3 didn't save the value of backup_eligible when it was originally registered, it is set to false in the conversion to CredentialV5. When it could have been true for that specific Passkey, when it was setup up originally.
This causes backup_state to be true, because the key had backup_eligible set to true internally and it got backed up. But the backup_eligible value on the server-side doesn't match since it never existed before the migration to CredentialV5 and is just assumed to be false
I did this
CredentialV3Passkey that was already backed up and therefore hasbackup_stateset totrue, stored for a user as their 2FA.CredentialV3toCredentialV5with Credential::from(other: CredentialV3)I expected the following
When
allow_backup_eligible_upgradeis allowedfinish_passkey_authentication()should return anAuthenticationResultto make it possible to actually upgradebackup_eligibleWhat actually happened
finish_passkey_authentication()returns theCredentialMayNotBeHardwareBounderror, which makes it seemingly impossible to migrate those credentials.Version (and git commit)
webauthn-rs 0.5.2 (tag 0.5.2)
Operating System / Version
Linux 6.15.9-zen1-1-zen
Any other comments
Is this the intended behavior or am I missing something here? Or is there some other way to update the credential before calling
finish_passkey_authentication()?Since the
CredentialV3didn't save the value ofbackup_eligiblewhen it was originally registered, it is set tofalsein the conversion toCredentialV5. When it could have beentruefor that specific Passkey, when it was setup up originally.This causes
backup_stateto be true, because the key hadbackup_eligibleset totrueinternally and it got backed up. But thebackup_eligiblevalue on the server-side doesn't match since it never existed before the migration toCredentialV5and is just assumed to befalse