Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A native Android app can run passkey ceremonies through Android Credential Manager (for example WebAuthn in a WebView, or the Credential Manager API, with the app linked to the RP domain through Digital Asset Links). For these, the client data origin is not an
https:URL. It isandroid:apk-key-hash:<hash>, where<hash>is the base64url SHA-256 of the app signing certificate, without padding (43 characters). The relying party must list this origin to verify the reply. See Android's Create a passkey: verify on the app server, which builds this origin from the certificate fingerprint and tells the server to accept it.Today
validatePasskeyPolicy(@yielded/auth) andvalidateSimpleWebAuthnProfile(@yielded/auth-simplewebauthn) parse every origin as a URL and requirehttps:on the RP ID host, so a profile that lists the Android origin fails withPasskeyConfigurationError.This change accepts an origin that matches exactly
^android:apk-key-hash:[A-Za-z0-9_-]{43}$in both checks. Any other non-URL origin still fails. The origin is still an exact allowlist entry: the verifier compares the client data origin to the configured list as before, and the RP ID hash check does not change.The rule is a small regex in each package, not a new shared export, to keep the public API the same.