-
Notifications
You must be signed in to change notification settings - Fork 74
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
Mediation oriented API too limited - Bearer credentials #80
Comments
Wanted to ping on this. The limitation to cookies (which are inherently Bearer credentials and passive state) is significant. Bearer tokens have an inherent problem that they can be stolen - token theft being at the core of so many security incidents. The Identity space is rapidly iterating on different designs to solve these problems (like DPoP, see above), but this design effectively rules out all of those solutions. I think the framework of the current draft (a small number of simple messages) is good, but I think it would be better to define those messages in such a way that their transport can be customized. For example, they could be customized in their current definition as HTTP requests with a service worker. Alternatively, they could be defined as JavaScript APIs rather than HTTP APIs, and the implementor could be responsible for the last mile of taking JSON JS objects, turning them into JSON HTTP requests, and taking JSON HTTP responses and turning them into JSON JS objects. A customized transport like that would permit more complex transports (like signed challenge-response requests) that could offer greater security properties. |
Question 1: In the DPoP specification, is the public key based on the device (All RPs on a given device use the same public key) or based on the RP (A given RP uses the same public key across all devices)? Relevant spec snippet:
Question 2: In the future, will DPoP be required to fetch information about the list of accounts that the user is currently signed into the browser? For the sake of completeness, I do not expect there to be an issue in supporting DPoP for the token request https://fedidcg.github.io/FedCM/#idp-api-id-token-endpoint |
Re DPoP keys - DPoP leaves this unspecified, which means it depends on the implementation. I'd emphasize that DPoP is an example of Identity PoP technology, but not the only example. In particular, one of the problems that DPoP doesn't solve (that Microsoft's proprietary implementation does solve) is the problem of multiple entities - DPoP doesn't attempt to provide a solution for using keys to protect both the IDP cookie and the RP AT - it assumes that all protected tokens belong to the same entity (the RP). In Microsoft's (non-DPoP) PoP implementation, we use a device-wide root key and derived ephemeral keys for each relying party auth session. The use of fresh derived ephemeral keys provides the desired privacy aspects - no cross RP or cross user tracking. In this issue, I'm asking for customizability, not for the browser to implement DPoP - let the IDP do all the details of PoP and keep it out of scope for the spec - this is still an evolving area in Identity. Omitting RP as a parameter for the account info request - sounds fine to me.
I would discourage FedCM from trying to implement PoP for RPs in the baseline. The semantics for PoP handoff (switching from cookies with an IDP key to access/id tokens with an RP key) are non-trivial and have no standard yet. As this is still an evolving space, better to let the IDPs do this as customization in Javascript than try to define such an evolving space strictly. |
Just to give a few examples of where customization (e.g. via a server worker) might be useful:
My focus in this issue in customization points. While the additional verification example is perhaps the most important (as it solves a security weakness), it's only one example on the list. My greater focus here is "don't over-constrain Identity." |
I think that one key piece missing here is customization of the message in that endpoint from the perspective of the RP. The RP needs to be able to construct a token request object and append it to a credential request. We don't have a way to do that. Otherwise I agree: the id token can be the DPoP access token and the Credential object can be used by the RP to generate DPoP proofs. An important question has to follow that up though: what are the privacy implications of allowing the RP to send arbitrary content to the IDP while building a credential. I would need to think on this more, but by this point in the transaction the browser has already sent the user's cookie to the IDP. However this is an increased risk: the RP gets a channel to the IDP. |
What is possible from a privacy perspective is different for the:
For solution 3, what data would the worklet need as input in order to create the account list HTTP request? |
@will-bartlett Ping! |
This is a bit of an old thread, but wanted to pick this back up to find some resolution.
I think this is probably out-dated: FedCM is un-opinionated about what gets sent back to the RP (in the sense that it is defined as an opaque string), and we have seen IdPs use both idtokens as well as access and refresh tokens.
This is a very interesting option that I think is worth exploring. But can you help me understand what problem it would solve? As I suggested above, I think FedCM isn't entirely opinionated as to whether one should use a bearer token or a client-bound token, so wondering if Service Workers could solve other problems. |
I was reviewing the mediation-oriented API from WebID as a successor to the permission-oriented API. I work for Microsoft in the Identity space. I observed that the mediation-oriented API is limited to Bearer authentication - "the browser will then issue a credentialed GET request." Bearer tokens (like cookies) are increasingly seen as a legacy technology in the Identity space and some Identity services already support successor technologies like DPoP. WebID should avoid constraining auth to such a legacy technology. However, it is a reasonable default.
One option might be service workers. If WebID permitted IDPs to return a "service_worker" entry as part of of their well-known metadata, and then have the WebID code effectively trigger
ServiceWorkerContainer.register()
for the URI. Then, the service worker could customize the subsequent account list and token fetch request and responses. In this manner, WebID could default to Bearer credentials, but still support customization, as to avoid over-constraining the Identity space and becoming a blocker to future security features. That might allow IDPs who have moved beyond Bearer authentication to e.g. sign over the request, to protect the user from MITM attacks.The text was updated successfully, but these errors were encountered: