Skip to content

Commit b5fbe10

Browse files
Change Group section to agentGroup, move agentClass to proposals/
1 parent 8a0a0e7 commit b5fbe10

File tree

3 files changed

+87
-21
lines changed

3 files changed

+87
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
##### v.0.4.0
2+
3+
- Change Group ACL definition spec to one based on `vcard:hasMember` instead of
4+
`acl:agentClass`. Move previous `agentClass` based section to `proposals/` for
5+
archival purposes.
6+
17
##### v.0.3.1
28

39
- Add a discussion of infinite loops in Group ACL resolution

README.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Next](https://www.w3.org/community/ldpnext/)) type systems, such as the
1212
[Solid](https://github.com/solid/solid) project (see also the parent
1313
[spec](https://github.com/solid/solid-spec)).
1414

15-
**Current Spec version:** `v.0.3.1` (see [CHANGELOG.md](CHANGELOG.md))
15+
**Current Spec version:** `v.0.4.0` (see [CHANGELOG.md](CHANGELOG.md))
1616

1717
## Table of Contents
1818

@@ -224,10 +224,10 @@ as denoted by her WebID URI, `https://alice.databox.me/profile/card#me`.
224224

225225
### Groups of Agents
226226

227-
To give access to a group of agents, use the `acl:agentClass` predicate.
228-
The object of an `agentClass` statement is a hash fragment identifier that
229-
resolves to an RDF class statement in a **Group Listing** document.
230-
If a WebID is listed in that document, *and* it's of the specified class, it is
227+
To give access to a group of agents, use the `acl:agentGroup` predicate.
228+
The object of an `agentGroup` statement is a link to a **Group Listing**
229+
document. The WebIDs of group members are listed in it, using the
230+
`vcard:hasMember` predicate. If a WebID is listed in that document, it is
231231
given access.
232232

233233
Example ACL resource, `shared-file1.acl`, containing a group permission:
@@ -249,32 +249,40 @@ Example ACL resource, `shared-file1.acl`, containing a group permission:
249249
a acl:Authorization;
250250
acl:accessTo <https://alice.example.com/docs/shared-file1>;
251251
acl:mode acl:Read, acl:Write;
252-
acl:agentClass <https://alice.example.com/work-groups#Accounting>;
253-
acl:agentClass <https://alice.example.com/work-groups#Management>.
252+
acl:agentGroup <https://alice.example.com/work-groups#Accounting>;
253+
acl:agentGroup <https://alice.example.com/work-groups#Management>.
254254
```
255255

256256
Corresponding `work-groups` Group Listing document:
257257

258258
```ttl
259259
# Contents of https://alice.example.com/work-groups
260260
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
261-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
261+
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
262262
263263
<> a acl:GroupListing.
264264
265-
<#Employee> a rdfs:Class.
266-
<#Accounting> a rdfs:Class.
267-
<#Management> a rdfs:Class.
265+
<#Accounting>
266+
a vcard:Group;
267+
vcard:hasUID <urn:uuid:8831CBAD-1111-2222-8563-F0F4787E5398:ABGroup>;
268+
dc:created "2013-09-11T07:18:19+0000"^^xsd:dateTime;
269+
dc:modified "2015-08-08T14:45:15+0000"^^xsd:dateTime;
268270
269-
<https://bob.example.com/profile/card#me> a <#Employee>, <#Accounting>.
270-
<https://candice.example.com/profile/card#me> a <#Employee>, <#Accounting>.
271+
# Accounting group members:
272+
vcard:hasMember <https://bob.example.com/profile/card#me>;
273+
vcard:hasMember <https://candice.example.com/profile/card#me>.
271274
272-
<https://deb.example.com/profile/card#me> a <#Employee>, <#Management>.
275+
<#Management>
276+
a vcard:Group;
277+
vcard:hasUID <urn:uuid:8831CBAD-3333-4444-8563-F0F4787E5398:ABGroup>;
278+
279+
# Management group members:
280+
vcard:hasMember <https://deb.example.com/profile/card#me>.
273281
```
274282

275283
#### Group Listings - Implementation Notes
276284

277-
When implementing support for `acl:agentClass` and Group Listings, keep in mind
285+
When implementing support for `acl:agentGroup` and Group Listings, keep in mind
278286
the following issues:
279287

280288
1. Group Listings are regular documents (potentially with their own `.acl`s).
@@ -285,7 +293,7 @@ the following issues:
285293

286294
##### Group Listings - Authentication of External Requests
287295

288-
Group Listings via `acl:agentClass` links introduce the possibility of an ACL
296+
Group Listings via `acl:agentGroup` links introduce the possibility of an ACL
289297
checking engine having to make requests to other servers. Given that access to
290298
those external group listings can be protected, the question immediately arises:
291299
By what mechanism should the ACL checking engine authenticate its request to
@@ -327,7 +335,7 @@ examples.
327335
##### Infinite Request Loops in Group Listings
328336

329337
Since Group Listings (which are linked to from ACL resources using
330-
the `acl:agentClass` predicate) are regular documents, they can have their very
338+
the `acl:agentGroup` predicate) are regular documents, they can have their very
331339
own `.acl` resources that restrict which users (or groups) are allowed to access
332340
or change them. This fact, that `.acl`s point to Group Listings, which can have
333341
`.acl`s of their own, which can potentially also point to Group Listings, and so
@@ -340,15 +348,15 @@ https://a.com https://b.com
340348
------------- GET ---------------
341349
group-listA <------ group-listB.acl
342350
| ^ contains:
343-
| | agentClass <a.com/group-ListA>
351+
| | agentGroup <a.com/group-ListA>
344352
v GET |
345353
group-listA.acl ------> group-listB
346354
contains:
347-
agentClass <b.com/group-listB>
355+
agentGroup <b.com/group-listB>
348356
```
349357

350358
The access to `group-listA` is controlled by `group-listA.acl`. So far so good.
351-
But if `group-listA.acl` contains any `acl:agentClass` references to *another*
359+
But if `group-listA.acl` contains any `acl:agentGroup` references to *another*
352360
group listing (say, points to `group-listB`), one runs into potential danger.
353361
In order to retrieve that other group listing, the ACL-checking engine on
354362
`https://b.com` will need to check the rules in `group-listB.acl`. And if
@@ -361,7 +369,7 @@ To guard against these loops, implementers have several options:
361369
**A) Do not allow cross-domain Group Listing resolutions**.
362370
The simplest to implement (but also the most limited) option is to disallow
363371
cross-domain Group Listings resolution requests. That is, the ACL-checking code
364-
could detect `agentClass` links pointing to external servers during ACL
372+
could detect `agentGroup` links pointing to external servers during ACL
365373
resolution time, and treat those uniformly (as errors, or as automatic "access
366374
denied").
367375

proposals/agent-class.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
### Groups of Agents and `agentClass`
2+
3+
**Note:** Current spec uses `acl:agentGroup` and `vcard:hasMember` to implement
4+
group membership. This section is saved here for reference / archival purposes.
5+
6+
To give access to a group of agents, use the `acl:agentClass` predicate.
7+
The object of an `agentClass` statement is a hash fragment identifier that
8+
resolves to an RDF class statement in a **Group Listing** document.
9+
If a WebID is listed in that document, *and* it's of the specified class, it is
10+
given access.
11+
12+
Example ACL resource, `shared-file1.acl`, containing a group permission:
13+
14+
```ttl
15+
# Contents of https://alice.databox.me/docs/shared-file1.acl
16+
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
17+
18+
# Individual authorization - Alice has Read/Write/Control access
19+
<#authorization1>
20+
a acl:Authorization;
21+
acl:accessTo <https://alice.example.com/docs/shared-file1>;
22+
acl:mode acl:Read, acl:Write, acl:Control;
23+
acl:agent <https://alice.example.com/profile/card#me>.
24+
25+
# Group authorization, giving Read/Write access to two groups, which are
26+
# specified in the 'work-groups' document.
27+
<#authorization2>
28+
a acl:Authorization;
29+
acl:accessTo <https://alice.example.com/docs/shared-file1>;
30+
acl:mode acl:Read, acl:Write;
31+
acl:agentClass <https://alice.example.com/work-groups#Accounting>;
32+
acl:agentClass <https://alice.example.com/work-groups#Management>.
33+
```
34+
35+
Corresponding `work-groups` Group Listing document:
36+
37+
```ttl
38+
# Contents of https://alice.example.com/work-groups
39+
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
40+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
41+
42+
<> a acl:GroupListing.
43+
44+
<#Employee> a rdfs:Class.
45+
<#Accounting> a rdfs:Class.
46+
<#Management> a rdfs:Class.
47+
48+
<https://bob.example.com/profile/card#me> a <#Employee>, <#Accounting>.
49+
<https://candice.example.com/profile/card#me> a <#Employee>, <#Accounting>.
50+
51+
<https://deb.example.com/profile/card#me> a <#Employee>, <#Management>.
52+
```

0 commit comments

Comments
 (0)