-
Notifications
You must be signed in to change notification settings - Fork 524
Use .localhost domains for a secure context w/o HTTPS #60333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Conversation
…rojectsRecord, but document that it eventually should be removed
CookiesRuby
JS/TS
|
Domains of interest
Maybe don't need to work? Wildcards:
|
PapercutsOn http://studio.code.org.localhost:3000/home:
|
One failed unit test from ruby, its about shared cookies:I just confirmed on Chrome, the way it works right now is most of our code.org cookies are set on the Do any of these cookies need to be shared?Notice how localhost-studio.code.org and code.org have exactly the same .code.org cookies? That's hourofcode.com is basically alone in its own cookie world:
But all these domains map to the same shared cookie domain
Do we actually want to share cookies between environments?This test makes sure that happens, and it breaks because In general I want as strong a boundary between my staging/test/prod as possible! This is an anti-feature, and we've gone out of way to enable it (it doesn't do this by default). Proposal 1: (default) we use a non-sahred cookie for .localhost domainsEverything the same as above but: boo.localhost ==> boo.localhost Currently fixed this way by: 25ead00 and followup to simplify c5d1893 Proposal 2: we break away from shared cookies entirelyAnd fix this test to reflect it:
|
|
I'm curious about the |
…uf w/o shell quoting issues
|
This works with Sauce Connect v5, but not with Sauce Connect v4, so this PR is now blocking on: #60333 |
…dot-org into seth/circle-update-sc







Get a "secure context" in Dev/Drone without HTTPS
We currently use URLs like http://localhost-studio.code.org because we have internal logic that's keyed to what domain name you use. Alternatively we could use a URL like http://studio.code.org.localhost, which are special to browsers and would automatically give us a secure context and enable a number of modern web features, from SharedArrayBuffer to Service Workers and Web RTC.
Basically: using .localhost domains in dev is a way of getting access to HTTPS gated browser features without actually needing HTTPS setup.
Fixes #60328
The alternative way to get a secure context is to run as HTTPS in dev, but getting that working locally has been hard, and using an adhoc to do dev is pretty hard too. In actual practice, I think the burden of using https in local dev has meant we just don't use those features. For example, we are not using the most straightforward way to stop a python program because it uses SharedArrayBuffer: #60320
Here's a list of some modern web features we're missing out on that require a secure context:
Considerations
org.localhostthen?code.localhost, which makes more sense.override_dashboardoroverride_pegasusset to an old-style URL? A: include a comment in the announcement to devsServices that might need updates to allowed domain lists
Specific code impacts of concern
Developer Transition Impact
dashboard_overrideorpegasus_overrideset to an old-style url? this should be very rare, but might be worth planning for the few people who might have this for whatever reason?TODO
test server-like instance??