Repository navigation
feat(domain): allow logging in with a Pod on a loopback host over http - #976
Merged
Merged
Conversation
The client sent tokens over plain http, and let oauth4webapi talk to a provider over it, only for 127.0.0.1 among the IPv4 loopback addresses. The whole 127.0.0.0/8 block never leaves the machine, and the login by WebID is about to take it as loopback too, so a local pod at another address in it would pass the app's check and then fail in the client. Refs: #975
Trying a Solid app against a Pod run locally, such as Community Solid Server at http://localhost:3000/, is a common step before using a real Pod, and the login refused it for not being https. Requests to a loopback host never leave the device, and browsers count these hosts as secure, so plain http there exposes no token or code on the network. A WebID, a chosen issuer and the issuer a profile names now pass over http on localhost, a name under .localhost, 127.0.0.0/8 or [::1], at any port; everything else still needs https. A profile's http issuer counts only for a WebID on a loopback host too, so a profile on the web can't send the browser to a server on the learner's device. The journeys that type an http WebID to see it refused now use one on another machine, since their Pod is at 127.0.0.1. Closes: #975
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Trying a Solid app against a Pod run locally, such as Community Solid Server at
http://localhost:3000/, is a common step before using a real Pod. Solid Memo refused that login because the address wasn't https. Requests to a loopback host never leave the device, and browsers count these hosts as secure, so plain http there exposes no token or code on the network.Plain
http://is now accepted on loopback hosts only, at any port:localhost, and any name under.localhost127.0.0.0/8, such as127.0.0.1[::1]This applies to a typed WebID, a chosen identity provider, the provider a WebID's profile names, and the check made on every login and session restore. Every other host still needs https.
A profile's http provider is accepted only when the WebID is on a loopback host too. Otherwise a profile on the web could send the browser to a server on the learner's own device.
solid-memo-client(the second sign-in client) now accepts all of127.0.0.0/8too. It only accepted127.0.0.1, so a local Pod at another address in that block would have passed the app's check and then failed at sign-in.docs/onboarding.mdanddocs/authentication.mddescribe the exception.127.0.0.1, so the two journeys that check an http WebID is refused now use one on another host (http://pod.example/…).Closes: #975