bitwarden / passwordless-server

Bitwarden Passwordless.dev infrastructure/backend (API, database, Docker, etc).
https://bitwarden.com/
Other
83 stars 26 forks source link

PAS-494 | Passkey hints #648

Closed Tyrrrz closed 2 months ago

Tyrrrz commented 2 months ago

Ticket

Description

Adds support for Passkeys 3.0 credential hints.

Read more in the spec here: https://w3c.github.io/webauthn/#enumdef-publickeycredentialhints

Shape

Credential hints are set up as part of an authentication configuration, through the Admin Console.

Screenshots

image image image

Checklist

I did the following to ensure that my changes were tested thoroughly:

I did the following to ensure that my changes do not introduce security vulnerabilities:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 50.15015% with 498 lines in your changes missing coverage. Please review.

Project coverage is 34.76%. Comparing base (f1e518e) to head (ab8a26c).

Files Patch % Lines
.../Sqlite/20240722200755_CredentialHints.Designer.cs 0.00% 453 Missing :warning:
...figuration/AuthenticationConfigurationFormModel.cs 0.00% 12 Missing :warning:
...igrations/Sqlite/20240722200755_CredentialHints.cs 0.00% 11 Missing :warning:
...uration/CredentialHintStringValidationAttribute.cs 0.00% 4 Missing :warning:
...Migrations/Mssql/20240722200735_CredentialHints.cs 63.63% 4 Missing :warning:
...vice/Migrations/Mssql/MsSqlContextModelSnapshot.cs 0.00% 4 Missing :warning:
...ce/Migrations/Sqlite/SqliteContextModelSnapshot.cs 0.00% 4 Missing :warning:
...ttingsComponents/AuthenticationConfiguration.razor 0.00% 3 Missing :warning:
...onfiguration/AuthenticationConfigurationForm.razor 0.00% 1 Missing :warning:
...onfiguration/EditAuthenticationConfiguration.razor 0.00% 1 Missing :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #648 +/- ## ========================================== + Coverage 34.26% 34.76% +0.50% ========================================== Files 560 565 +5 Lines 29922 30901 +979 Branches 921 922 +1 ========================================== + Hits 10252 10743 +491 - Misses 19530 20018 +488 Partials 140 140 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

abergs commented 2 months ago

suggestion: We should add this to the docs and link to that section to make sure users understand what Hints are.

Tyrrrz commented 2 months ago

Tested network traffic, hints appear to be included:

image
Tyrrrz commented 2 months ago

suggestion: We should add this to the docs and link to that section to make sure users understand what Hints are.

Sure. I think we should do that as a separate task/PR though.

Tyrrrz commented 2 months ago

Fixed a merge conflict so need a re-approve