Skip to content

Commit d053bdd

Browse files
committed
add Roles and clarify delegation
1 parent b757e38 commit d053bdd

7 files changed

Lines changed: 94 additions & 27 deletions

File tree

‎devbox.lock‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,72 @@
22
"lockfile_version": "1",
33
"packages": {
44
"bikeshed@latest": {
5-
"last_modified": "2025-05-06T08:06:31Z",
6-
"resolved": "github:NixOS/nixpkgs/1cb1c02a6b1b7cf67e3d7731cbbf327a53da9679#bikeshed",
5+
"last_modified": "2026-06-27T07:37:20Z",
6+
"resolved": "github:NixOS/nixpkgs/3d46470bb3030020f7e1361f33514854f5bfa86d#bikeshed",
77
"source": "devbox-search",
8-
"version": "5.1.2",
8+
"version": "7.0.7",
99
"systems": {
1010
"aarch64-darwin": {
1111
"outputs": [
1212
{
1313
"name": "out",
14-
"path": "/nix/store/byk7ag1k1mxrn0k2xdik7rzln600d39h-bikeshed-5.1.2",
14+
"path": "/nix/store/a58icyxsx4marmfk34ify5x9k1b9pzi7-bikeshed-7.0.7",
1515
"default": true
1616
},
1717
{
1818
"name": "dist",
19-
"path": "/nix/store/x7p41gi116xfdn43qyzx61yamwyhaqxk-bikeshed-5.1.2-dist"
19+
"path": "/nix/store/81clsi2648lg4pcdvxyvakybj4xyw8pa-bikeshed-7.0.7-dist"
2020
}
2121
],
22-
"store_path": "/nix/store/byk7ag1k1mxrn0k2xdik7rzln600d39h-bikeshed-5.1.2"
22+
"store_path": "/nix/store/a58icyxsx4marmfk34ify5x9k1b9pzi7-bikeshed-7.0.7"
2323
},
2424
"aarch64-linux": {
2525
"outputs": [
2626
{
2727
"name": "out",
28-
"path": "/nix/store/5nwp942h6mni220dzqbcqb04mxnh6mfc-bikeshed-5.1.2",
28+
"path": "/nix/store/1h8pg6z7wifywkfp6zaflp4cak87nwr2-bikeshed-7.0.7",
2929
"default": true
3030
},
3131
{
3232
"name": "dist",
33-
"path": "/nix/store/jjrv0vwvnnjpd6wisb8b3xg24rxz5zwp-bikeshed-5.1.2-dist"
33+
"path": "/nix/store/cqb8vdb68by49wc79bls26vxa5g6fq96-bikeshed-7.0.7-dist"
3434
}
3535
],
36-
"store_path": "/nix/store/5nwp942h6mni220dzqbcqb04mxnh6mfc-bikeshed-5.1.2"
36+
"store_path": "/nix/store/1h8pg6z7wifywkfp6zaflp4cak87nwr2-bikeshed-7.0.7"
3737
},
3838
"x86_64-darwin": {
3939
"outputs": [
4040
{
4141
"name": "out",
42-
"path": "/nix/store/vwh4hjpd0r9zw4fxdwjb6z1x9l39jmq9-bikeshed-5.1.2",
42+
"path": "/nix/store/xw373ya70pmwlsckyx69kysbmqgbl585-bikeshed-7.0.7",
4343
"default": true
4444
},
4545
{
4646
"name": "dist",
47-
"path": "/nix/store/rk3091z67f5mamqywgasm1y9ghfmyizl-bikeshed-5.1.2-dist"
47+
"path": "/nix/store/m34l5yblj7yr4239m27r9mq0p8l17m45-bikeshed-7.0.7-dist"
4848
}
4949
],
50-
"store_path": "/nix/store/vwh4hjpd0r9zw4fxdwjb6z1x9l39jmq9-bikeshed-5.1.2"
50+
"store_path": "/nix/store/xw373ya70pmwlsckyx69kysbmqgbl585-bikeshed-7.0.7"
5151
},
5252
"x86_64-linux": {
5353
"outputs": [
5454
{
5555
"name": "out",
56-
"path": "/nix/store/l80hk33mi0wsynwl12livkc6c3sqj0bd-bikeshed-5.1.2",
56+
"path": "/nix/store/km6j3qlqm7v271b3lx8jbp3mvnl4fcdk-bikeshed-7.0.7",
5757
"default": true
5858
},
5959
{
6060
"name": "dist",
61-
"path": "/nix/store/gpxy88dizvl00fj10r4dbh0qa10ham5r-bikeshed-5.1.2-dist"
61+
"path": "/nix/store/nr1fcnlhjlx3wwpfypvswj9iff1lgzif-bikeshed-7.0.7-dist"
6262
}
6363
],
64-
"store_path": "/nix/store/l80hk33mi0wsynwl12livkc6c3sqj0bd-bikeshed-5.1.2"
64+
"store_path": "/nix/store/km6j3qlqm7v271b3lx8jbp3mvnl4fcdk-bikeshed-7.0.7"
6565
}
6666
}
6767
},
6868
"github:NixOS/nixpkgs/nixpkgs-unstable": {
69-
"resolved": "github:NixOS/nixpkgs/b3582c75c7f21ce0b429898980eddbbf05c68e55?lastModified=1746576598&narHash=sha256-FshoQvr6Aor5SnORVvh%2FZdJ1Sa2U4ZrIMwKBX5k2wu0%3D"
69+
"last_modified": "2026-07-05T19:27:47Z",
70+
"resolved": "github:NixOS/nixpkgs/f205b5574fd0cb7da5b702a2da51507b7f4fdd1b?lastModified=1783279667&narHash=sha256-%2FNAkDSsve%2BGNM0Bt6tleJdCGfsTlK89nPjkVOzZMo0s%3D"
7071
}
7172
}
7273
}

‎proposals/primer/application.bs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ header in HTTP request.
299299
"title": "Solid Application Interoperability - TypeScript implementation",
300300
"authors": [
301301
"elf Pavlik",
302-
"Maciej Samoraj",
303-
"Ángel Araya"
302+
"Maciej Samoraj"
304303
]
305304
}
306305
}

‎proposals/primer/authorization-agent.bs‎

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<pre class='metadata'>
32
Title: Solid Application Interoperability - Authorization Agent Primer
43
Shortname: sai-authorization-agent-primer
@@ -14,7 +13,7 @@ Boilerplate: issues-index no
1413
Local Boilerplate: logo yes
1514
Markup Shorthands: markdown yes
1615
Editor: elf Pavlik
17-
!Version: 0.1
16+
!Version: 0.2
1817
Abstract: Primer for libraries intended to be used by authorization agents.
1918
Boilerplate: omit conformance, omit abstract
2019
</pre>
@@ -233,10 +232,14 @@ link to the user's messaging app. On the other side, the Authorization Agent of
233232
Independent of the platform, Authorization Agents should always allow a simple copy of the link by the sender
234233
(e.g., `navigator.clipboard.writeText`) and paste it by the recipient.
235234

235+
## Roles
236+
237+
[[SAI#role]] alows creating authorization can grant access to a team, a group of agents. Roles are only visible to to the agent who can access the Roles Registry and Authorization Registry. Roles can be also used to define a set of data owners, to whose data the authorization applies to. [[#generating-grants-from-authorizations]] describes that process in detail.
238+
236239
## Application Registration
237240

238241
Application Registrations are created by the End-user for applications they use.
239-
Since applications do not own or share data, they will never have a [#reciprocal-registration].
242+
Since applications do not own or share data, they will never have a [[#reciprocal-registration]].
240243

241244
## Agent Registration Discovery ## {#agent-registration-discovery}
242245

@@ -350,6 +353,62 @@ will also have zero or more data grants if it is inheriting from data authorizat
350353

351354
Example of an implementation can be found in [[SAI-JS]] and [[SAI-JAVA]]
352355

356+
<video autoplay loop muted playsinline width="100%">
357+
<source src="roles.mp4" type="video/mp4">
358+
Your browser does not support the video tag.
359+
</video>
360+
361+
## Requesting Delegated Data Grants ## {#requesting-delegated-grants}
362+
363+
[[SAI#delegation-issuance-endpoint]] specifies how to request delegation of access. Given following request:
364+
365+
<figure>
366+
<pre highlight=json>
367+
{
368+
"grantee": "https://projectron.example/#id",
369+
"grantedBy": "https://alice.example/#id",
370+
"dataOwner": "https://bob.example/#id",
371+
"registeredShapeTree": "http://data.example/shapetrees/pm#ProjectTree",
372+
"hasDataRegistration": "https://work.bob.example/data/08a99a10/",
373+
"hasStorage": "https://storage.bob.example/",
374+
"scopeOfGrant": "http://www.w3.org/ns/solid/interop#AllFromRegistry",
375+
"accessMode": [
376+
"http://www.w3.org/ns/auth/acl#Read",
377+
"http://www.w3.org/ns/auth/acl#Create"
378+
],
379+
"hasInheritingGrant": [
380+
{
381+
"grantee": "https://projectron.example/#id",
382+
"grantedBy": "https://alice.example/#id",
383+
"dataOwner": "https://bob.example/#id",
384+
"registeredShapeTree": "http://data.example/shapetrees/pm#TaskTree",
385+
"hasDataRegistration": "https://work.bob.example/data/45e092cf/",
386+
"hasStorage": "https://storage.bob.example/",
387+
"scopeOfGrant": "http://www.w3.org/ns/solid/interop#Inherited",
388+
"accessMode": [
389+
"http://www.w3.org/ns/auth/acl#Read",
390+
"http://www.w3.org/ns/auth/acl#Create"
391+
]
392+
}
393+
]
394+
}
395+
</pre>
396+
<figcaption>Delegation request sent to Bob's Authorization Agent</figcaption>
397+
</figure>
398+
<figure>
399+
<pre highlight=json>
400+
[
401+
"https://auth.bob.example/grants/9849ssd6",
402+
"https://auth.bob.example/grants/sioa97dj"
403+
]
404+
</pre>
405+
<figcaption>Delegation response received from Bob's Authorization Agent</figcaption>
406+
</figure>
407+
408+
## Revoking Delegated Data Grants ## {#revoking-delegated-grants}
409+
410+
Agent who delegated the grant (`grantedBy`) can revoke them by simply making `DELETE` HTTP request targeting the URL that identifies a grant. Orphaned grant with `Inherited` scope provide no access and they should be revoked together with the parent grant. Agent who owns the data (`dataOwner`) can revoke delegated grants at any time, agent who delegates them (`grantedBy`) should have their Authorization Agent subscribed to notifications to remove links to revoked grants from agent registries (access grants).
411+
353412
<pre class="biblio">
354413
{
355414
"sai": {
@@ -386,8 +445,7 @@ Example of an implementation can be found in [[SAI-JS]] and [[SAI-JAVA]]
386445
"title": "Solid Application Interoperability - TypeScript implementation",
387446
"authors": [
388447
"elf Pavlik",
389-
"Maciej Samoraj",
390-
"Ángel Araya"
448+
"Maciej Samoraj"
391449
]
392450
},
393451
"sai-java": {

‎proposals/primer/roles.mp4‎

103 KB
Binary file not shown.

‎proposals/specification/data-authorization.bs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ as an indication that access to a specific data instance is intended to be share
158158

159159
### Delegation Issuance Endpoint ### {#delegation-issuance-endpoint}
160160

161+
Issue(338):
162+
161163
[=Authorization Agent=] of a grantee, can request delegation of [=Data Grants=] using this endpoint.
162164
This endpoint expects HTTP `POST` with content type `application/json` including top level JSON object
163165
representing a [=Data Grant=] without an `id` and all inheriting data grants nested in `hasInheritingGrant`.
@@ -168,7 +170,8 @@ representing a [=Data Grant=] without an `id` and all inheriting data grants nes
168170

169171
* MUST either create all requested grants or return error.
170172
* MUST return `application/json` with an array including `id` for every created grant when responding with success.
171-
173+
* MUST set Read access to the grantee agent for every created grant
174+
* MUST set Read and Delete access to the granted by agent for every created grant
172175

173176
### Authorization Agent Discovery ### {#authorization-agent-discovery}
174177

‎proposals/specification/role.bs‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,18 @@ internal to the context of the [=Social Agent=] defining the Role.
3434
</pre>
3535
</figure>
3636

37-
When [=Authorization Agent=] generates [=Data Grants=] from a [=Data Authorization=]
38-
* MUST generate a [=Data Grant=] for each member of that [=Role=] as `dataOwner` if a [=Role=] is used as `dataOwner`.
37+
When [=Authorization Agent=] generates [=Data Grants=] from a [=Data Authorization=] it
38+
* MUST generate a [=Data Grant=] for each member of that [=Role=] as `dataOwner` if a [=Role=] is used as `dataOwner`.
3939
* MUST generate a [=Data Grant=] for each member of that [=Role=] as `grantee` if a [=Role=] is used as `grantee`.
4040
* MUST generate a [=Data Grant=] for the cartesian product of the two [=Roles=], with each member as corresponding `dataOwner` or `grantee` if a [=Role=] is used as both `dataOwner` and `grantee`.
4141

42+
When a [=Role=] is modified, [=Authorization Agent=] managing it
43+
* MUST generate corresponding [=Data Grants=], when a member is added to the [=Role=]
44+
* MUST revoke corresponding [=Data Grants=], when a member is removed from the [=Role=]
45+
* MUST revoke [=Data Authorizations=] where the role was used as a `dataOwner` or a `grantee`, when the [=Role=] is deleted.
46+
47+
Note: When [=Data Authorization=] is revoked, [=Data Grants=] that are derrived because of it also must be revoked.
48+
4249
## Role Registry ## {#datamodel-role-registry}
4350

4451
A <dfn>Role Registry</dfn> contains all the [=Roles=] defined by the [=Social Agent=] who owns the [=Role Registry=]

‎proposals/specification/schema.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
"required": [
6868
"accessMode",
6969
"dataOwner",
70-
"delegationOfGrant",
7170
"grantedBy",
7271
"grantee",
7372
"hasDataRegistration",

0 commit comments

Comments
 (0)