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

UC3 Inheritance #216

Merged
merged 37 commits into from
Jul 21, 2021
Merged
Changes from 18 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
60313d0
UC 3 Inheritance
matthieubosquet May 26, 2021
7c7119f
Update uc-3-inheritance.md
matthieubosquet May 26, 2021
79a5139
Update uc-3-inheritance.md
matthieubosquet May 26, 2021
a760d8a
Update uc-3-inheritance.md
matthieubosquet May 26, 2021
2517390
get closer to UCR example, use relative URLs
bblfish Jun 2, 2021
ed285af
Align indenting
matthieubosquet Jun 4, 2021
1f7118c
Clarify wac group access
matthieubosquet Jun 9, 2021
1a5525d
Add missing prefix and clarify acl link
matthieubosquet Jun 9, 2021
52d9040
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jun 9, 2021
8872afd
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jun 9, 2021
45f90d6
Revert to relative container <.> syntax
matthieubosquet Jun 9, 2021
c483d59
Add an example resource hierarchy for ACP
matthieubosquet Jun 9, 2021
009f27f
Update proposals/evaluation/uc-3-inheritance.md
bblfish Jun 11, 2021
8bec8b8
Update proposals/evaluation/uc-3-inheritance.md
bblfish Jun 11, 2021
8116d93
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jun 15, 2021
4ef2fd1
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jun 15, 2021
5f6c351
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jun 15, 2021
9423e9d
added wac+:imports example
bblfish Jun 15, 2021
4905dea
Update proposals/evaluation/uc-3-inheritance.md
bblfish Jun 15, 2021
d68bc80
Fix use case, remove redundant text.
matthieubosquet Jun 30, 2021
2ead6fd
Add WAC effective resource and ACP modify
matthieubosquet Jul 1, 2021
f11ad58
Document structure fix
matthieubosquet Jul 1, 2021
563d705
Naming consistency
matthieubosquet Jul 1, 2021
c4fb0e8
Use same spacing everywhere
matthieubosquet Jul 2, 2021
f6db265
Ammend one proposed solution as not effective
matthieubosquet Jul 7, 2021
89ae405
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 7, 2021
3e70481
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 7, 2021
204023c
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 7, 2021
ced00e2
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 7, 2021
e5b5ffe
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 7, 2021
3fdca97
added the client point of view
bblfish Jul 14, 2021
f718fcf
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 19, 2021
05f66ff
Update proposals/evaluation/uc-3-inheritance.md
matthieubosquet Jul 19, 2021
d0436c2
Update proposals/evaluation/uc-3-inheritance.md
bblfish Jul 21, 2021
1af5c54
minor clarification
bblfish Jul 21, 2021
d853020
Merge branch 'uc3-inheritance' of github.com:bblfish/authorization-pa…
bblfish Jul 21, 2021
0fc465b
Add effective ACR explanation
matthieubosquet Jul 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions proposals/evaluation/uc-3-inheritance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Access Inheritance Use Cases

Within this document, the following namespace prefix bindings are used:

| Prefix | Namespace |
| --------- | ----------------------------------- |
| `acl` | `http://www.w3.org/ns/auth/acl#` |
| `ac` | WAC+ namespace, undetermined |
| `acp` | `http://www.w3.org/ns/solid/acp#` |
| `ex` | `https://example.com/` |
| `ldp` | `http://www.w3.org/ns/ldp#` |
| `vcard` | `http://www.w3.org/2006/vcard/ns#`
|
bblfish marked this conversation as resolved.
Show resolved Hide resolved

## 1. Read access on a collection of resources

Alice can read all resources in a collection.

### ACP

## Read access to a group on a collection of resources

See also: [UCR 2.3 Collection resource inherited access](https://solid.github.io/authorization-panel/authorization-ucr/#uc-inheritance)

### Setup

The Weekly status collection is an `ldp:BasicContainer`, which contains other `ldp:BasicContainers`, one for each weekly meeting, into which further documents can be placed.

```turtle
# Resource: </weekly-status/>
<.>
a ldp:BasicContainer ;
ldp:contains <2021-04-28/>, <2021-05-05/>, <2021-05-12/> .
```

The `</weekly-status/.acl>` resource is advertised as `</weekly-status/>`'s access control list via a `Link` header with a relationship type of `http://www.w3.org/ns/auth/acl#accessControl`.
bblfish marked this conversation as resolved.
Show resolved Hide resolved
matthieubosquet marked this conversation as resolved.
Show resolved Hide resolved

We have the following hierarchy of resources (shown in more detail in the UCR)

```
</weekly-status/>
</weekly-status/.acl> ## for WAC rules
</weekly-status/.acp> ## for ACP
</weekly-status/.ac> ## for WAC+
</weekly-status/2021-04-28/>
</weekly-status/2021-04-28/report.md>
</weekly-status/2021-05-05/>
</weekly-status/2021-05-05/report.md>
</weekly-status/2021-05-05/diagram.jpg>
</weekly-status/2021-05-12/>
</daily-metrics/>
```

We want to enable read access to all resources contained in `</weekly-status/>` for a group of people (`ex:Alice` & `ex:Bob`).

### ACP

Bob and Alice are part of the agent matcher `</acp/matcher/research#g1>`:

```turtle
# Resource: </acp/matcher/research>
<#g1>
a acp:AgentMatcher ;
acp:agent ex:Bob, ex:Alice .
```

The research policy <#p1> gives read access to all agents in `</acp/matcher/research#g1>`:

```turtle
# Resource: </acp/policy/research>
<#p1>
a acp:Policy ;
acp:anyOf </acp/matcher/research#g1> ;
acp:allow acl:Read .
```

The access control `<#authorization>` enables read access to all resources contained by `</weekly-status/>` for all agents matched by `</acp/matcher/research#g1>` is:

```turtle
# Resource: </weekly-status/.acp>
<#authorization>
a acp:AccessControl ;
acp:apply </acp/policy/research#p1> ;
acp:applyMembers </acp/policy/research#p1> .
```

Todo: what is the ACR for
`</weekly-status/2021-04-28/report.md>` and what information is in it?

### WAC

Bob and Alice are members of the research group `</groups/research#g1>`:

```turtle
# Resource: </groups/research>
<#g1>
a vcard:Group ;
vcard:hasMember ex:Bob ;
vcard:hasMember ex:Alice .
```

The acl enabling read access to all resources contained by `</weekly-status/>` for all members of group `</groups/research#g1>` is:

```turtle
# Resource: </weekly-status/.acl>
<#authorization>
a acl:Authorization ;
acl:agentGroup </groups/research#g1> ;
acl:default <.> ;
matthieubosquet marked this conversation as resolved.
Show resolved Hide resolved
acl:mode acl:Read .
```

## 2. Changing permissions to a subcollection

Bob wants to give give Carol read/write access but only to the collection </weekly-status/2021-04-28/> ? (What example from the UCR does this correspond to best?)

### ACP

todo

### WAC

To change the access rules to the `</weekly-status/2021-04-28/>` collection Bob must edit `</weekly-status/2021-04-28/.acl>`. But doing so will disable the default access control rule located in `</weekly-status/.acl>` . So the content of the PUT must contain the default rule and the new ones.
matthieubosquet marked this conversation as resolved.
Show resolved Hide resolved
matthieubosquet marked this conversation as resolved.
Show resolved Hide resolved

```Turtle
# Resource: </weekly-status/2021-04-28/.acl>
<#authz>
a acl:Authorization ;
acl:agentGroup </groups/research#g1> ;
acl:default <.> ;
acl:mode acl:Read .

<#authzNew>
a acl:Authorization ;
acl:agent ex:Carol ;
acl:default <.> ;
matthieubosquet marked this conversation as resolved.
Show resolved Hide resolved
acl:mode acl:Read, acl:Write .
```

### WAC+ac:imports

[WAC+:imports](https://github.com/solid/authorization-panel/issues/210) works just as WAC does above with `:default` working as shown. The advantage of `ac:imports` is that the resource `</weekly-status/2021-04-28/.ac>` need only be set to contain:

```Turtle
# Resource: </weekly-status/2021-04-28/.ac>
<> ac:imports <../.acl> .

<#authzNew>
a acl:Authorization ;
acl:agent ex:Carol ;
acl:default <.> ;
acl:mode acl:Read, acl:Write .
```

The advantage of this is that it removes the needed duplication of the `</weekly-status/.acl#authorization>` rule, so that if that needs to be edited it can be done so in one place.
bblfish marked this conversation as resolved.
Show resolved Hide resolved