@@ -76,19 +76,39 @@ associated origins.
76
76
- Has an origin with a valid
77
77
` <origin>/.well-known/web-app-origin-association ` association file
78
78
with an association entry matching the web app's
79
- [ identity] ( https://w3c.github.io/ manifest/#dfn -identity) .
79
+ [ identity] ( manifest-identity ) .
80
80
81
81
## Security Considerations
82
82
83
- ### [ Launch handling params ] ( https://github.com/WICG/web-app-launch/blob/main/launch_handler.md )
83
+ ### Link capturing from another origin
84
84
85
- If an URL in extended scope is captured by an app that has
86
- launch_handler: { client_mode: "focus-existing" } set in its manifest, the URL
87
- is made visible to the app through Window.launchQueue instead of causing a top
88
- level navigation. Without scope_extensions, this URL must be from the same
89
- origin as the app scope. With scope_extensions, this exposed URL can be from a
90
- different origin within extended scope.
85
+ If an origin A adds a web app B to its ` web-app-origin-association ` file, A is
86
+ implicitly authorizing app B to intercept navigations to URLs in A. This
87
+ implies that app B can potentially spoof origin A and therefore it is advised
88
+ that origin A and web app B should be owned by the same entity.
91
89
90
+ User agents may perform link capturing for user navigations within a web app's
91
+ extended scope and launch the web app instead of performing the navigation.
92
+
93
+ The [ launch handler] [ launch-handler ] proposal enables sites to reroute app
94
+ launches into existing web app contexts.
95
+
96
+ The combination of link capturing, launch handler and scope extensions leads to
97
+ the following attack vector:
98
+ 1 . User installs the TestApp web app from app.com.
99
+ 1 . TestApp's scope includes site.com with valid origin associations.
100
+ 1 . TestApp sets its ` launch_handler ` to
101
+ ```
102
+ {
103
+ "client_mode": "focus-existing"
104
+ }
105
+ ```
106
+ 1 . User clicks on a link to site.com.
107
+ 1 . Navigation is captured by an existing TestApp window that is brought into
108
+ focus and has a LaunchParam is enqueued.
109
+ 1 . * TestApp is now aware that the user is navigating to site.com and could
110
+ perform a fake navigation with the intention of duping the user into thinking
111
+ they're on site.com.*
92
112
93
113
## Future extensions
94
114
@@ -103,38 +123,45 @@ different origin within extended scope.
103
123
associated origins is not required for these URLs to be part of a valid
104
124
manifest. Prior to validation the URLs must be treated as if they were not
105
125
specified.
126
+ - Add an ` "authorize" ` field to ` web-app-origin-association ` e.g.:
127
+ ``` json
128
+ {
129
+ "web_apps" : [{
130
+ "web_app_identity" : " https://example.org" ,
131
+ "authorize" : [" intercept-links" ]
132
+ }]
133
+ }
134
+ ```
135
+ This opt-in serves as a signal of trust from the associated origin to allow
136
+ the web app to [ capture navigations] [ link-capturing-from-another-origin ] into
137
+ the associated origin.
138
+
106
139
107
140
## Related Proposals
108
141
109
- ### [ URL Handlers] ( https://github.com/WICG/pwa- url-handler/blob/main/explainer.md )
142
+ ### [ URL Handlers] [ url-handlers ]
110
143
111
144
The Scope Extensions proposal is intended to be a replacement for the
112
- [ URL Handlers] ( https://github.com/WICG/pwa-url-handler/blob/main/explainer.md )
113
- proposal with the following changes:
145
+ [ URL Handlers] [ url-handlers ] proposal with the following changes:
114
146
- Re-orient the goal to be focused just on expanding the set of origins/URLs in
115
147
the web app's scope. Remove the goal of registering web apps as URL handlers
116
- in the user's operating system. That behaviour will be covered by the
117
- [ Declarative Link Capturing ] ( https://github.com/WICG/sw-launch/blob/main/declarative_link_capturing.md )
118
- proposal instead .
148
+ in the user's operating system. That behaviour will be covered by individual
149
+ browsers optionally offering users the choice to capture link navigations as
150
+ web app launches .
119
151
- Rename the new manifest field from ` url_handlers ` to ` scope_extensions ` to
120
152
reflect the change in goals.
121
153
- Move the association file from "<origin >/web-app-origin-association.json" to
122
154
"<origin >/.well-known/web-app-origin-association". This better conforms
123
155
with [ RFC 8615] ( https://datatracker.ietf.org/doc/html/rfc8615 ) .
124
- - Change the association file entries to be keyed on the web app identifier
125
- rather than the web app's manifest URL. This aligns with the recent
126
- [ PWA Unique ID] ( https://github.com/philloooo/pwa-unique-id/blob/main/explainer.md )
127
- proposal.
156
+ - Change the association file entries to be keyed on the [ web app
157
+ identifier] ( manifest-identity ) rather than the web app's manifest URL (the
158
+ former having been added to the Manifest spec in the interim).
128
159
- Rename ` "paths" ` to ` "include_paths" ` in the association file entries.
129
160
- Add an "authorize" field to the association file entries for the associated
130
161
origin to provide explicit opt-in signals for security sensitive
131
162
capabilities.
132
163
133
- ### [ Declarative Link Capturing] ( https://github.com/WICG/sw-launch/blob/main/declarative_link_capturing.md )
134
164
135
- Scope extensions can be considered the first stage in the link capturing
136
- pipeline. This proposal allows developers to control the set of user navigation
137
- URLs that the web app is intended to capture. The
138
- [ Declarative Link Capturing] ( https://github.com/WICG/sw-launch/blob/main/declarative_link_capturing.md )
139
- proposal allows developers to control the action that is taken once a user
140
- navigation is captured e.g. open a new app context or navigate an existing one.
165
+ [ launch-handler ] : https://github.com/WICG/sw-launch/blob/main/launch_handler.md
166
+ [ url-handlers ] : https://github.com/WICG/pwa-url-handler/blob/main/explainer.md
167
+ [ manifest-identity ] : https://w3c.github.io/manifest/#dfn-identity
0 commit comments