Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
860f8aa
feat: demo with file backend instead of templates
termontwouter Mar 12, 2024
3e91364
feat: clean up demo css config
termontwouter Mar 12, 2024
87c967e
feat: setup componentsjs build for UCP package
termontwouter Mar 12, 2024
89a19c3
feat: make rulestorage configurable
termontwouter Mar 12, 2024
add12cd
chore: restructure startup and demo scripts
termontwouter Mar 13, 2024
da9ad0d
chore: some remaining demo setup
termontwouter Mar 13, 2024
b444753
feat: ucp changes for demo (#37)
termontwouter Mar 13, 2024
ba3defa
feat: made N3 ruleset configurable
termontwouter Mar 13, 2024
246cf53
chore: cleanup & align n3 rules a bit
termontwouter Mar 13, 2024
bc4528d
chore: debugging & cleaunup
termontwouter Mar 14, 2024
6e9fd94
fix: last fixes to flow
termontwouter Mar 15, 2024
61d1ff7
docs: reasoning problem
termontwouter Mar 15, 2024
fdee9c4
feat: maxe policies container if it does not exist yet
woutslabbinck Mar 15, 2024
93412a3
docs: add instructions to run demo
woutslabbinck Mar 15, 2024
cfc36df
feat: check purpose constraints in negotiation (#38)
termontwouter Mar 25, 2024
e524c16
Added empty .meta file to make sure directory is picked up by github
Dexagod Mar 26, 2024
2acab7b
fix: cors
termontwouter Mar 26, 2024
1592ae0
Feat: finished demo store page
Dexagod Mar 26, 2024
ea3b54c
Merge branch 'demo/setup' of github.com:SolidLabResearch/user-managed…
Dexagod Mar 26, 2024
9d541ae
Authorization companion app
Dexagod Mar 27, 2024
b030dc6
feat: enabled selection and display of policy content
Dexagod Mar 27, 2024
13ab2eb
Feat: form-based policy creation
Dexagod Mar 27, 2024
c8e73ab
Feat: added search bar functionality to store and better error messaging
Dexagod Mar 28, 2024
5b6e954
chore: demo sites cleanup
termontwouter Mar 30, 2024
79ab69a
chore: comment out forgotten degug log
termontwouter Mar 31, 2024
25dbf94
Cleanup: removed unused files
Dexagod Apr 2, 2024
7275b26
docs: Add requirements to README
Dexagod Apr 3, 2024
d6594f8
feat: Add log route. Something wrong with config
Dexagod Apr 3, 2024
f54817a
feat: added example OperationLogger component
Dexagod Apr 3, 2024
aaaa9d0
docs: added requirements list
Dexagod Apr 4, 2024
ab2b691
docs: updated requirements
Dexagod Apr 4, 2024
39c304a
feat: added routes for contract and vc endpoints
Dexagod Apr 4, 2024
59b6a9f
feat: Added VC stuff from Gertjan. We can probably remove all inrupt …
Dexagod Apr 4, 2024
1550ee1
fix: fixed double function call
Dexagod Apr 8, 2024
2c5fe09
feat: skeleton for instantiation actors
Dexagod Apr 8, 2024
09ae73a
cleanup: removed unused code
Dexagod Apr 8, 2024
16b8144
feat: Added contracts to the flow, embedded in the access token
Dexagod Apr 8, 2024
9e244a8
chore: merge from main
termontwouter Apr 9, 2024
102d247
fix: fixed double token route created by merge
Dexagod Apr 16, 2024
2cc90fd
update: requirements list
Dexagod Apr 16, 2024
3816d91
feat: store backend
Dexagod Apr 17, 2024
ca0010b
feat: cleaner version of store site
Dexagod Apr 17, 2024
f4b59e2
feat: Requirement listing + misc
Dexagod Apr 17, 2024
e32a1ae
feat: government vc issue and verify service
Dexagod Apr 23, 2024
87c67a3
feat: update store backend to integrate verifiable credentials
Dexagod Apr 23, 2024
af4d32a
feat: update websites to integrate verifiable credentials
Dexagod Apr 23, 2024
83f2a1b
feat: general credential updates
Dexagod Apr 23, 2024
3ad81dd
update: requirements
Dexagod Apr 24, 2024
4f4d130
feat: added token verification and updated contract storage in store …
Dexagod Apr 25, 2024
83137ce
feat: verify VCs in store backend using API call to gov issuer
Dexagod Apr 25, 2024
2dfe9ce
feat: Added auditing site
Dexagod Apr 29, 2024
266fe6a
feat: added verification checks to auditing site
Dexagod Apr 29, 2024
c7d9191
Fix: fixed vendor webId
Dexagod Apr 30, 2024
f896074
update: Requirements.md
Dexagod Apr 30, 2024
68295da
update: sites CSS updates
Dexagod Apr 30, 2024
e218b6e
Final touches demo + add pages to pod view
Dexagod May 14, 2024
69a63c1
fix: Re-enabled oidc config to allow for login
Dexagod May 14, 2024
30d0391
Fix: Stabilized enabling OIDC with full happy flow and credential ver…
Dexagod May 14, 2024
9ec0a0c
misc: Added profile picture
Dexagod May 15, 2024
f21522e
Misc: Fixing up last things before screencast
Dexagod May 21, 2024
68f7f7b
Update: brought README up to date
Dexagod May 22, 2024
9a96c76
misc: small changes before screencast
Dexagod May 22, 2024
90ab554
update: Update policy to represent a more generic policy modelling vi…
Dexagod Jun 6, 2024
8313c92
fix: Make sure the demo subfolder is installed as well before executi…
Dexagod Jun 6, 2024
485332d
update: Moved the demonstrator README into the main folder
Dexagod Jun 6, 2024
9de76ed
fix: Update lockfile
Dexagod Jun 6, 2024
8cc4c23
Update: update README.md
Dexagod Jun 6, 2024
793b342
add: screencast
Dexagod Jun 6, 2024
1c73c0d
update: changed screencast from mkv to mp4
Dexagod Jun 10, 2024
4e5fb08
Update: Add clone instructions to README.md
Dexagod Jun 10, 2024
288368c
Update package.json
Dexagod Jun 10, 2024
1990fee
feat: Added docker setup
Dexagod Jun 11, 2024
135fc6b
Merge branch 'e2e/setup' of github.com:SolidLabResearch/user-managed-…
Dexagod Jun 11, 2024
e3ea8ca
Update: update README file with docker info and screencast link
Dexagod Jun 11, 2024
4db4fd3
Fix: change absolute path to relative path
Dexagod Jun 11, 2024
f83fcb8
fix: Added network=host flag to docker build
Dexagod Jun 11, 2024
7ed8691
Misc: Warning to make sure people are on the correct branch
Dexagod Jun 11, 2024
c8fa40e
Fix: Set yarn workspaces jobs to unlimited to prevent deadlock and mo…
Dexagod Jun 13, 2024
f0b9654
Feat: Making docker setup more visible in README
Dexagod Jun 13, 2024
1513401
Misc: remove unnecessary bold text
Dexagod Jun 13, 2024
f2b9b38
Update README.md
Dexagod Jun 13, 2024
29595d2
Fix: update links to new URLs
Dexagod Jun 13, 2024
0fdfe31
Merge branch 'e2e/setup' of github.com:SolidLabResearch/user-managed-…
Dexagod Jun 13, 2024
aa3f721
removed demonstrator from core codebase:
Dexagod Aug 6, 2024
ff7a0a3
cleanup: remove irrelevant scripts
Dexagod Aug 6, 2024
ccf0a2f
misc: fixing package.json
Dexagod Aug 6, 2024
17c60c9
feat: Add option to set UMA Auth Server URL on Solid Server initializ…
Dexagod Aug 8, 2024
fa80f93
FLow setup for pacsoi
Dexagod Jan 17, 2025
10efb0e
update flow with pacsoi requirements
Dexagod Jan 21, 2025
2ebf2f6
adding loggers
Dexagod Jan 21, 2025
5b29c96
merge
Dexagod Jan 21, 2025
1567122
Merge develop while retaining test flow
Dexagod Jan 21, 2025
a429713
Checking issues negotiation flow. Adding more debug logs
Dexagod Jan 21, 2025
7589e5a
Finish POC1 demo flow
Dexagod Jan 21, 2025
6cf4550
Update flow
Dexagod Jan 22, 2025
b343182
fix: align with JSON-LD format for ODRL
Dexagod Jan 23, 2025
790f479
updated readme
Dexagod Jan 27, 2025
a9b0e93
Comment out VC flow for now
Dexagod Jan 27, 2025
6473dce
Script output
Dexagod Jan 27, 2025
6f5736f
Backend updates to include multi-target policies
Dexagod Feb 4, 2025
ec7652e
trying to update docker - failing on network request still
Dexagod Feb 6, 2025
04a2fe5
Fix: fixed introspection endpoint to work with JWT token factory inte…
Dexagod Feb 20, 2025
780499f
Small README update
Dexagod Feb 21, 2025
8ec5c5c
fix: Support multiple claims on multiple targets
joachimvh Apr 15, 2025
26f088a
chore: Use postinstall instead of prepare in package.json
joachimvh Feb 7, 2025
45a3f8d
chore: Keep dependencies in sync
joachimvh Feb 7, 2025
2ffbe2c
chore: Remove superfluous LICENSE files
joachimvh Feb 7, 2025
5202308
chore: Move devdependencies to root package.json
joachimvh Feb 7, 2025
73c7e18
fix: Set minimum Node version to 20
joachimvh Feb 11, 2025
e1827e9
feat: Replace server initialization with CSS classes
joachimvh Feb 11, 2025
1f29944
feat: Use TargetExtractor to generate URL
joachimvh Feb 11, 2025
0a08d96
fix: Remove unneeded checks
joachimvh Feb 11, 2025
adccc3c
feat: Use strings for method
joachimvh Feb 11, 2025
ae723f8
fix: Clean up body parsing
joachimvh Feb 12, 2025
c57fe4f
fix: Clean up response writing
joachimvh Feb 12, 2025
9b2a35a
fix: Remove logger variables
joachimvh Feb 12, 2025
8893166
feat: Use CSS logging
joachimvh Feb 12, 2025
d584691
feat: Use CSS errors
joachimvh Feb 12, 2025
4258a02
refactor: Remove unused code
joachimvh Feb 12, 2025
7d88c9a
feat: Use CSS KeyValueStorage
joachimvh Feb 12, 2025
fa88566
feat: Use CSS CorsHandler
joachimvh Feb 13, 2025
6a1624e
feat: Use AsyncHandler
joachimvh Feb 13, 2025
890d922
feat: Simplify RoutedHttpRequestHandler
joachimvh Mar 19, 2025
94f9167
chore: Move types to dependencies when relevant
joachimvh Mar 19, 2025
400c818
chore: Remove dependencies that are part of node
joachimvh Mar 19, 2025
b1c8f05
refactor: Move HttpHandler types to same file
joachimvh Mar 20, 2025
139f989
feat: Move JSON conversion away from route handlers
joachimvh Apr 14, 2025
f1419dd
feat: Wrap error handler around main HTTP handler
joachimvh Feb 26, 2025
38a4996
fix: Minor fixes
joachimvh Apr 14, 2025
e97c4c5
fix: Check grant_type on token requests
joachimvh Mar 20, 2025
24a6201
refactor: Use Components.js override for pod seeding
joachimvh Mar 24, 2025
3e7db96
chore: Dedupe yarn lockfile
joachimvh Mar 25, 2025
8cd950d
refactor: Use Components.js override for JWKS handler
joachimvh Mar 25, 2025
46ac60e
refactor: Use Components.js override for account handler
joachimvh Mar 25, 2025
8997bf3
refactor: Use Components.js override for UMA authentication
joachimvh Mar 25, 2025
ca9e6a7
fix: Remove AuthResourceHttpHandler implementation
joachimvh Mar 25, 2025
12a9d11
refactor: Use Components.js override for main LDP component
joachimvh Mar 25, 2025
a83c957
refactor: Replace WWW-Authenticate header with UMA writer
joachimvh Mar 25, 2025
ed19b61
refactor: Move UMA-specific components to separate configs
joachimvh Apr 15, 2025
e1f4007
refactor: Move Override components to separate configs
joachimvh Apr 15, 2025
cc88bfe
refactor: Use AccountStore interfaces from CSS
joachimvh Apr 15, 2025
721f86e
chore: Remove screencast
joachimvh Apr 24, 2025
8669be7
docs: Give more general information in README
joachimvh Apr 24, 2025
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
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ tmp

# Misc
.DS_Store
.vscode/
10 changes: 10 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"versionGroups": [
{
"label": "Use workspace protocol when developing local packages",
"dependencies": ["@solidlab/uma-css", "@solidlab/ucp", "@solidlab/uma"],
"dependencyTypes": ["prod", "dev"],
"pinVersion": "workspace:^"
}
]
}
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:20.0.0
ENV NODE_ENV=production
WORKDIR /usr/src/app
# COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
# RUN npm install -g yarn

COPY . .

ENV YARN_VERSION 4.0.0
RUN yarn policies set-version $YARN_VERSION

RUN corepack enable yarn
RUN yarn install
# COPY . .

RUN yarn build

EXPOSE 3000
EXPOSE 4000
EXPOSE 4444
EXPOSE 5123
EXPOSE 8201
EXPOSE 8202
EXPOSE 8203

RUN chown -R node /usr/src/app
USER node
CMD ["yarn", "start:demo"]
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@

# SolidLab's User Managed Access
# SolidLab's User Managed Access

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


## Packages

- [`@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).
- [`@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).

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

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


## Getting started

In order to run this project you need to perform the following steps.
In order to run this project you need to perform the following steps.

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

This will boot up a UMA server and compatible Community Solid Server instance.
This will boot up a UMA server and compatible Community Solid Server instance.

You can then execute the following flows:

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

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

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

## Demonstration

A more extensive example of a real life use case has been implemented as described in [./demo/README.md](./demo/README.md).

Instead of running `yarn start`, you can run `yarn start:demo` to start the server with an alternative configuration.
With this configuration you can run the `script:demo`,
which runs with experimental contracts.

## Implemented features

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 ...

The packages in this project currently only support a fixed UMA AS per CSS RS.
Authorization can be done with a simple, unverified, WebID embedded in the ticket
using the [WebIdAuthorizer](packages/uma/src/policies/authorizers/WebIdAuthorizer.ts)
or the [PolicyBasedAuthorizer](packages/uma/src/policies/authorizers/PolicyBasedAuthorizer.ts)
which supports simple ODRL policies.

### Usage control policy enforcement

Expand All @@ -56,10 +60,10 @@ Used for creating a modular engine that calculates which access modes are grante
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/).

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


## Next steps

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.
More advanced ODRL evaluation can be found in the `feat/ODRL-evaluator` branch.
119 changes: 119 additions & 0 deletions Requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# TODOs for end-to-end requirements:

## Final sprint

- [ ] load generic and instantiated policies in auth frontend
- [ ] update continuation screens in the shop frontend
- [ ] MAKE THE VIDEO
- [ ] show credential, policies -> buy item -> show instantiation that has been added for the user -> show auditing trail
- [ ] Write setup requirements
- [ ] Create new SolidLabResearch repository that links to the e2e/setup branch

### To Fix By Demo

- [ ] Add Policy Screen update
- [ ] Final fixes generic policy
- [ ] Change trust display on auditing screen
- [ ] Change contract to "Instantiated Policy"
- [ ] Instantiated Policy -> Trusted instead of verified, age keep verified
- [ ] Auth app -> My pod app
- [ ] My Data
- [ ] My Policies
- [ ] Relevant linking?
- [X] Login information on every App:
- [X] Green -> You are logged in\
- [X] Red -> You are not logged in
- [X] Blue -> Auditer 3 is logged in
- [ ] Store login buttons:
- [ ] Remove its'me option
- [ ] Continue as Ruben -> Share WebID link (with profile avatar) (This is not a Login!)





### HAS TO HAPPEN
- [X] VC and token validation on the auditing frontend
- [X] Represent this with green checkmarks in the frontend
- [ ] Check policy models

### If there is time
- [ ] Check policy evaluation system
- [ ] Do time related policies work?
- [ ] Can we include wrong purposes that fail?
- [ ] Can we do a check on store registration
- [ ] Store decision to give purchase access or not in the audit entry?

### If there is a lot of time
- [ ] Pod-based logging (not super necessary atm?)
- [ ] Can we model accesses by 2 different people?

## Assignment minimum requirements
- [X] The system needs to facilitate the exchange of the data (date of birth).
- [X] A date of birth must be available at some location in the dataspace
- [X] The system needs to provide the store with the trust that the data is correct.
- [X] The stored DOB must be a verifiable credential
- [X] The stored credential must be verifiable on the store backend
- [X] The system needs to provide the person with the trust that their data will only be used for age checking.
- [X] The policy system must be able to handle a purpose
- [ ] The system allows the person to specify in advance the generic policy that “all Belgian stores are allowed to read my date of birth”.
- [X] The system needs to be able to store a generic policy
- [X] An interface needs to be available to store this policy
- [ ] The policy must be modeled in an appropriate way
- [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”
- [ ] MOCKED -> double check though
- [X] The system allows the above interaction to take place without the person having to click on any dialogs.
- [X] The interaction is automatic after a WebID button is clicked to show what is happening.
- [ ] The system allows the store to prove that they were allowed to perform the age verification.
- [X] A backend storage must be in place for the store
- [X] The store website must forward data storage and checks to the backend
- [X] The system allows the person to check that their data was used correctly.
- [X] An auditing routine must be built in the store backend
- [X] An auditing routine must be built as a frontend interface
- [ ] The Government VC Service
- [X] Must be able to create a VC
- [X] VC must be transfered to demo pod storage -> Not required for Demo because of fixed keypair seed
- [ ] VCs can be validated on the backend of the store
- [ ] The Auditing use-case
- [X] The store backend provides the option to retrieve all required data to audit
- [ ] This can be represented in an auditing browser app that shows colors when verified (token + VC)


Small note with using the UMA server token signature as the contract signature.
We can only trace this back to the UMA Server, and cannot reliably check the connection between the WebID and the UMA Server

Another idea: preemptive auditing:
- The store has to advertise who is auditing them
- The contract has to be signed both ways
- upon agreement, the data is sent to the store AND to the auditing service.
- on auditing, the service can check if the store is withholding information



## Demonstrator requirements
- [ ] Protocol message modelling
- [ ] claim request messages
- [ ] claim provision messages
- [ ] Logging system (no hard requirement)
- [X] Create logging interface
- [ ] Log Instantiated Policies
- [ ] Log Access Grants
- [ ] Log Operations
- [ ] Authorization system
- [ ] include logging endpoint
- [ ] include authorization endpoint
- [ ] include policy management endpoint
- [X] Mock Policy instantiation
- [ ] Write out policy model that works for demo
- [X] ??? Discover existing policies to instantly grant some access
- [ ] Link generic - instantiated - grant - operation
- [x] Negotiation implementations
- [X] Return instantiated policy requirements from ticket resolving function to create a signed instantiated policy to return
- [ ] Signatures
- [ ] Create a VC form an instantiated policy - I use the return JWT as a free signature
- [ ] Create verification endpoint for issued VCs
- [ ] Government mockup
- [ ] Create verification endpoint for issued VCs (can be mocked)
- [ ] Client
- [ ] Make some mock-up of how storage could be handled in a way that allows for auditing
- [ ] Recurring requests make use of the same grant?
36 changes: 0 additions & 36 deletions demo/README.md

This file was deleted.

1 change: 1 addition & 0 deletions demo/data/ruben/medical/smartwatch.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<this> <is> <smartwatch> <data>.
Loading