Clarify use of acl:default in the WebAC inheritance algorithm · Issue #55 · solid/specification · GitHub
Skip to content
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

Clarify use of acl:default in the WebAC inheritance algorithm #55

Closed
acoburn opened this issue Sep 20, 2019 · 13 comments
Closed

Clarify use of acl:default in the WebAC inheritance algorithm #55

acoburn opened this issue Sep 20, 2019 · 13 comments

Comments

@acoburn
Copy link
Member

acoburn commented Sep 20, 2019

The acl:default predicate is described differently in various places.

Some of the locations where it is defined include:

Depending on which definition is used, the result leads to entirely different conclusions about how ACL inheritance works. solid/web-access-control-spec#63 is a good example of the ambiguity here.

There are (at least) two open questions from an implementation perspective.

  1. In the triple <#auth> acl:default <URL>, does the value of the object node matter? Must the object node point to the URL of the resource for which this ACL is defined? What is the implication of that object node pointing to some other URL? In that case, would that acl:Authorization statement be ignored?

  2. Is an acl:Authorization inherited only if acl:default is present? The vocabulary document suggests the answer is yes; the Solid WebAC spec document also suggests the answer is yes (but only in an example); discussion on the issue referenced above suggests that the answer is no. That is, if a resource lacks its own ACL resource and the WebAC algorithm checks the parent container, does the algorithm stop at the parent container if that parent ACL contains any acl:Authorization statements or only if it contains any statements that also include acl:default? There appear to be conflicting ideas about this.

I would like to emphasize that clarification of these points is really important.

@michielbdejong
Copy link
Contributor

OK, I see the point of skipping ACL docs that contain no acl:default statements, but I think there would be some downsides. It seems a bit arbitrary, especially if different (groups of) people have different access rights to different (sub-)folders.

Suppose there is a server that has two main user groups, for instance musicians and music lovers. By default, at the root of the server, all musicians can read+append, and all music lovers can read. Then say someone updates the settings for the /jazz/ container to change the default for musicians from read+append to read+write.

Sounds like a change that would only increase the rights a musician has on the /jazz/ folder, right? Well no. It would instantly make all Jazz music unreadable to music lovers. Ouch.

@kjetilk
Copy link
Member

kjetilk commented Sep 24, 2019

IIRC, in NSS, the search for an applicable .acl and the use of that .acl are two different processes, but I could be wrong.

@Otto-AA
Copy link

Otto-AA commented Sep 26, 2019

I fear that I missed something, so please correct me if I have a mistake in my thoughts. So assume we have following setup:

  • /public/folder/file.ext
  • /public/folder/.acl (without acl:default)

If we use the Algorithm which does not check for the presence of acl:default:

  1. file.ext has no acl file to it, so it searches the parents
  2. /folder/.acl exists, so it uses this acl file
  3. The acl file has no acl:default, so no permissions are supplied to file.ext

Would this mean, that file.ext is not read/write/append/control-able by anyone? If this is the case, adding an acl file to /public/folder/ would overwrite the /public/ rules in both scenarios. Therefore we would need to copy them anyway. (This is also what I intended to add to my solid-acl-utils library: To copy the default permissions of the corresponding parent when creating a new acl file)

@bourgeoa
Copy link
Member

bourgeoa commented Sep 26, 2019 via email

@dmitrizagidulin
Copy link
Member

@Otto-AA - You're understanding it correctly.

Would this mean, that file.ext is not read/write/append/control-able by anyone?

Yep, that's it. (That's the current spec's behavior, anyway. Whether we want that to continue or something different is the point of this issue / discussion.)

Therefore we would need to copy them anyway.

Yeah, I think that's what some existing libraries do as well (the data browser I think).

@timbl
Copy link
Contributor

timbl commented Sep 27, 2019

In the triple <#auth> acl:default , does the value of the object node matter?

Yes

Must the object node point to the URL of the resource for which this ACL is defined? What is the implication of that object node pointing to some other URL?
Yes
In that case, would that acl:Authorization statement be ignored?

Yes

Is an acl:Authorization inherited only if acl:default is present?

Yes

The vocabulary document suggests the answer is yes; the Solid WebAC spec document also suggests the answer is yes (but only in an example); discussion on the issue referenced above suggests that the answer is no. That is, if a resource lacks its own ACL resource and the WebAC algorithm checks the parent container, does the algorithm stop at the parent container if that parent ACL contains any acl:Authorization statements or only if it contains any statements that also include acl:default? There appear to be conflicting ideas about this.

It stops at the first file which exists, irrelevant of its content. If it find a file which exists and is empty, then there is no access for anyone to anything below it. There is a huge difference here between an empty file and a nonexistent file.

This is how this works in any code I have written about this.

@timbl
Copy link
Contributor

timbl commented Sep 27, 2019

Can we close this?

@pmcb55
Copy link

pmcb55 commented Sep 28, 2019

Ok, great to get clarity on this. But just before closing, I'd like to invite @d-a-v-i-- to review this conclusion from a security perspective...

@acoburn
Copy link
Member Author

acoburn commented Sep 28, 2019

Before closing, it may also be helpful to have corresponding normative language added to the WAC portion of the Solid specification, clearly articulating what is described above. In the meantime, perhaps a label can be added to this issue, indicating its status.

@kjetilk
Copy link
Member

kjetilk commented Oct 7, 2019

Yes, I think these issues need to be open until they are merged into the specification through the process.

@kjetilk
Copy link
Member

kjetilk commented Nov 27, 2019

@acoburn , have your questions been answered to your satisfaction? If yes, I think we can move this to "Rough consensus" based on @timbl's statements.

@acoburn
Copy link
Member Author

acoburn commented Nov 27, 2019

Yes, this has been thoroughly clarified. Thanks so much.
Feel free to move into "rough consensus"

@csarven
Copy link
Member

csarven commented Jul 1, 2021

Thanks for this issue and discussion. Closing this issue as consensus is deemed to be captured in WAC Editor's Draft: https://solid.github.io/web-access-control-spec/ . See #authorization-conformance , #authorization-evaluation , #authorization-matching . Please use https://github.com/solid/web-access-control-spec for future discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests