-
Notifications
You must be signed in to change notification settings - Fork 42
Encrypt SPC Credential Identifiers in authentication flows to increase privacy #77
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
Comments
Which algorithm would be used for encryption in this proposal, @ianbjacobs? Alternative idea is to hash the credential ID with a salt. The salt can be either random or based on the merchant origin. Random salt:
Merchant based saltFor merchant origin based salt, the issuer does not need to generate random salt in step 2. Instead, both issuer and browser use the origin of the merchant as the salt. The salt would not need to be included in the signature, because the signature already included the merchant origin. A couple of questions:
|
One (still not very thought-through) option that we've discussed is letting the relying party provide a fetch URL to get the credentials from, rather than have the caller provide the credentials from. The happy path is then that the merchant gets the URL (from their PSP, or 3DS flow, whatever), and passes it to SPC. The browser fetches from the URL, and uses those credentials. Of course, this is ripe for abuse if the merchant just fetches the URL itself. A relying party could have some protection by making the URL a one-time URL, which allows for detecting if not prevention, but it does get messy... An advantage of the URL approach vs the salt approach is that it doesn't require the browser to store a list of credential IDs in the user profile, which I consider an annoying part of SPC currently and would love to get rid of! (Because it significantly inhibits portability.) |
Thanks @rsolomakhin and @stephenmcgruer for the rich ideas. One downside of the URL approach is that RPs need to then offer public-facing services. @rsolomakhin, the merchant salt idea sounds interesting. I assume that it relies on the relying party never sharing the "real" SPC Credential ID. Is that something we should rely on? (Perhaps the risk is no greater than the RP sharing the private key that is featured in my pseudo-algorithm.) Regarding "how important is this" I don't have a good sense. It is probably more valuable in payment methods where the instrument data itself is well-managed (e.g., tokenized, origin-bound card info). For the moment I've described this as "should" in the requirements document. I assume through discussion we will find out whether this feature is a "must". |
Side note: if the credentials change every transaction, one implication is that caching credentials will not work. I don't yet know how desirable or common it would be to cache credentials. |
@ianbjacobs, @stephenmcgruer & @rsolomakhin This post will explore how we could utilize Public-private keypairs (asymmetric encryption) to provide a layer of obscurity and anonymization to protect Credential ID's for SPC. There are 4 entities participating in an SPC journey
The RP (bank) has the identifier (PAN) to credential mapping. We do not want the intermediary to know anything they do not need (for various reasons, including privacy and potential caching of credential ids). The Browser is implicitly trusted and needs to know the credentials, since it needs to call the Fido Authenticator. Transporting the information The JWE could contain the following encrypted fields
The Browser needs to be able to verify and decrypt the JWE, since it needs to use it in the SPC display; to reach out to the correct the Fido Authenticators and also to sign the result. Transporting the key material The intermediary already has a back-channel communications mechanism to the Bank (e.g. 3D Secure). As part of this, it today already passes along the PAN, for example, and in return receives a list of credentials and instrument details. For this to work, the Intermediary would have to do two things:
The RP would also need to do some more work to generate this JWE, but we can make that an RP decision, and not enforce it (this optionality needs some thinking, since it could make Intermediary implementations more complex) ** Summary **
Would something like this make sense? If so, how do we unpack/design this in more detail? |
This was discussed today at the SPC task-force. We do not believe that the proposed JWT approach would work, as the merchant can trivially person-in-the-middle it as follows:
In general, an encryption based scheme can only work if there is some alternative communication channel directly between the Browser and the Relying Party. This could be online (e.g. during SPC) or offline (e.g. by browsers publishing some known public key that the Relying Party can use), but in either case substantially complicates matters. I think, but have not verified, that the salting proposal is not subject to a person-in-the-middle attack, but it also may not be compatible with FIDO at all - we've asked the FIDO/WebAuthn folks to take a look. |
The salt idea would only work for "Discoverable" credentials. The platform would need to authenticate the user to get the list of credentials from the credential management API then do the hashing with the salt to compare. Non-resident credentials encode information in the credentialID itself so they would be broken by this. The other thing to consider is that the authentication response contains the credentialID in the publickeycredentialdescriptor. Encrypting or hashing the request is not sufficient, to protect the information from intermediate parties we would also need to encrypt the response to the RP. That could be done by having the issuer store a key in credblob and have the browser use that to encrypt the response. That is however a lot of additional complexity. |
@ve7jtb Since SPC anyway requires you to handover your credit card number to the merchant (w3ctag/design-reviews#675 (comment)), I don't see much of a rationale for protecting |
This section still contained an idea outline (for salting credential IDs) from when the spec was in its development phrase. The actual idea is in issue #77 and shouldn't be part of the spec itself. Also added a short paragraph on a possible user mitigation for 11.3, creating distinct user accounts. See #143
This section still contained an idea outline (for salting credential IDs) from when the spec was in its development phrase. The actual idea is in issue #77 and shouldn't be part of the spec itself. Also added a short paragraph on a possible user mitigation for 11.3, creating distinct user accounts. See #143 Co-authored-by: ianbjacobs <[email protected]>
suggestion on today's call was that one non-technical mitigation was contractual limits on merchants retaining credential IDs |
Based on today's discussion, the Editors will work on additional text for the specification regarding guidance to RPs. |
#77 Added two bits of guidance for RPs based on 4 May 2022 privacy discussion. https://www.w3.org/2022/05/04-wpwg-minutes#t02
Closing this after merger of pull request #189. Thank you @samuelweiler and @npdoty! (And thank you for updating the privacy labels as needed.) |
@Goosth and I believe others have pointed out that it would be great to reduce tracking risk by not reusing the same SPC Credential IDs across transactions. Here is an idea:
At enrollment, the relying party provides a public key in addition to other data (e.g., display
information, relying party ID). The relying party associates this public key with the SPC Credential
Identifier they get back through enrollment.
At transaction time, the relying party prepares input for SPC (either for someone like a PSP or their
own usage) by encrypting a hash of an SPC Credential ID along with a time stamp (for example).
The relying party ID and encrypted blob are provided as input to SPC.
The browser follows this algorithm (or similar):
SPC Credential ID in the blob matches this SPC Credential's identifier, proceed to authenticate
based on this SPC Credential.
This is a rough idea; I look forward to hearing suggestions to make it realistic and effective.
The text was updated successfully, but these errors were encountered: