-
Notifications
You must be signed in to change notification settings - Fork 305
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
Regression bug in v5: Need to check for a file's ACL when it is served as resource for a container #1063
Comments
So, thinking about it, I'm thinking that we should be using The default ACL file says |
Sorry, forgot to answer this. The template for root ACL is
So the default ACL file for root says that all files are private. |
So making the root folder publicly available is a solution for this, that is changing
This does not give access all other files in the root folder, so I think this the "right way" of fixing this. The problem with this approach (which I think is correct) is that users with outdated root ACLs will need to upgrade their root ACL if they want their homepage be publicly available. The reason this works in v4.x seems to actually be a bug... We might want to create a migration script for POD providers to run when upgrading to v5. Any thoughts on this? |
Can you elaborate on "This does not give access all other files in the root folder"? meanwhile #public with acl:Read? Why not keep private by default and give read to the index or whatever you want explicitly? |
I am also confused here as well because, @megoth I thought you stated that the acl issue with regards to home pages being public was an err in NSSv5 but, it appears that your position now is that it was a bug in v4.x that the home pages were public and should not have been, is this correct? |
If I am mistaking the discussion here, just let me know. |
What is being passed to the ACL checker? |
My understanding of the problem evolves, so my hypothesis was something else initially. Is also why I'm stating how I understanding of the problem here, in hopes of getting feedback and maybe correct me if I'm still not understanding the problem correctly. |
Just to note, this ties into solid/web-access-control-spec#36 as well. I tried changing the last part of the root-ACL to:
That doesn't work, I'm afraid =/ As I have understood the ACL-spec, I need to make the root-folder readable to make it accessable to the public. But the previously mentioned change would only make If I had added
That would be different, as it would make all resources in root (and other sub-folders that doesn't have an .acl) publicly readable. Does that make it clearer? |
Yes, we're passing Am I understanding that part correctly? |
Is the problem specific to just
Indeed. |
Another effect of this is that you can actually make the root publicly readable, but not the default file that the server ends up serving (by root ACL stating that |
|
Indeed, but what I mean is: if we set similar permissions on them, would they have the same problems? I guess |
I indeed think that https://github.com/solid/node-solid-server/blob/v5.0.0-beta.5/default-templates/new-account/index.html.acl is the problem; this should not be |
Yes, we could get the same problem, e.g. if |
So the fix could be to make |
We need two fixes:
The second thing is problematic. We do not want to start changing file contents; that sets a bad precedent. (We do change internal/external filename correspondence, but that does not touch their contents from an HTTP perspective.) I think our only course of action here is to code the buggy behavior for the |
That is a pragmatical solution that I think would make most users happy. It would require us to live with a bug (as it diverges from how it should be handled), but documenting it and being aware of it is an ok solution in my mind. |
Indeed. Perhaps not even behind a flag, just an exception. |
Fixed the template part in #1065. |
@megoth I understand what your saying, and trust that you all are making the best decision. Thank you all for your attention to this matter. |
I haven't been able to look at #1067 in detail, but I think it is much simpler than that. We have to distinguish between legacy and future. #1065 fixes the future indeed, no need to change things there. However, fixing the ACL system (as we do in v5) breaks the incorrect ACLs on the 100.000+ pods already out there which were created with a broken ACL system in place. So what I am proposing is not
What I am proposing is:
This provides continuity, without many practical (instead of theoretical) security implications. |
That is basically what #1067 does, but in a more general way. Indeed, we could constrain that to just So, basically, this is a choice between
The options 1. and 2. have the same effect, but as a choice between evils, I think the latter is the lesser. I think 3. is a real option too, although it will certainly be surprising to many users that they have to, but it is the nature of a prototype. |
What concrete problems would that bring? The alternatives include:
The first is so horrible it can drive people away ("Solid is the thing that broke my homepage on an upgrade").
We can make it really elaborate:
So as soon as people have modified anything to their ACLs, the above conditions will be void.
We should not change exposed document contents; they are the users' files, not ours. |
I think it's a bad hack, but I think it's the best option we've got.
The first one is something we really should avoid. So some sort of action is preferable. I'm open to the the script solution though, with the instructions being as follow:
As a script this allows the POD providers to make the decision if they should do it. That being said, I'm very skeptical as it violates our rule to never change the content of a POD. So this is a bad solution, but it is a pragmatical solution that works for 99.99% of the accounts...
I agree with @RubenVerborgh here, but I'm really conflicted in this situation TBH... |
Just to note, there is a third option: Create an API that allows users to reset access to a given resource. This could also be useful for issues where users for various reasons have been able to lock themselves out of control on a given resource. This solution needs some thought though:
It is also probably not doable to ask 100000s of users to reset the control of their root ACL... |
I don't think so, consider that the user removes the public authorization on the root ACL, and puts some confidential material in there, not realizing that the index.html.acl overrides it, and so has confidential information exposed. It is a horrible hack, with flaming antlers, the smell of phosphorous, sulfur and dead fish. And then some. :-) Moreover, wouldn't it create implications for the spec and therefore other implementations?
But we also said prototype... At least none of those will surprise any of our next billion users, which is a greater concern, there is a very real possibility that this hack will expose confidential information even in a rewritten and secure server, because of the bad security usability it represents. Also note that there is something browser-specific,
It wouldn't help the neither of the above. What would help is if we wrote any changes to Complicates stuff, adds a hack that we would need to keep indefinitely, and can surprise people who assumes that Or, could we have an explicit sunset on this hack? I.e., we do this for 5.0.0, but warn our users that they need to set read permission on their root, because this will be removed in the future? Have some UI on the frontend, saying "You do not have an explicit public read permission on your root. For now, we allow public access anyway, but that will only be in the case in the Solid Server prototype, so if you want to continue having your homepage public-readable, set it". That should also warn them if it is unintentional. |
"Or, could we have an explicit sunset on this hack? I.e., we do this for 5.0.0, but warn our users that they need to set read permission on their root, because this will be removed in the future?" I think that this is the best course of action seeing as it should be the responsibility of the pod owner to be explicitly familiar with and manage there own acl. |
Good idea. Practical problem would be lack of a place to show such a notification. Even better perhaps is combining this with something I read earlier: making this a button "Set permission" so it is zero effort. |
@RubenVerborgh Agreed, make it so! |
OK, good! I think we have consensus! |
Agreed! |
BTW, @RubenVerborgh which repo should get an issue to get the deprecation warning and "Set permission" button? |
Depends on where we want to show it. I think NSS, should probably login redirect page. |
Right, we can do that... I was also thinking about some of the other UIs, e.g. databrowser? |
A general mechanism for server notifications would be great for sure. I'm thinking #1057. Databrowser, was also thinking that. But maybe too specific to couple server to this. The Solid way would be to send something to people's inboxes 🙂 |
"The Solid way would be to send something to people's inboxes 🙂" That sounds like a great resolution, and no one can say that they did not receive notice. |
OK! I think we could use the login page, as everyone is on that every now and then. |
On second thought, the login page would probably be a great place for notices. |
I am very happy to read here that everyone will have a choice if their index.html is visible or not via the button I suggested to control that setting in gitter. |
I've implemented a hack so that the index.html-algorithm works, but I have some questions reg the button-part. There are three scenarios that we might want to consider:
We could also "force" the user to make a choice by only allowing option 1 and 2. Also, I reckon this section is at the bottom of the homepage, so wouldn't be up in the users' face. (Or do we want to have if up front, to "force" them to make a choice?) This section could show only when there's a discrepancy between READ access to '/' and '/index.html', which makes it so that once an option is chosen, the section won't show anymore (unless the user does something with the READ access on either files later, of course). |
I see that people have suggested that the button should live in the login-page? I'm confused as to how that would work? Or am I misunderstanding something? |
To give people an idea of what I'm thinking wrt two buttons (make public, make private):
This would only be shown to users that have control of this POD. The idea is to also link to a thread in the forum that explains the situation in more details. |
I am wondering where we should have this button. If I put it in |
I think they should decide, as not deciding will cause problems when the hack is retired. I think it is a good idea to have two buttons though, so that they can choose. When you say it, I'm not sure what the others meant by "login"-page, because when you see that, you're not yet logged in, I suppose. |
I have merged the backend aspects of this an released a new beta, and made a new ticket for the frontend buttons in #1076 , so we can close this now. |
When a file is served as response to dereferencing a container, we also need to check that file's ACL settings when determining whether a user has access to that resource.
How it works on v4: as a visitor I have read access to both https://megoth.solid.community/ and https://megoth.solid.community/index.html
But on v5: as a visitor I have read access to https://megoth-test1.dev.inrupt.net/index.html, but not to https://megoth-test1.dev.inrupt.net/
The text was updated successfully, but these errors were encountered: