Skip to content

Commit b5baa7e

Browse files
authored
Merge pull request #38 from philippederyck/pdr/move-inbrowser-flows
Moved new section on in-browser flows
2 parents 38c7173 + 8fbf58f commit b5baa7e

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

draft-ietf-oauth-browser-based-apps.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,18 @@ Authorization servers MUST require an exact match of a registered redirect URI
885885
as described in {{oauth-security-topics}} Section 4.1.1. This helps to prevent attacks targeting the authorization code.
886886

887887

888+
889+
##### Security of In-Browser Communication Flows {#in_browser_communication_security}
890+
891+
In browser-based apps, it is common to execute the OAuth flow in a secondary window, such as a popup or iframe, instead of redirecting the primary window.
892+
In these flows, the browser-based app holds control of the primary window, for instance, to avoid page refreshes or run silent frame-based flows.
893+
894+
If the browser-based app and the authorization server are invoked in different frames, they have to use in-browser communication techniques like the postMessage API (a.k.a. {{WebMessaging}}) instead of top-level redirections.
895+
To guarantee confidentiality and authenticity of messages, both the initiator origin and receiver origin of a postMessage MUST be verified using the mechanisms inherently provided by the postMessage API (Section 9.3.2 in {{WebMessaging}}).
896+
897+
Section 4.18. of {{oauth-security-topics}} provides additional details about the security of in-browser communication flows and the countermeasures that browser-based apps and authorization servers MUST apply to defend against these attacks.
898+
899+
888900
##### Cross-Site Request Forgery Protections {#pattern-oauth-browser-csrf}
889901

890902
Browser-based applications MUST prevent CSRF attacks against their redirect URI. This can be
@@ -1407,21 +1419,6 @@ and the countermeasures mentioned above.
14071419

14081420

14091421

1410-
1411-
Security of In-Browser Communication Flows {#in_browser_communication_security}
1412-
--------------------------------------
1413-
1414-
In browser-based apps, it is common to execute the OAuth flow in a secondary window, such as a popup or iframe, instead of redirecting the primary window.
1415-
In these flows, the browser-based app holds control of the primary window, for instance, to avoid page refreshes or run hidden iframe-based flows.
1416-
1417-
If the browser-based app and the authorization server are invoked in different frames, they have to use in-browser communication techniques like the postMessage API (a.k.a. {{WebMessaging}}) instead of top-level redirections.
1418-
To guarantee confidentiality and authenticity of messages, both the initiator origin and receiver origin of a postMessage MUST be verified using the mechanisms inherently provided by the postMessage API (Section 9.3.2 in {{WebMessaging}}).
1419-
1420-
Section 4.18. of {{oauth-security-topics}} provides additional details about the security of in-browser communication flows and the countermeasures that browser-based apps and authorization servers MUST apply to defend against these attacks.
1421-
1422-
1423-
1424-
14251422
IANA Considerations {#iana}
14261423
===================
14271424

0 commit comments

Comments
 (0)