Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Commit e446f0a

Browse files
committed
proposal for wac:defaultInclude relation for acl.
1 parent 36549a9 commit e446f0a

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

acl-inheritance.md

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ In `monotonic`, ACL permissions are cumulative (inherited from the ancestors) an
2121

2222
#### Pro
2323
- Not as fast as defaultForNew but can be
24-
- Simple hierarchical permission (e.g. everything in `/shared` is shared)
24+
- Simple hierarchical permission (e.g. everything in `/shared` is shared) (bblfish: does that mean that a resource cannot unlink from a previous permission?)
2525
- Can be fast as it only has to find one ACL file to give the permission it needs
2626
- Monotonic: Once a user or any agent knows the ACL it can apply it as a rule. An ACL is a first class fact. It can be digitally signed, transported, and used to demand access at a later date, etc. Monotonicness is useful.
2727

2828
#### Cons
2929
- It is slower than `defaultFor new`, but the search stops the moment it finds success.
3030
- It can't have private subfolders within shared folders. Given that permissions cannot be reverted (with the current WAC specification), a subfolder cannot be private in a shared folder. This system is monotonic.
31-
- User has to be aware of the permissions given to the parent folders
31+
- User has to be aware of the permissions given to the parent folders (bblfish: why not use `wac:include`?)
3232

3333
((A possible solution is NOT include Windows' `DENY` or `DENY all` in the WAC specification, where these entries would take precedence to the other (_allow_) permissions) That would not be monotonic.
3434

@@ -45,15 +45,58 @@ In `defaultLocal`, ACL permissions are inherited from the most local ACL file wh
4545

4646
### Strategy 3) `defaultForNew`
4747

48-
In `defaultForNew`, ACL permissions are inherited from the whole path as in 'momotonic', but done from the end of the path top the root. With this method, however, whenever a file dopes not have a local ACL, one is generated for it, so that in future the search will hit it immediately.
48+
In `defaultForNew`, ACL permissions are inherited from the whole path as in 'monotonic', but done from the end of the path top the root. With this method, however, whenever a file does not have a local ACL, one is generated for it, so that in future the search will hit it immediately.
4949

5050
#### Pro
5151
- Fast
5252

5353
#### Cons
54-
- Generates a storage reuirement for all the ACL files, which is a pain, especialy in a fiel space shared with other systems.
54+
- Generates a storage requirement for all the ACL files, which is a pain, especialy in a fiel space shared with other systems.
5555
- Users may lose access to their resource by creating an ACL file that does not contain themselves.
5656
- Changing permissions recursively to a folder will require changing permission on each subfolder's ACL
57+
58+
59+
### Strategy 4) resource centric
60+
61+
Note by bblfish: this may be related to the previous points but I can't tell for sure, as there are a lot of words that are not defined clearly enough for me. Also see wiki page [regexes in ACLs](https://github.com/solid/solid/wiki/Regexes-in-ACLs)
62+
63+
[rww-play](https://github.com/read-write-web/rww-play) takes a resource centric view of acls. Any resource `<doc>`'s acl link relation (given by the http header `Link: <doc.acl>; rel="acl"`) specifies the acl starting point for that resource. This must be the case as that is the only way a client can find out about an acl for a resource. The client and the server must therefore start from that acl and follow any [wac:include](http://www.w3.org/ns/auth/acl#include) relations which should be logically mergeable monotonically to create the complete acl for that resource. Given that these mergers happen monotonically the server can stop at any moment it finds an acl that gives the user permission, in the knowledge that any other acl included cannot undo the statement added.
64+
Note: if it can be shown that ACLs can be inconsistent, then a SoLiD server may want to check the consistency of these acls before allowing a write to succeed.
65+
66+
Given the above, here is one way for a container to deal with defaults for new resources that works by reference using a
67+
relation `wac:defaultInclude` that points from an acl file to another one that will be included by default in any new resource created.
68+
69+
This would work like this. Consider an `ldp:Container` named `</container/>`'s whose acl file `</container/.acl>` includes the statement
70+
71+
```Turtle
72+
<.> wac:defaultInclude <default.acl> .
73+
```
74+
75+
On creation of a new resource eg, by `POST`ing some content to `</container/>` with Slug "cat", thereby creating a new resource `</container/cat>` and the associated `</container/cat.acl>` the server on finding the above wac:defaultInclude statement in the container's acl will add the statement:
76+
77+
```
78+
<> wac:include <default.acl> .
79+
```
80+
81+
in the created resource's acl.
82+
83+
#### Pro
84+
* If somone wants to change the all the resources that have a certain default, they can do so just by changing `<default.acl>`.
85+
* If someone wants a particular resource to not have the defaults, they can just remove the `wac:include` triple.
86+
* Reduces storage requirements
87+
* Is very maintainable
88+
* Is monotonic
89+
* client and server verification mechanisms follow the same discovery process
90+
91+
#### Cons
92+
* verifying an ACL will often require fetching one new default acl, but that is local so it should be very fast.
93+
* this does require some form of regular expression (e.g. a simple version based on globbing) as the `wac:include`ed `default.acl` needs to make statements about sets of resources such as
94+
```Turtle
95+
[] acl:accessToClass [ acl:regex "https://jack.example/.*[.]acl" ];
96+
acl:mode acl:Read;
97+
acl:agentClass foaf:Agent .
98+
```
99+
* it does mean that on a naive reading of `wac:regex` some acls will not actually be true of all files specified in the regular expression, as they are only valid if the resource's acl includes them using `wac:include`. Perhaps there is a way of thinking of the `acl:regex` relation in way that does not make this false. Perhaps it should be read as defining a subclass of resources that fit the given pattern.
57100

58101
--
59102

0 commit comments

Comments
 (0)