This repository contains SolidLab research artefacts on use of UMA in the Solid ecosystem.
-
@solidlab/uma: Experimental and opinionated implementation of UMA Grants and UMA Federation. -
@solidlab/uma-css: UMA modules for the Community Solid Server. -
@solidlab/ucp: Usage Control Policy utility component.
In order to run this project you need to perform the following steps.
- Ensure that you are using Node.js 20 or higher, e.g. by running
nvm use. (see .nvmrc) - Enable Node.js Corepack with
corepack enable. - Run
yarn installin the project root (this will automatically callyarn build). - Run
yarn start.
This will boot up a UMA server and compatible Community Solid Server instance.
You can then execute the following flows:
yarn script:public:GETthe public/alice/profile/cardwithout redirection to the UMA server;yarn script:private:PUTsome text to the private/alice/private/resource.txt, protected by a simple WebID check;yarn script:uma-ucp:PUTsome text to the private/alice/other/resource.txt, protected by a UCP enforcer checking WebIDs according to policies inpackages/uma/config/rules/policy/.yarn script:collection:POST,GETandDELETEsome text to/from/alice/public/resource.txtto test the correct creation and deletion of resource registrations on the UMA server. An AssetCollection policy is used to create/alice/public/. More information on the collection implementation can be found in documentation/collections.md.yarn script:uma-odrl-policy: Tests all policy management APIs.yarn script:uma-odrl-end2end: Tests the access request management APIs
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.
A more extensive getting started guide can be found in documentation/getting-started.md.
More information on policy management can be found in documentation/policy-management.
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.
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 or the OdrlAuthorizer which supports simple ODRL policies. A NamespacedAuthorizer is used to apply different authorizers to different containers.
A variant of the server that only uses ODRL for authorization can be started with yarn start:odrl.
A corresponding script can then be executed with yarn script:uma-odrl.
The test policies can be found in packages/uma/config/rules/odrl.