Description
An issue with unblocking federated auth in the absence of 3p cookies using the storage access API is that it is a one-way trust. The permission grants idp.example access to its session cookies on rp.example, allowing auth to occur. However, it does not grant access to rp.example session state while on idp.example.
Federated logout is specified today as a visit to a well-known logout URL on idp.example, which then opens iframes of pre-provided logout URLs on each RP. With the removal of 3p cookies, these iframes (e.g. to rp.example/logout?sid=foo) are opened without session artifacts. For stateless RPs, they lose the ability to reliably signout the user, creating a security issue.
Single page app RPs today perform signout by either deleting their session cookies when receiving an iframe-based signout request, or dropping a tombstone cookie that tells them to delete their session cookies on next use (for cookies with SameSite Lax). Neither of these approaches work any longer.
I propose a solution here, which is that if idp.example has received storage access when embedded in rp.example, rp.example should receive storage access when embedded on idp.example.
This has two known drawbacks:
- It's not clear this is appropriate behavior. Abuse vectors are unexplored.
- This still doesn't solve logout for embedded web apps. If rp1 gets storage access for IDP.example, and then embeds rp2 that also auths using idp.example (thus requiring a complementary logout signal), there's no mechanism to track that rp2 should have storage access when embedded in idp.example.