Within the Solid Quest we want to examine and get a feeling for the scenario where citizens own their own data. In this scenario, government could issue data about citizens, which they can place in their own wallet/datapod/etc. This repo combines two mock services: a local government and Kadaster. The local government contains the registry of citizen data, the Basisregistratie Personen BRP, and Kadaster, the land administration office, keeps records of land ownership in the BRK.
Both services can issue claims, information about the subject. An example is that a certain citizen is the owner of some parcel. Since the citizen is owner of their own data, we need some way to verify the data wasn't tampered with. For this, we'll use Verifiable Credentials. The services issue these VCs, which the citizen can reshare whenever necessary.
The mock backend service architecture is designed to support the koopovereenkomst app of the Solid Quest with some example Verifiable Credentials. The following description outlines the approach of the mock service:
The architecture of the service revolves around generating Verifiable Credentials (VCs) for webIDs without the need for authentication or authorization. This eliminates the complexity of user authentication and allows for a streamlined demonstration. Users can simply submit a webID to the backend, triggering the creation of a dummy VC associated with the provided webID. If the webID is new, a new entry can be creating, creating dummy data.
The properties in the credentials originate from the Zorgeloos Vastgoed ontology [1, 2], with an added webID property. The context for the properties used in the credentials can be found in /public/contexts/
.
An identification credential contains the following:
{
"webID": "http://localhost:3001/koper-koos/profile/card#me",
"type": "NatuurlijkPersoon",
"aanduidingNaamgebruik": "De heer",
"geboorte": {
"type": "Geboorte",
"geboortedatum": "1994-01-06",
"geboorteland": "Nederland",
"geboorteplaats": "Apeldoorn"
},
"naam": "Koos"
}
An ownership credential contains the following:
{
"webID": "http://localhost:3001/verkoper-vera/profile/card#me",
"eigendom": {
"perceel": {
"begrenzingPerceel": "",
"kadastraleGrootte": "42",
"identificatie": 10020263270000
},
"pand": {
"adres": "Laan van Westenenk 701",
"postcode": "7334 DP",
"woonplaats": "Apeldoorn"
}
}
}
Note: The eigendom.perceel.identificatie
can be used to query the Kadaster Knowledge Graph for information about the parcel.
.
├── data
├── public
│ ├── contexts
│ └── keys
└── src
- data
- Contains the database entries for the government services. This obviously is mock data. Extra entries can be generated via the `/registerWebID` endpoint.
- public
- Files that should be publicly available, namely: the public keys used for verifying the VCs. Also, additional context information for the contents of the credentials.
- src
- Contains the project source code.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov