Add authenticated reverse proxy mechanism#533
Merged
Uh oh!
There was an error while loading. Please reload this page.
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.
This pull request allows Solid server to act as a reverse proxy for backends, to which it passes authentication information (user and host).
This feature can be configured as follows:
{"authProxy":{"/my/path": "http://localhost:2345/app" } }With the above configuration, a request to
https://ruben.solid.server/my/path/to/something?x=ywill be proxied tohttp://localhost:2345/app/to/something?x=y. TheUserheader on the proxy request will be set to the currently logged-in user (or empty if none), and theForwardedheader will be set tohost=ruben.solid.server. This enables the proxied server to serve content from that user on this specific host.Other changes
In order to avoid confusion between the existing CORS proxy and new auth proxies, the
proxyparameter has been deprecated and renamed tocorsProxy.Security considerations
Problem: Anyone can pretend to be authenticated by sending a request with the
UserandForwardedheaders to the proxied server directly (instead of going through the Solid server).Possible mitigations:
UserandForwardedheaders if they are received through the Solid server.