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

Changes resulting from 28 February PING privacy review #843

Merged
merged 18 commits into from
Mar 12, 2019

Conversation

ianbjacobs
Copy link
Collaborator

@ianbjacobs ianbjacobs commented Mar 1, 2019

@rsolomakhin, @danyao, @marcoscaceres,

Based on discussion at the Privacy Interest Group call yesterday, I took an action to propose some changes; see the minutes for details:
https://www.w3.org/2019/02/28-privacy-minutes

Specifically:

  • Merged the "Privacy and Security Considerations" and "Privacy Considerations" sections into a single section ("Privacy and Security Considerations").

  • Added a forward pointer from 3.5 to the canMakePayment() protections section (in security and privacy considerations). Removed the Note that was in the middle of the algorithm of 3.5, and merged it with the (rewritten) canMakePayment protections section.

  • Expanded the canMakePayment protections section based on PING conversation.

The following tasks have been completed:

  • Confirmed there are no ReSpec errors/warnings.
  • Has undergone security/privacy review (link)

NOTE: I will also point PING at the edit.


Preview | Diff

 https://www.w3.org/2019/02/28-privacy-minutes

Specifically:

 * Merged the "Security and Privacy" and "Privacy" considerations sections
  into a single "Security and Privacy Considerations"

 * Added a forward pointer from 3.5 to the canMakePayment() protections section (in security and privacy considerations). Removed the Note in the algorithm of 3.5, and merged it with the (rewritten) protections section.

 * Expanded the canMakePayment protections section based on PING conversation.
@npdoty
Copy link

npdoty commented Mar 1, 2019

Combining the privacy and security considerations section and the privacy considerations section has one problem: the high-level category is listed as non-normative, but some of the subsections have normative requirements in them. I think you could fix that by removing the marking of the high-level section as informative, and then evaluating each subsection to see whether it's informative or normative.

Copy link
Collaborator

@rsolomakhin rsolomakhin left a comment

Choose a reason for hiding this comment

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

Addition to "canmakepayment-protections" section LGTM

@ianbjacobs
Copy link
Collaborator Author

@npdoty, thanks for catching that. I have adopted your proposal. I do not believe I have changed what was already the case - a single normative section under Security and Privacy Considerations.

@marcoscaceres
Copy link
Member

Thanks for making a start on this! I’ll try to review it over the weekend.

@pes10k
Copy link

pes10k commented Mar 2, 2019

Thanks much for these @ianbjacobs.

  1. Under mitigations / protections, I'm wondering if there isn't the possibility for greater protections / stronger suggestions here. For example, is there any plausible any scenario where multiple iframes would need to call the canMakePayment endpoint in the same top-level context?

  2. What are the avenues for suggesting / proposing that the mitigations become normative?

  3. @samuelweiler had suggestions / concerns about the current proposal and negotiating what payment fields are shared (looks like the options argument would be a natural fit). Will that be part of these changes?

Thanks much!

@ianbjacobs
Copy link
Collaborator Author

HI @snyderp,

Under mitigations / protections, I'm wondering if there isn't the possibility for greater protections /
stronger suggestions here. For example, is there any plausible any scenario where multiple iframes
would need to call the canMakePayment endpoint in the same top-level context?

That was one of the suggestions from the call that made it into the pull request: to limit in the face of multiple calls with different parameters from the top-level browsing context. Are there concrete text suggestions you have for making that clearer?

What are the avenues for suggesting / proposing that the mitigations become normative?

We can continue to discuss them on this thread. I think if the implementers agree that a given mitigation should be standardized, then I expect we can add it. However, I would not expect that to happen in version 1.

@samuelweiler had suggestions / concerns about the current proposal and negotiating what
payment fields are shared (looks like the options argument would be a natural fit). Will that be
part of these changes?

I would not expect negotiation of which data is shared to be a version 1 feature of Payment Request API. That has not been part of the specification to date and I think we would need to have more discussion of real-world payment systems. Sam has opened a new issue where have started discussion:
#842

A related topic (outside of Payment Request API) involves device fingerprinting (through JavaScript and other mechanisms). Our ongoing discussions in the working group involve topics like how to manage user privacy preferences with demands for data from risk engines.

Ian

@pes10k
Copy link

pes10k commented Mar 4, 2019

@ianbjacobs

That was one of the suggestions from the call that made it into the pull request: to limit in the face of multiple calls with different parameters from the top-level browsing context. Are there concrete text suggestions you have for making that clearer?

I see the "For example, a user agent may restrict the number of successful calls that can be made based on the top-level browsing context" text. I'm not sure I understand the "successful calls" text there. Whats an "unsuccessful" call? If "unsuccessful" means canMakePayment returns false, then merely rate-limiting on "successful" calls won't do much to reduce its finger-print-ability. Apologies if I'm miss understanding but could you explain / clarify whats meant here?

A related topic (outside of Payment Request API) involves device fingerprinting (through JavaScript and other mechanisms). Our ongoing discussions in the working group involve topics like how to manage user privacy preferences with demands for data from risk engines.

Great! Where is the best place to stay up to date on these discussions?

@ianbjacobs
Copy link
Collaborator Author

Hi @snyderp,

I'll start by saying that this topic has been a challenging one for the Working Group, and new ideas are welcome. We are relying on implementaitons to help mitigate abuse while at the same time responding to merchant requirements to be able to decide what checkout experience they can provide that will afford the least friction.

The particular text that you are referring to no longer exists in my pull request. However, it may be that you have the same question over the new text.

I invite @marcoscaceres, @rsolomakhin, @danyao, and @aestes to weigh in on their implementation experience.

There have been other ideas on this topic that have not gained traction for other reasons; see #777 for example.

Regarding data gathering for risk analysis, that seems to lie partly within the scope of several W3C groups. The Web Payments WG has had some discussions with EMVCo about 3-D Secure, which gathers some data. We've also chatted with the Web Authentication Working Group about whether WebAuthn (e.g., attestations) might be helpful in reducing reliance on JavaScript. And FIDO and EMVCo are also discussing that topic.

To help facilitate some of these conversations we have been discussing the creation of a W3C Interest Group on Web payment security. A draft charter was reviewed by the W3C Membership, EMVCo Board, and FIDO Board; we are currently addressing feedback.

In short: I would like to make it easier to discover and participate in Web payment security topics. I hope this proposed IG can help fulfill that goal.

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

FWIW, rate limiting still feels ineffectual.

index.html Outdated
<li>allowing the user to configure the user agent to turn off
<a>canMakePayment()</a>;
</li>
<li>informing the user when <a>canMakePayment()</a> is called;
Copy link
Member

Choose a reason for hiding this comment

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

This seem impractical. I'm against including this suggestion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

after reading the privacy minutes, I actually think this is an OK idea and npdoty questions was good.

Pros:

  • Website are likely to be calling this method more responsibly if there is a little UI indication to the users and only do so in the right page and time where users expect this to happen and checkout.

Cons:

  • Some users might freak out if they see such a UI notification or indication. there has to be a lot of carefulness and UX research from implementers side how to present this.

Why does it seem impractical?

Copy link

Choose a reason for hiding this comment

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

I'm in favor of it too. Short of standardizing the mitigations (which would be better, but seems to be off the table), including the above seems like a second best option

index.html Outdated
</p>
<ul data-link-for="PaymentRequest">
<li>allowing the user to configure the user agent to turn off
<a>canMakePayment()</a>;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<a>canMakePayment()</a>;
<a>canMakePayment()</a>.

index.html Outdated
</li>
<li>informing the user when <a>canMakePayment()</a> is called;
</li>
<li>rate-limiting the frequency of calls to <a>canMakePayment()</a>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<li>rate-limiting the frequency of calls to <a>canMakePayment()</a>
<li>Rate-limiting the frequency of calls to <a>canMakePayment()</a>

index.html Outdated
For rate-limiting the user agent might look at repeated calls from:
</p>
<ul>
<li>the same effective top-level domain plus one (eTLD+1);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<li>the same effective top-level domain plus one (eTLD+1);
<li>the same effective top-level domain plus one (eTLD+1).

index.html Outdated
<ul>
<li>the same effective top-level domain plus one (eTLD+1);
</li>
<li>the top-level browsing context;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<li>the top-level browsing context;
<li>the top-level browsing context - or block access to the API entirely for origins know to be bad actors.</li>

@pes10k
Copy link

pes10k commented Mar 5, 2019

@ianbjacobs

Thanks again for the reply. Sure enough, i was looking at the wrong text. Thanks for the clarification!

One other item related to mitigations, and one more reason you may want to include mitigation standardization in v1 (even if it slows things down): how does the user agent signal to the website "I am interested in using the Payment API, but I don't want to allow the fingerprinting risk implied by canMakePayment."?

Say the user agent is operating in this privacy-protecting state and takes some of the mitigation steps mentioned in the text, and turns canMakePayment off (e.g. "allowing the user to configure the user agent to turn off"). Is there some way the UA can say "ask me explicitly what I support, by sending me a form, or similar, but no passive techniques"? I dont see anyway to express this in the API as described.

Throwing SecurityError seems semantically wrong (there is no security related issue in this scenario). The NotAllowedError is only specified for the rate limit case. And in either case, the website might reasonably interpret the response to be "UA never allows using Web Payment API" or "i've been rate limited", instead of "UA doesn't allow the website to ask what payment methods are supported, passively." In which case, the canMakePayment functionality, as currently imagined might increase friction (since the site could assume Web Payments is disabled).

I suggest adding an additional exception type, or return value to the canMakePayment promise indicating "user is still interested in Web Payments, but no background / passive checking, to maximize use of Web Payments API. Thoughts?

@marcoscaceres
Copy link
Member

I suggest adding an additional exception type, or return value to the canMakePayment promise indicating "user is still interested in Web Payments, but no background / passive checking, to maximize use of Web Payments API. Thoughts?

The use case remains that "can make payment?" is intended to be used to present, for example, an Google Pay specific button directly in the web page. Asking the user is not practical, because the site is effectively "port scanning" what supported payment methods are.

I think the only feasible solution here is for the user to have control over this (like Safari does). Basically, an opt-in this check:

"[ ] Tell sites I support "basic-card" (when not in Private Browsing mode)."

@marcoscaceres
Copy link
Member

This is how Safari works:

screenshot 2019-03-05 16 12 37

@pes10k
Copy link

pes10k commented Mar 5, 2019

@marcoscaceres

I dont we're disagreeing. The correct answer is definitely to prompt, and to effectively not allow anything like how canMakePayment is designed. We discussed this on the PING call.

But, whether or not canMakePayment comes out or always leads to a prompt, or whatever else, i'm saying there needs to be more granularity in the reason the user is not returning accurate info on canMakePayment. That there needs to be a way to explicitly say to the site "i'm not going to tell you the payment methods I support passively, but I would still like to use the Web Payments API checkout flow."

@marcoscaceres
Copy link
Member

That there needs to be a way to explicitly say to the site "i'm not going to tell you the payment methods I support passively, but I would still like to use the Web Payments API checkout flow."

heh, returns "maybe" :) But seriously, it's why in Firefox we always lie and just return true.

@pes10k
Copy link

pes10k commented Mar 5, 2019

@marcoscaceres that seems like a reasonable approach, but suggests it shouldn't be in the standard in the first place :)

Brave will very likely do something similar. Is anyone familiar with what Safari is planning on doing for non-Apple pay methods?

@aestes
Copy link
Collaborator

aestes commented Mar 5, 2019

Is anyone familiar with what Safari is planning on doing for non-Apple pay methods?

Currently, Safari's only supported payment method is Apple Pay.

- Removed "alert the user" as an idea; deemed impractical
@rsolomakhin
Copy link
Collaborator

@snyderp wrote:

Whats an "unsuccessful" call?

Rejecting canMakePayment with NotAllowedError and a message Exceeded query quota.

@pes10k
Copy link

pes10k commented Mar 5, 2019

Currently, Safari's only supported payment method is Apple Pay.

Thanks! I should have asked differently though: Does anyone know who, other than Chrome, plans to implement the spec / canMakePayment as described in the document? Sounds like definitely not Firefox, definitely not Brave, and maybe not Apple?

@rsolomakhin
Copy link
Collaborator

@snyderp : Which part of the spec differs among the implementations?

From https://w3c.github.io/payment-request/#canmakepayment-method :

If the user agent has a payment handler that supports handling payment requests for identifier, resolve hasHandlerPromise with true and terminate this algorithm.

Firefox has a built-in payment handler for "basic-card", so they will always return "true". @marcoscaceres, correct me if I'm wrong. So Firefox implementation seems to match to spec, right?

@ianbjacobs
Copy link
Collaborator Author

Adding @romandev and @zouhir (and assuming @rsolomakhin and @danyao already watching).

Ian

@rsolomakhin
Copy link
Collaborator

@snyderp wrote:

I suggest adding an additional exception type, or return value to the canMakePayment promise indicating "user is still interested in Web Payments, but no background / passive checking, to maximize use of Web Payments API. Thoughts?

I like this idea. Our current behavior in this case is to return "false" in canMakePayment(), but a different error message would definitely be useful.

@ianbjacobs
Copy link
Collaborator Author

@snyderp and @rsolomakhin, would you support creating a new issue on the topic of finer-grain error reporting when canMakePayment() returns "false"?

Some observations (which I can carry over to a new issue as well).

  • An error message (e.g., "okToUseAPI") that indicates that the user does not want to share detailed information but would like to use the API under show() conditions would reveal some information about the user's browser configuration. For consideration: is that an improvement?
  • @rsolomakhin, you mentioned fine-grain error reporting for debugging. What are the other scenarios that you (or Google Pay) team would like to reflect in these messages?

Ian

@rsolomakhin
Copy link
Collaborator

@ianbjacobs : A separate issue sounds good. Does this need to go into the spec or best practices for implementers? I understand the error codes go into spec. Not sure about error messages.

Other scenarios that would benefit any payment handler or merchant:

  1. Errors in SSL. For example, self-signed SSL causes Chrome to always return "false" to canMakePayment() and reject show() with "AbortError: Request cancelled."
  2. Reasons why the payment sheet closed, e.g., "AbortError: User closed the payment handler", "AbortError: The payment handler cancelled the transaction", or "AbortError: User closed the card CVV entry form."

@pes10k
Copy link

pes10k commented Mar 6, 2019

@snyderp : Which part of the spec differs among the implementations?

@rsolomakhin I was basing what I said (that Firefox isn't implementing the spec as written) based on @marcoscaceres comment "But seriously, it's why in Firefox we always lie and just return true.". I take that to mean they don't follow the supportedNetworks part of the algorithm.

Brave will likely do the same (decision hasn't been 100% made yet) and return true no matter what, at least with "Shields Up".

about what data is shared, but rephrased to sound less like
it has to be real-time
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
marcoscaceres and others added 2 commits March 12, 2019 16:14
Co-Authored-By: ianbjacobs <[email protected]>
Co-Authored-By: ianbjacobs <[email protected]>
index.html Outdated Show resolved Hide resolved
marcoscaceres and others added 2 commits March 12, 2019 16:26
(Marcos and Ian edited.)

Co-Authored-By: ianbjacobs <[email protected]>
Co-Authored-By: ianbjacobs <[email protected]>
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
marcoscaceres and others added 2 commits March 12, 2019 17:06
@ianbjacobs ianbjacobs merged commit 3f644f4 into gh-pages Mar 12, 2019
@marcoscaceres marcoscaceres deleted the ping-201902 branch March 12, 2019 23:59
@aestes
Copy link
Collaborator

aestes commented Mar 14, 2019

This is how Safari works:

screenshot 2019-03-05 16 12 37

I should clarify something here. This option influences the return value of the canMakePaymentsWithActiveCard API in Apple Pay JS (and soon the hasEnrolledInstrument API in Payment Request).

When that option is unchecked (or the window is in Private Browsing), canMakePaymentsWithActiveCard will behave as if canMakePayments were called instead, returning true whenever Apple Pay is supported even if there are no enrolled instruments.

Neither this checkbox nor Private Browsing influence the result of canMakePayments in Apple Pay JS or canMakePayment in Payment Request.

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.

7 participants