Skip to content

SEP24: interactive iframe causes problems with sessions and CSRF tokens #475

@yuriescl

Description

@yuriescl

When the Wallet receives 403 interactive_customer_info_needed from POST /transactions/deposit/interactive, it's supposed to open a popup or iframe pointing to the Anchor interactive deposit url.
The Anchor interactive deposit might be composed of forms and make use of web sessions.
Modern browsers and web frameworks usually enforce strong protection against the use of third-party and cross-origin cookies and CSRF tokens, this causes forms and sessions to not work properly on iframes, since the cookies they use are considered to be third-party when running inside an iframe.
In Django, the SESSION_COOKIE_SAMESITE setting is a workaround to make the sessions work but CSRF tokens still causes forms to not work properly.
Credits to @msfeldstein for finding about iframe third-party cookies and the Django SESSION_COOKIE_SAMESITE setting.

Metadata

Metadata

Assignees

Labels

bugCAP that addresses broken behavior in the current protocol.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions