Skip to content

Commit 4f6b8a8

Browse files
authored
Merge pull request #45 from SolidLabResearch/project/pacsoi-poc1
Merge pacsoi branch into main
2 parents c502489 + 8669be7 commit 4f6b8a8

219 files changed

Lines changed: 4504 additions & 25732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.gitignore
6+
**/.project
7+
**/.settings
8+
**/.toolstarget
9+
**/.vs
10+
**/.vscode
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/charts
15+
**/docker-compose*
16+
**/compose*
17+
**/Dockerfile*
18+
**/node_modules
19+
**/npm-debug.log
20+
**/obj
21+
**/secrets.dev.yaml
22+
**/values.dev.yaml
23+
LICENSE
24+
README.md

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ tmp
6767

6868
# Misc
6969
.DS_Store
70+
.vscode/

.syncpackrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"versionGroups": [
3+
{
4+
"label": "Use workspace protocol when developing local packages",
5+
"dependencies": ["@solidlab/uma-css", "@solidlab/ucp", "@solidlab/uma"],
6+
"dependencyTypes": ["prod", "dev"],
7+
"pinVersion": "workspace:^"
8+
}
9+
]
10+
}

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM node:20.0.0
2+
ENV NODE_ENV=production
3+
WORKDIR /usr/src/app
4+
# COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
5+
# RUN npm install -g yarn
6+
7+
COPY . .
8+
9+
ENV YARN_VERSION 4.0.0
10+
RUN yarn policies set-version $YARN_VERSION
11+
12+
RUN corepack enable yarn
13+
RUN yarn install
14+
# COPY . .
15+
16+
RUN yarn build
17+
18+
EXPOSE 3000
19+
EXPOSE 4000
20+
EXPOSE 4444
21+
EXPOSE 5123
22+
EXPOSE 8201
23+
EXPOSE 8202
24+
EXPOSE 8203
25+
26+
RUN chown -R node /usr/src/app
27+
USER node
28+
CMD ["yarn", "start:demo"]

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
2-
# SolidLab's User Managed Access
1+
# SolidLab's User Managed Access
32

43
This repository contains SolidLab research artefacts on use of UMA in the Solid ecosystem.
54

65

76
## Packages
87

9-
- [`@solidlab/uma`](packages/uma): Experimental and opinionated implementation of [UMA Grants](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html) and [UMA Federation](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-federated-authz-2.0.html).
8+
- [`@solidlab/uma`](packages/uma): Experimental and opinionated implementation of [UMA Grants](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html) and [UMA Federation](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-federated-authz-2.0.html).
109

11-
- [`@solidlab/uma-css`](packages/css): UMA modules for the [Community Solid Server](https://github.com/CommunitySolidServer/CommunitySolidServer/).
10+
- [`@solidlab/uma-css`](packages/css): UMA modules for the [Community Solid Server](https://github.com/CommunitySolidServer/CommunitySolidServer/).
1211

1312
- [`@solidlab/ucp`](packages/ucp): Usage Control Policy decision/enforcement component.
1413

15-
1614
## Getting started
1715

18-
In order to run this project you need to perform the following steps.
16+
In order to run this project you need to perform the following steps.
1917

2018
1. Ensure that you are using Node.js 20 or higher, e.g. by running `nvm use`. (see [.nvmrc](./.nvmrc))
21-
1. Enable Node.js Corepack with `corepack enable`.
22-
1. Run `yarn install` in the project root (this will automatically call `yarn build:all`).
23-
1. Run `yarn start:all`.
19+
2. Enable Node.js Corepack with `corepack enable`.
20+
3. Run `yarn install` in the project root (this will automatically call `yarn build`).
21+
4. Run `yarn start`.
2422

25-
This will boot up a UMA server and compatible Community Solid Server instance.
23+
This will boot up a UMA server and compatible Community Solid Server instance.
2624

2725
You can then execute the following flows:
2826

@@ -34,16 +32,22 @@ You can then execute the following flows:
3432

3533
`yarn script:flow` runs all flows in sequence.
3634

35+
As we are still in the progress of documenting everything,
36+
the above scripts are the best way to learn about how everything works.
3737

3838
## Demonstration
3939

40-
A more extensive example of a real life use case has been implemented as described in [./demo/README.md](./demo/README.md).
41-
40+
Instead of running `yarn start`, you can run `yarn start:demo` to start the server with an alternative configuration.
41+
With this configuration you can run the `script:demo`,
42+
which runs with experimental contracts.
4243

4344
## Implemented features
4445

45-
The packages in this project currently only support a fixed UMA AS per CSS RS, and contain only the trivial [AllAuthorizer](packages/uma/src/models/AllAuthorizer.ts) that allows all access. More useful features are coming soon ...
46-
46+
The packages in this project currently only support a fixed UMA AS per CSS RS.
47+
Authorization can be done with a simple, unverified, WebID embedded in the ticket
48+
using the [WebIdAuthorizer](packages/uma/src/policies/authorizers/WebIdAuthorizer.ts)
49+
or the [PolicyBasedAuthorizer](packages/uma/src/policies/authorizers/PolicyBasedAuthorizer.ts)
50+
which supports simple ODRL policies.
4751

4852
### Usage control policy enforcement
4953

@@ -56,10 +60,10 @@ Used for creating a modular engine that calculates which access modes are grante
5660
For more information, you can check out its [own repository](https://github.com/woutslabbinck/ucp-enforcement) which has three engines that use [ODRL rules](https://www.w3.org/TR/odrl-model/).
5761

5862
A test script is provided for a CRUD ODRL engine: `yarn script:ucp-enforcement`.
59-
In the [script](./scripts/test-ucp-enforcement.ts) a read Usage Control Rule (in ODRL) is present together with N3 interpretation rules.
63+
In the [script](./scripts/test-ucp-enforcement.ts) a read Usage Control Rule (in ODRL) is present together with N3 interpretation rules.
6064
Then a read request is performed using the engine, which results in a list of grants. This list is then printed to the console.
6165

6266

6367
## Next steps
6468

65-
Have a look at the [milestones](https://github.com/SolidLabResearch/user-managed-access/milestones) we set for ourselves, and other [issues](https://github.com/SolidLabResearch/user-managed-access/issues) we would like to solve.
69+
More advanced ODRL evaluation can be found in the `feat/ODRL-evaluator` branch.

Requirements.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# TODOs for end-to-end requirements:
2+
3+
## Final sprint
4+
5+
- [ ] load generic and instantiated policies in auth frontend
6+
- [ ] update continuation screens in the shop frontend
7+
- [ ] MAKE THE VIDEO
8+
- [ ] show credential, policies -> buy item -> show instantiation that has been added for the user -> show auditing trail
9+
- [ ] Write setup requirements
10+
- [ ] Create new SolidLabResearch repository that links to the e2e/setup branch
11+
12+
### To Fix By Demo
13+
14+
- [ ] Add Policy Screen update
15+
- [ ] Final fixes generic policy
16+
- [ ] Change trust display on auditing screen
17+
- [ ] Change contract to "Instantiated Policy"
18+
- [ ] Instantiated Policy -> Trusted instead of verified, age keep verified
19+
- [ ] Auth app -> My pod app
20+
- [ ] My Data
21+
- [ ] My Policies
22+
- [ ] Relevant linking?
23+
- [X] Login information on every App:
24+
- [X] Green -> You are logged in\
25+
- [X] Red -> You are not logged in
26+
- [X] Blue -> Auditer 3 is logged in
27+
- [ ] Store login buttons:
28+
- [ ] Remove its'me option
29+
- [ ] Continue as Ruben -> Share WebID link (with profile avatar) (This is not a Login!)
30+
31+
32+
33+
34+
35+
### HAS TO HAPPEN
36+
- [X] VC and token validation on the auditing frontend
37+
- [X] Represent this with green checkmarks in the frontend
38+
- [ ] Check policy models
39+
40+
### If there is time
41+
- [ ] Check policy evaluation system
42+
- [ ] Do time related policies work?
43+
- [ ] Can we include wrong purposes that fail?
44+
- [ ] Can we do a check on store registration
45+
- [ ] Store decision to give purchase access or not in the audit entry?
46+
47+
### If there is a lot of time
48+
- [ ] Pod-based logging (not super necessary atm?)
49+
- [ ] Can we model accesses by 2 different people?
50+
51+
## Assignment minimum requirements
52+
- [X] The system needs to facilitate the exchange of the data (date of birth).
53+
- [X] A date of birth must be available at some location in the dataspace
54+
- [X] The system needs to provide the store with the trust that the data is correct.
55+
- [X] The stored DOB must be a verifiable credential
56+
- [X] The stored credential must be verifiable on the store backend
57+
- [X] The system needs to provide the person with the trust that their data will only be used for age checking.
58+
- [X] The policy system must be able to handle a purpose
59+
- [ ] The system allows the person to specify in advance the generic policy that “all Belgian stores are allowed to read my date of birth”.
60+
- [X] The system needs to be able to store a generic policy
61+
- [X] An interface needs to be available to store this policy
62+
- [ ] The policy must be modeled in an appropriate way
63+
- [X] The system automatically instantiates the above generic policy into the concrete case that “MyBelgianWineStore is allowed to use my date of birth from 2024-03-01 to 2024-03-15 for the purpose of age verification for purchases”
64+
- [ ] MOCKED -> double check though
65+
- [X] The system allows the above interaction to take place without the person having to click on any dialogs.
66+
- [X] The interaction is automatic after a WebID button is clicked to show what is happening.
67+
- [ ] The system allows the store to prove that they were allowed to perform the age verification.
68+
- [X] A backend storage must be in place for the store
69+
- [X] The store website must forward data storage and checks to the backend
70+
- [X] The system allows the person to check that their data was used correctly.
71+
- [X] An auditing routine must be built in the store backend
72+
- [X] An auditing routine must be built as a frontend interface
73+
- [ ] The Government VC Service
74+
- [X] Must be able to create a VC
75+
- [X] VC must be transfered to demo pod storage -> Not required for Demo because of fixed keypair seed
76+
- [ ] VCs can be validated on the backend of the store
77+
- [ ] The Auditing use-case
78+
- [X] The store backend provides the option to retrieve all required data to audit
79+
- [ ] This can be represented in an auditing browser app that shows colors when verified (token + VC)
80+
81+
82+
Small note with using the UMA server token signature as the contract signature.
83+
We can only trace this back to the UMA Server, and cannot reliably check the connection between the WebID and the UMA Server
84+
85+
Another idea: preemptive auditing:
86+
- The store has to advertise who is auditing them
87+
- The contract has to be signed both ways
88+
- upon agreement, the data is sent to the store AND to the auditing service.
89+
- on auditing, the service can check if the store is withholding information
90+
91+
92+
93+
## Demonstrator requirements
94+
- [ ] Protocol message modelling
95+
- [ ] claim request messages
96+
- [ ] claim provision messages
97+
- [ ] Logging system (no hard requirement)
98+
- [X] Create logging interface
99+
- [ ] Log Instantiated Policies
100+
- [ ] Log Access Grants
101+
- [ ] Log Operations
102+
- [ ] Authorization system
103+
- [ ] include logging endpoint
104+
- [ ] include authorization endpoint
105+
- [ ] include policy management endpoint
106+
- [X] Mock Policy instantiation
107+
- [ ] Write out policy model that works for demo
108+
- [X] ??? Discover existing policies to instantly grant some access
109+
- [ ] Link generic - instantiated - grant - operation
110+
- [x] Negotiation implementations
111+
- [X] Return instantiated policy requirements from ticket resolving function to create a signed instantiated policy to return
112+
- [ ] Signatures
113+
- [ ] Create a VC form an instantiated policy - I use the return JWT as a free signature
114+
- [ ] Create verification endpoint for issued VCs
115+
- [ ] Government mockup
116+
- [ ] Create verification endpoint for issued VCs (can be mocked)
117+
- [ ] Client
118+
- [ ] Make some mock-up of how storage could be handled in a way that allows for auditing
119+
- [ ] Recurring requests make use of the same grant?

demo/README.md

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<this> <is> <smartwatch> <data>.

0 commit comments

Comments
 (0)