Skip to content

Commit 4c52225

Browse files
alancuttermgiuca
andauthored
Remove references to the Declarative Link Capturing proposal (#30)
* Remove ties to DLC Co-authored-by: Matt Giuca <[email protected]>
1 parent c15e21e commit 4c52225

File tree

1 file changed

+52
-25
lines changed

1 file changed

+52
-25
lines changed

scope_extensions-explainer.md

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,39 @@ associated origins.
7676
- Has an origin with a valid
7777
`<origin>/.well-known/web-app-origin-association` association file
7878
with an association entry matching the web app's
79-
[identity](https://w3c.github.io/manifest/#dfn-identity).
79+
[identity](manifest-identity).
8080

8181
## Security Considerations
8282

83-
### [Launch handling params](https://github.com/WICG/web-app-launch/blob/main/launch_handler.md)
83+
### Link capturing from another origin
8484

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.
9189

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.*
92112

93113
## Future extensions
94114

@@ -103,38 +123,45 @@ different origin within extended scope.
103123
associated origins is not required for these URLs to be part of a valid
104124
manifest. Prior to validation the URLs must be treated as if they were not
105125
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+
106139

107140
## Related Proposals
108141

109-
### [URL Handlers](https://github.com/WICG/pwa-url-handler/blob/main/explainer.md)
142+
### [URL Handlers][url-handlers]
110143

111144
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:
114146
- Re-orient the goal to be focused just on expanding the set of origins/URLs in
115147
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.
119151
- Rename the new manifest field from `url_handlers` to `scope_extensions` to
120152
reflect the change in goals.
121153
- Move the association file from "<origin>/web-app-origin-association.json" to
122154
"<origin>/.well-known/web-app-origin-association". This better conforms
123155
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).
128159
- Rename `"paths"` to `"include_paths"` in the association file entries.
129160
- Add an "authorize" field to the association file entries for the associated
130161
origin to provide explicit opt-in signals for security sensitive
131162
capabilities.
132163

133-
### [Declarative Link Capturing](https://github.com/WICG/sw-launch/blob/main/declarative_link_capturing.md)
134164

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

Comments
 (0)