You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Spec] Remove references to create in cross origin iframe
The WebAuthn specification now allows credential creation in a cross origin
iframe, as of w3c/webauthn#1801. As such, SPC no longer
needs to override or add this behavior.
We do retain (for now) the ability for the `"payment"` permission policy to
allow credential create in an iframe, instead of requiring
`"publickey-credentials-create"`. This should be removed one day, but one
small step to unification at a time :).
There is a small web-compat issue here. In the case of no transient user
activation, the SPC specification used to throw a `SecurityError` error.
However WebAuthn throws a `NotAllowed` error instead. See also Chrome bug
https://crbug.com/41484826Fixes#267
:: When [[webauthn-3#sctn-createCredential|creating a new credential]]:
1042
1025
1043
-
1. Modify step 2 (the check for *sameOriginWithAncestors*) as follows:
1044
-
1045
-
* If *sameOriginWithAncestors* is `false`:
1046
-
1047
-
* If the [=relevant global object=], as determined by the calling
1048
-
{{CredentialsContainer/create()}} implementation, does not have
1049
-
[=transient activation=]:
1050
-
1051
-
* Return a {{DOMException}} whose name is "{{SecurityError}}", and
1052
-
terminate this algorithm.
1053
-
1054
-
* [=Consume user activation=] of the [=relevant global object=].
1055
-
1056
-
<wpt>
1057
-
enrollment-in-iframe.sub.https.html
1058
-
</wpt>
1059
-
1060
-
Note: This allows for creating SPC credentials in a cross-origin
1061
-
iframe, as long as the correct permission policy is set
1062
-
(see [[#sctn-permissions-policy]]). A [=transient activation=] is
1063
-
also required in this case to mitigate privacy risks; see
1064
-
[[#sctn-security-cross-origin-registration]].
1065
-
1066
1026
1. After step 3, insert the following step:
1067
1027
1068
1028
* If any of the following are true:
1069
1029
1070
-
* *options*["{{PublicKeyCredentialCreationOptions/authenticatorSelection}}"]["{{AuthenticatorSelectionCriteria/authenticatorAttachment}}"] is not "{{AuthenticatorAttachment/platform}}".
1071
-
* *options*["{{PublicKeyCredentialCreationOptions/authenticatorSelection}}"]["{{AuthenticatorSelectionCriteria/residentKey}}"] is not "{{ResidentKeyRequirement/required}}" or "{{ResidentKeyRequirement/preferred}}".
1072
-
* *options*["{{PublicKeyCredentialCreationOptions/authenticatorSelection}}"]["{{AuthenticatorSelectionCriteria/userVerification}}"] is not "{{UserVerificationRequirement/required}}".
1030
+
* *pkOptions*["{{PublicKeyCredentialCreationOptions/authenticatorSelection}}"]["{{AuthenticatorSelectionCriteria/authenticatorAttachment}}"] is not "{{AuthenticatorAttachment/platform}}".
1031
+
* *pkOptions*["{{PublicKeyCredentialCreationOptions/authenticatorSelection}}"]["{{AuthenticatorSelectionCriteria/residentKey}}"] is not "{{ResidentKeyRequirement/required}}" or "{{ResidentKeyRequirement/preferred}}".
1032
+
* *pkOptions*["{{PublicKeyCredentialCreationOptions/authenticatorSelection}}"]["{{AuthenticatorSelectionCriteria/userVerification}}"] is not "{{UserVerificationRequirement/required}}".
1073
1033
1074
-
then return a {{TypeError}}.
1034
+
then throw a {{TypeError}}.
1075
1035
1076
1036
Note: These values are hard-coded as that is what Chrome's initial implementation
1077
1037
supports. The current limitations may change. The Working Group invites implementers
@@ -1249,9 +1209,15 @@ contains the following members:
0 commit comments