Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add showOptOut option to spec #215

Merged
merged 7 commits into from
Dec 9, 2022
Merged

Add showOptOut option to spec #215

merged 7 commits into from
Dec 9, 2022

Conversation

nickburris
Copy link
Member

@nickburris nickburris commented Nov 14, 2022

This PR adds spec text for a new showOptOut option in the SecurePaymentConfirmationRequest API. See the original proposal and discussion in #172. This spec change reflects the prototype currently implemented behind a flag in Chrome, which is available via origin trial and used in this test page.

The OptOutError mentioned in this change is being added to WebIDL in whatwg/webidl#1231.

Opt-out web platform test: web-platform-tests/wpt#37012


Preview | Diff

@nickburris nickburris marked this pull request as ready for review November 15, 2022 21:25
Copy link
Collaborator

@stephenmcgruer stephenmcgruer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nick! Some immediate comments about how we phrase this (sorry, specifications around UX are tricky :D)

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
@stephenmcgruer
Copy link
Collaborator

(cc @jcemer as an fyi)

@stephenmcgruer stephenmcgruer self-requested a review November 16, 2022 20:43
Copy link
Collaborator

@stephenmcgruer stephenmcgruer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nick! I think this LGTM modulo a few nits.

Can we link to the WPT test PR (once available) in the PR description here?

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
@stephenmcgruer
Copy link
Collaborator

+@ianbjacobs to review as well. Ian - I expect we will want to talk about this one in the WPWG?

Copy link
Collaborator

@ianbjacobs ianbjacobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request. I have a clarification request (must v. should) and suggest a privacy consideration addition. Thanks!

@ianbjacobs
Copy link
Collaborator

@stephenmcgruer, I will put this on the 8 December agenda.

@ianbjacobs
Copy link
Collaborator

ianbjacobs commented Nov 17, 2022

Some day I will learn to use GitHub. In the meantime, here were the comments I thought I left:

  • The proposal refers to this new feature using both "should" (twice) and "must." I recommend keeping the one "must" requirement and rewriting the other ones to be declarative, such as "provides the developer a way to ask the user agent to provide the user with an opportunity to indicate they wish to opt out of the relying party's storage of information."
  • I think the privacy considerations section should speak more directly to the fact that the opt out error lets the caller know the user has credentials, even though the user did not complete an authentication. I recommend including a statement about mechanisms that mitigate this (e.g., the user has taken explicit action via dedicated browser-owned UX).
  • Also, there is a "that that" in the proposal; drop one that. :)

@nickburris
Copy link
Member Author

Thanks! See updates to the privacy considerations section.

I think the privacy considerations section should speak more directly to the fact that the opt out error lets the caller know the user has credentials, even though the user did not complete an authentication. I recommend including a statement about mechanisms that mitigate this (e.g., the user has taken explicit action via dedicated browser-owned UX).

In our implementation we actually do not leak this information, since we also show the opt out option on the no-credential-found UX which already exists to mitigate credential probing attacks. I've added text to the privacy considerations section on this, good catch!

spec.bs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ianbjacobs ianbjacobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See one more editorial suggestion. Thanks!

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 17, 2022
Adds chromedriver support and web platform test for opt-out for SPC. The
WPT passes locally with SPC opt out enabled (currently disabled behind a
flag).

There's a small change in the SPC MVC logic, since opt-out can now
happen by calling SPCController::OnOptOut directly, which resulted in
the dialog view calling back to OnCancel when the dialog closes since it
didn't know opt-out was programmatically invoked. This is fixed by
having the controller set a bit on the model which the view checks.

Spec PR: w3c/secure-payment-confirmation#215
Bug: 1385865
Change-Id: I777e92b5110785415de68ef9f0497905598e4897
@nickburris
Copy link
Member Author

Thanks again! As mentioned we'll leave this open until discussion at WPWG 8 December meeting.

aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 18, 2022
Adds chromedriver support and web platform test for opt-out for SPC. The
WPT passes locally with SPC opt out enabled (currently disabled behind a
flag).

There's a small change in the SPC MVC logic, since opt-out can now
happen by calling SPCController::OnOptOut directly, which resulted in
the dialog view calling back to OnCancel when the dialog closes since it
didn't know opt-out was programmatically invoked. This is fixed by
having the controller set a bit on the model which the view checks.

Spec PR: w3c/secure-payment-confirmation#215

Bug: 1385865
Change-Id: I777e92b5110785415de68ef9f0497905598e4897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4030688
Commit-Queue: Nick Burris <[email protected]>
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1073462}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 18, 2022
Adds chromedriver support and web platform test for opt-out for SPC. The
WPT passes locally with SPC opt out enabled (currently disabled behind a
flag).

There's a small change in the SPC MVC logic, since opt-out can now
happen by calling SPCController::OnOptOut directly, which resulted in
the dialog view calling back to OnCancel when the dialog closes since it
didn't know opt-out was programmatically invoked. This is fixed by
having the controller set a bit on the model which the view checks.

Spec PR: w3c/secure-payment-confirmation#215

Bug: 1385865
Change-Id: I777e92b5110785415de68ef9f0497905598e4897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4030688
Commit-Queue: Nick Burris <[email protected]>
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1073462}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 18, 2022
Adds chromedriver support and web platform test for opt-out for SPC. The
WPT passes locally with SPC opt out enabled (currently disabled behind a
flag).

There's a small change in the SPC MVC logic, since opt-out can now
happen by calling SPCController::OnOptOut directly, which resulted in
the dialog view calling back to OnCancel when the dialog closes since it
didn't know opt-out was programmatically invoked. This is fixed by
having the controller set a bit on the model which the view checks.

Spec PR: w3c/secure-payment-confirmation#215

Bug: 1385865
Change-Id: I777e92b5110785415de68ef9f0497905598e4897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4030688
Commit-Queue: Nick Burris <[email protected]>
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1073462}
@nickburris
Copy link
Member Author

FYI I made a small change to update the naming convention in the TransactionAutomationMode enum to camelCase, per a recommendation in this comment which I'll follow up with an implementation change.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 21, 2022
…t out WPT, a=testonly

Automatic update from web-platform-tests
[SPC] Add Secure Payment Confirmation opt out WPT

Adds chromedriver support and web platform test for opt-out for SPC. The
WPT passes locally with SPC opt out enabled (currently disabled behind a
flag).

There's a small change in the SPC MVC logic, since opt-out can now
happen by calling SPCController::OnOptOut directly, which resulted in
the dialog view calling back to OnCancel when the dialog closes since it
didn't know opt-out was programmatically invoked. This is fixed by
having the controller set a bit on the model which the view checks.

Spec PR: w3c/secure-payment-confirmation#215

Bug: 1385865
Change-Id: I777e92b5110785415de68ef9f0497905598e4897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4030688
Commit-Queue: Nick Burris <[email protected]>
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1073462}

--

wpt-commits: 29d4f9513ad84c09f54199ffc157a0f9ce7d1e90
wpt-pr: 37012
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Nov 21, 2022
…t out WPT, a=testonly

Automatic update from web-platform-tests
[SPC] Add Secure Payment Confirmation opt out WPT

Adds chromedriver support and web platform test for opt-out for SPC. The
WPT passes locally with SPC opt out enabled (currently disabled behind a
flag).

There's a small change in the SPC MVC logic, since opt-out can now
happen by calling SPCController::OnOptOut directly, which resulted in
the dialog view calling back to OnCancel when the dialog closes since it
didn't know opt-out was programmatically invoked. This is fixed by
having the controller set a bit on the model which the view checks.

Spec PR: w3c/secure-payment-confirmation#215

Bug: 1385865
Change-Id: I777e92b5110785415de68ef9f0497905598e4897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4030688
Commit-Queue: Nick Burris <[email protected]>
Reviewed-by: Stephen McGruer <[email protected]>
Reviewed-by: Andrey Kosyakov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1073462}

--

wpt-commits: 29d4f9513ad84c09f54199ffc157a0f9ce7d1e90
wpt-pr: 37012
@stephenmcgruer
Copy link
Collaborator

@nickburris - fyi that this PR should also add a reference to the newly added WPT test (see c096e3b where I landed it as wpt hidden for now; we should un-hide it and move it wherever in the spec seems most relevant!)

@stephenmcgruer
Copy link
Collaborator

This was discussed today at the WPWG (minutes), and a resolution was taken to land it (once updated for the WPT test comment). We also heard interest in exploring clearer cancellation states for SPC, which we intend to discuss internally - but consider separate from this PR.

@nickburris
Copy link
Member Author

Sorry about the force push mess, one day I will get rebasing a fork right...

@nickburris - fyi that this PR should also add a reference to the newly added WPT test (see c096e3b where I landed it as wpt hidden for now; we should un-hide it and move it wherever in the spec seems most relevant!)

Done

@stephenmcgruer
Copy link
Collaborator

Sorry about the force push mess, one day I will get rebasing a fork right...

No problem! I also just rebased and forced-pushed it again, to pick up a fix I landed in main: 06a08c0

@stephenmcgruer
Copy link
Collaborator

@ianbjacobs - I think we're good to merge here, but will wait on you to confirm before I squash-merge it :)

@stephenmcgruer stephenmcgruer merged commit c24f564 into w3c:main Dec 9, 2022
github-actions bot added a commit that referenced this pull request Dec 9, 2022
SHA: c24f564
Reason: push, by stephenmcgruer

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Dec 9, 2022
SHA: c24f564
Reason: push, by stephenmcgruer

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants