Skip to content

Origin isolation warnings, tests and enforcement #30

@lidel

Description

@lidel

Extracted from #20 (comment)

Needs

For inbrowser.link

The goal is to provide a subdomain gateway for loading websites in web browser.

Lack of isolation is a security bug. Subdomain mode MUST be enforced.

For General Availability

Good security is like water, if things are right, fishes should not even notice it.

For end users:

  • We need to protect end user from subdomain misconfigurations, and at least warn them when SW gateway is deployed without proper origin isolation.
    • SW code must be smart enough to do the right thing when deployed on third-party domains, without additional configuration.
    • No shortcuts, no hardcoding "subdomain hostnames". This has to be automated, and work with any third-party domain.

For gateway Operators:

  • Setup complexity should be limited to getting wildcard TLS certs.
    • Operators should know what to do/fix by just opening website via SW gateway and reading the same error as end user.

Initial design

Tasks

Before ETH Denver:

  • fix: dynamic subdomain gateway detection #53
  • do whatever quick and dirty MVP is needed to enforce origin isolation on inbrowser.link. we have subdomain setup, so we should detect being on path, confirm subdomain works, convert to subdomain, and redirect to that.

For general availability:

  • detect when on example.com/ip[nf]s and either redirect to working subdomain at *.ip[nf]s.example.com or produce error page which requires user to accept the risk before they to continue browsing in path gateway mode
    • figure out how do we cache/store result of isSubdomainIsolationSupported (should be executed only once)
    • figure out how to test for regression
    • figure out if a test exists that works on subdomains without CORS headers
      • try identity CID with 1x1 px png image? (image loads don't respect cors)
  • review language on error page, make it useful to both end user who wants to understand the risks and gateway operator who wants to set up subdomains correctly to fix problem for end users
  • create end-to-end regression test which confirms the protections work as expected

Metadata

Metadata

Assignees

Labels

P1High: Likely tackled by core team if no one steps upeffort/hoursEstimated to take one or several hoursenhancementNew feature or requestexp/intermediatePrior experience is likely helpfulkind/enhancementA net-new feature or improvement to an existing featurestatus/in-progressIn progress

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions