-
Notifications
You must be signed in to change notification settings - Fork 22
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
Circumventing Origin restriction with proxies #34
Comments
For webid-oidc this is not a problem, because the token that the web app obtains is specific to both webid and app origin. A web app can only obtain a token that is tied to its own origin. For webid-tls, I don't know, I'll find out! |
Do you refer to |
This is a reason to move towards client-id based origin tokens. User client id as the origin |
solid/webid-oidc-spec#12 should address it, I will close this one once it gets resolved |
I have lots of OIDC context, but limited web-access-control. I threw out a straw man of removing from the spec this (since it might be adding a MUST that allows unauthorized access via proxy)
Dmitri mentioned that would face resistance as such. But a better alternative should be developed, then this language removed. A followup proposal that should be less controversial is to add a warning to the spec right before that MUST
|
Creating this as a placeholder, it's still incomplete in several aspects: * we should mention somewhere why PoP token issuer is better than Origin header (namely because of solid/web-access-control-spec#34) * we should mention that a PoP token is only valid if the issuer is listed in the id token's audiences (is this something the IDP checks and then signs for? I don't even know)
If a bad proxy does not forward the Origin header, then the CORS security is broken by the bad proxy. Don’t use or implement bad proxies. This does not change WAC. |
I'm describing here possibility of application running in a web browser intentionally using properly implemented proxy which by design allows it to advertise whatever Origin party providing the application wants that application to claim on requests. |
But it's not the data owner or the benevolent Solid app developer that is using this bad proxy. In this scenario, it is an evil attacker doing it. And even if we adhere to this ourselves, unfortunately we can't effectively police this for the web as a whole. So I think this issue remains unresolved by the Solid spec as it currently stands. |
I don't mean to undermine the concerns raised here, but it's equally important to ensure the correct interpretation of the published WAC, the There are too many assumptions in this thread for my liking, but suffice it to say that if a malicious actor has already managed to achieve one or more of the following: authenticate the end-user, have the end-user use a malicious application, have the end-user use a malicious proxy, or gain knowledge of the Authorization, then yes, some malicious activities could occur. However, I doubt this set of conditions or similar ones are uniquely tied to WAC. It would be worth examining whether equivalent concerns are raised in other specifications and go from there. That said, what https://solid.github.io/web-access-control-spec/#authorization-evaluation-origin , https://solid.github.io/web-access-control-spec/#web-origin-authorization and https://solid.github.io/web-access-control-spec/#security-privacy-review-first-third-party (see also ctrl+f "origin" for more Based on my understanding which stems from studying numerous issues, reviewing the WAC documentation and implementations to date, engaging in community discussions, and analysing feedback on the specification, a malicious actor wouldn't necessarily need to go to the lengths mentioned above to bypass the origin check. They could simply omit the |
Hi Sarven,
You're right in principle, but the problem arises from the combination of WAC with dynamic client registration. If an IDP only allows clients such as web browers or data browsers which are trusted to fully impersonate the authenticating agent, then there is no problem, and then
This means that effectively an
I'm not sure I understand. Which lengths? I interpreted your post as saying |
The original question is "What about cases where 'malicious' app running in a browser uses a proxy to change the Origin header? " It did not specify who runs the proxy - the bad person or a good person running NSS. If a bad person can run a proxy, then a bad person can run a curl script to do anything anyway. So no new exprosure. If a good person is running a normal NSS cors-circumventing proxy, then the proxy can always preserve the origin: header which may be in the spec already. @michielbdejong Origin: headers are designed to protect against malicious Web Apps. That is their only function. They reduce the power of the user, not increase. Web Apps cannot remove the origin header because the browser forces them on. WAC Origin things allow Soldi programs which are trusted to use the CORS headers to actually access other data, as otherwise they are blocked by the browsers, which hate web apps. So it is a Origin: is a double-negative situation. Web apps are specifically more dangerous than anything else because they run without any installation as users browse the web. |
Ah, I think I understand the confusion now. This is unrelated to the NSS cors-circumventing proxy. And yes, the bad person could easily choose to use curl or any other tool. I tried to explain two issues related to In particular in https://youtu.be/Om-ftweaP8g?t=301 talks about how we could securely identify clients if we would implement something like solid/webid-oidc-spec#34 (but our current way of doing it is not secure). |
Actually @jaxoncreed pointed me to https://solidproject.org/TR/oidc#tokens-id which explicitly states that the |
Should we close this issue in favour of #81? It seems to be a sub-topic of that. |
Ah wait, there's something I hadn't realised about WAC See this statement from @csarven on that issue:
And explicit statement in the spec:
And this most recent comment by @woutermont (who actually implemented a fix in CommunitySolidServer/CommunitySolidServer#1537 and then closed that a few years later):
And this comment from Henry on the same day proposing another implementation of client identification in WAC. I think the premise of this issue is (and this was also always my interpretation, and also the premise of the design of our app launcher experiment 6 years ago), that So maybe the real question is: what is |
It is suggested in solid/specification#59 (comment) that this is a question that is answered in the spec, in particular in the following three sections: I'm noting in particular the following sentence:
Seeing also what MDN says about the Same-origin policy:
These are two good examples of how
So yeah, I finally understand now. :) I think we can close this issue. @elf-pavlik do you agree? |
https://github.com/solid/web-access-control-spec#referring-to-origins-ie-web-apps
What about cases where 'malicious' app running in a browser uses a proxy to change the Origin header? I think it might work differently with WebID-OIDC and WebID-TLS.
Malicious app still would need to know which 'allowed' origin to use but let's consider scenario where it knows that 'allowed' origin and proxy sets header to it.
The text was updated successfully, but these errors were encountered: