-
Notifications
You must be signed in to change notification settings - Fork 63
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
How do we ensure that the payment request from the merchant is not tampered with before it gets to the payment app? #19
Comments
There are at least two ways to accomplish this:
I suggest that #2 is more flexible in the long run as the payment request could travel through a variety of communication channels that we can't imagine today. For example, HTTP -> NFC -> Bluetooth -> HTTPS. |
Some elements in the payment response may need to be hidden from the merchant also (e.g. card number), so signatures don't meet this requirement. Since we are creating other connection from the browser, e.g. to cloud payment instruments, couldn't the connection to the PSP be via the same means? My view is we may need to support both methods. |
I may be rude, but the SCAI approach was:
regards |
Cyril is referring to this proposal: |
I'm wondering if you're raising another important issue. This particular thread is about how you can trust a particular payment message. I think what you're talking about could be broken into two sub-issues:
Care to split it out into a different issue, @mattsaxon?
For things like the PAN, I think the PSP would just drop that on the floor and not include it in the payment response message. You do raise another interesting point, though. For example, when we get to digital receipts, how is that handled? The merchant could:
In this example, the pop-up has 3 channels open:
To be clear, I don't think this is what we should do - receipts would most likely be best handled as after-the-fact storage decisions. I can't think of a realistic use case where we'd need to open more than two channels, but I can certainly conjure up edge-case ULTRA SECURE payment instruments that require you to piece together data from different servers at different data centers around the world. Just food for thought - we may need to open more than 2 channels in the payment selection pop-up/message relay component (aka wallet). |
Yes, but I expect that not everyone feels that digital signatures are absolutely necessary and there may be others that don't believe that in-message encryption is necessary. I'm merely raising the point that both will most likely be necessary, if not for phase I, for later phases and we should keep this in mind as we do the design work. |
Merchants sometimes do want to see card number though. It might not be best practice but it is certainly allowed today and supported.Nick Telford-Reed
|
We perhaps don't need a separate issue at this stage, the flows I am referring to are covered by the documented flows from the task force. |
I agree with @msporny that there are two issues here.
I think issue 2 is a problem for the designers of payment methods to solves ASSUMING we have solved issue 1. The payment request from the website to the payment mediator (User Agent) and then to the payment app needs to be tamper-proof. Only then can the payment methods specific processing kick-in and implement whatever security mechanisms the payment method prescribes. Is it sufficient to say that the API calls are only made in a secure context? What happens if my UA has been compromised and whenever I get a payment request the merchant details are changed so my payment goes to the wrong person? Do we need a standardized way to sign the payment request? |
As mentioned on a separate thread, I think W3C WebCrypto [1] is relevant here but I don't know whether it meets all our needs. As the spec is fleshed out we'll know more. @adrianhopebailie asked: It seems to me that, like other topics, Web apps and payment apps can determine the degree of security they wish to guarantee. Some apps will use signatures, I assume, and perhaps they will distinguish themselves in the market by doing so. We make it easier to do through the WebCrypto API. Thus, in the spec we can call this as a "Security Consideration". Ian |
As long as you imagine the person being payed is a merchant, as opposed to say a friend, then they do not need cryptographic deniability, so signatures work in principle. I suppose the question can be more clearly phrased as, how does the payment applicaiton get the merchant's key material, no? Apologies if this is dealt with elsewhere, but does the standard address how should one deal with signing JSON data? It's obviously possible to construct a canonical JSON representation, as a string and sign it, but that proves tricky in practice. We wound up signing C structs encoded with C code compiled to JavaScript using emscripten, which although hacky at least always works correctly. |
There's work in this area: JWS, a proposed standard at the IETF, and Linked Data Signatures, work from the Web Payments and Credentials CGs at W3C. |
Migrated to w3c/payment-request#41 |
If a merchant requests a payment, how can they be sure that their payment request is not tampered with when in transit to a 3rd party payment processor?
The text was updated successfully, but these errors were encountered: