Skip to content

Commit

Permalink
created DIDs, added NutsOrganizationCredentials
Browse files Browse the repository at this point in the history
  • Loading branch information
woutslakhorst committed May 14, 2024
1 parent 6c366b4 commit 27f08a3
Show file tree
Hide file tree
Showing 20 changed files with 1,552 additions and 14 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ CSS framework is https://tailwindcss.com
- execute `make docker`

### After complete wipe of data
- add did: `docker exec nuts-demo-ehr-node-left-1 curl --location 'localhost:8081/internal/vdr/v2/did' --header 'Content-Type: application/json' --data '{"tenant": "left"}'`
- use https://admin.left.local and add did:web:left.local:iam:left
- issue an NutsOrganizationCredential for this DID from this DID
- use https://admin.right.local and add did:web:right.local:iam:right
- issue an NutsOrganizationCredential for this DID from this DID
- add did: `docker exec nuts-demo-ehr-node-right-1 curl --location 'localhost:8081/internal/vdr/v2/did' --header 'Content-Type: application/json' --data '{"tenant": "right"}'`

### Run
Expand Down
16 changes: 11 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ services:
depends_on:
- node-left
- node-right
- admin-left
- admin-right
- demo-left
- demo-right
ports:
- 80:80
- 443:443
Expand All @@ -14,17 +18,19 @@ services:
node-left: &node
image: nutsfoundation/nuts-node:master
environment:
NUTS_CONFIGFILE: /opt/nuts/nuts.yaml
NUTS_CONFIGFILE: /nuts/nuts.yaml
volumes:
- "./docker-compose/left/config/node/nuts.yaml:/opt/nuts/nuts.yaml"
- "./docker-compose/left/config/node/nuts.yaml:/nuts/nuts.yaml"
- "./docker-compose/left/data/node:/nuts/data"
- "./docker-compose/left/data/node/policies:/opt/nuts/policies"
- "./docker-compose/left/config/node/policies:/nuts/policies"
- "./docker-compose/left/config/node/discovery:/nuts/discovery"
node-right:
<<: *node
volumes:
- "./docker-compose/right/config/node/nuts.yaml:/opt/nuts/nuts.yaml"
- "./docker-compose/right/config/node/nuts.yaml:/nuts/nuts.yaml"
- "./docker-compose/right/data/node:/nuts/data"
- "./docker-compose/right/data/node/policies:/opt/nuts/policies"
- "./docker-compose/right/config/node/policies:/nuts/policies"
- "./docker-compose/right/config/node/discovery:/nuts/discovery"
admin-left: &admin
image: nutsfoundation/nuts-admin:main
environment:
Expand Down
79 changes: 79 additions & 0 deletions docker-compose/left/config/node/discovery/eOverdracht.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"id": "urn:nuts.nl:usecase:eOverdrachtDemo2024",
"endpoint": "https://node.left.local/discovery/urn:nuts.nl:usecase:eOverdrachtDemo2024",
"presentation_max_validity": 36000,
"presentation_definition": {
"format": {
"ldp_vc": {
"proof_type": [
"JsonWebSignature2020"
]
},
"ldp_vp": {
"proof_type": [
"JsonWebSignature2020"
]
},
"jwt_vc": {
"alg": [
"ES256"
]
},
"jwt_vp": {
"alg": [
"ES256"
]
}
},
"id": "pd_any_care_organization",
"name": "Care organization",
"purpose": "Finding a care organization for authorizing access to medical metadata",
"input_descriptors": [
{
"id": "id_nuts_care_organization_cred",
"constraints": {
"fields": [
{
"path": [
"$.type"
],
"filter": {
"type": "string",
"const": "NutsOrganizationCredential"
}
},
{
"path": [
"$.issuer"
],
"filter": {
"type": "string",
"enum": ["did:web:left.local:iam:left", "did:web:right.local:iam:right"]
}
},
{
"id": "organization_name",
"path": [
"$.credentialSubject.organization.name",
"$.credentialSubject[0].organization.name"
],
"filter": {
"type": "string"
}
},
{
"id": "organization_city",
"path": [
"$.credentialSubject.organization.city",
"$.credentialSubject[0].organization.city"
],
"filter": {
"type": "string"
}
}
]
}
}
]
}
}
8 changes: 7 additions & 1 deletion docker-compose/left/config/node/nuts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ auth:
irma:
autoupdateschemas: false
policy:
directory: /opt/nuts/policies
directory: /nuts/policies
discovery:
definitions:
directory: /nuts/discovery
server:
ids:
- urn:nuts.nl:usecase:eOverdrachtDemo2024
153 changes: 153 additions & 0 deletions docker-compose/left/config/node/policies/eOverdracht.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"eOverdracht": {
"organization": {
"format": {
"ldp_vc": {
"proof_type": [
"JsonWebSignature2020"
]
},
"ldp_vp": {
"proof_type": [
"JsonWebSignature2020"
]
},
"jwt_vc": {
"alg": [
"ES256"
]
},
"jwt_vp": {
"alg": [
"ES256"
]
}
},
"id": "pd_any_care_organization",
"name": "Care organization",
"purpose": "Finding a care organization for authorizing access to medical metadata",
"input_descriptors": [
{
"id": "id_nuts_care_organization_cred",
"constraints": {
"fields": [
{
"path": [
"$.type"
],
"filter": {
"type": "string",
"const": "NutsOrganizationCredential"
}
},
{
"path": [
"$.issuer"
],
"filter": {
"type": "string",
"enum": ["did:web:left.local:iam:left", "did:web:right.local:iam:right"]
}
},
{
"id": "organization_name",
"path": [
"$.credentialSubject.organization.name",
"$.credentialSubject[0].organization.name"
],
"filter": {
"type": "string"
}
},
{
"id": "organization_city",
"path": [
"$.credentialSubject.organization.city",
"$.credentialSubject[0].organization.city"
],
"filter": {
"type": "string"
}
}
]
}
}
]
},
"user": {
"format": {
"ldp_vc": {
"proof_type": [
"JsonWebSignature2020"
]
},
"ldp_vp": {
"proof_type": [
"JsonWebSignature2020"
]
},
"jwt_vc": {
"alg": [
"ES256"
]
},
"jwt_vp": {
"alg": [
"ES256"
]
}
},
"id": "pd_any_employee_credential",
"name": "Employee",
"purpose": "Finding an employee for authorizing access to medical metadata",
"input_descriptors": [
{
"id": "id_employee_credential_cred",
"constraints": {
"fields": [
{
"path": [
"$.type"
],
"filter": {
"type": "string",
"const": "EmployeeCredential"
}
},
{
"id": "employee_identifier",
"path": [
"$.credentialSubject.identifier",
"$.credentialSubject[0].identifier"
],
"filter": {
"type": "string"
}
},
{
"id": "employee_name",
"path": [
"$.credentialSubject.name",
"$.credentialSubject[0].name"
],
"filter": {
"type": "string"
}
},
{
"id": "employee_role",
"path": [
"$.credentialSubject.roleName",
"$.credentialSubject[0].roleName"
],
"filter": {
"type": "string"
}
}
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgg109wmL3R7G6+KwI
OvEyIxJLn6FS3D+NUVl3MgrV+tuhRANCAARaOBO49G9TVAXq8cps96O6W0GwYrUG
20dUlXV2WgloGZDlmLy3JYQSDdBiRxi+rgUiR1GWmJU7JTscDc4rsIBF
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgQArZvIL6cGeVKX7h
Lmpw5XA41fjstNDjF2Ci/Ds3ubWhRANCAASikB7PnHQKUlxCGonAjDhRcXWfoY43
7c0DHd6TlOtmwb9tlanVSuDjm0maTrOSI484tX1eLHhDsIaiFcM2FM6R
-----END PRIVATE KEY-----
Binary file modified docker-compose/left/data/node/sqlite.db
Binary file not shown.
2 changes: 2 additions & 0 deletions docker-compose/left/data/node/vcr/trusted_issuers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NutsOrganizationCredential:
- did:web:node.left.local:iam:left
79 changes: 79 additions & 0 deletions docker-compose/right/config/node/discovery/eOverdracht.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"id": "urn:nuts.nl:usecase:eOverdrachtDemo2024",
"endpoint": "https://node.left.local/discovery/urn:nuts.nl:usecase:eOverdrachtDemo2024",
"presentation_max_validity": 36000,
"presentation_definition": {
"format": {
"ldp_vc": {
"proof_type": [
"JsonWebSignature2020"
]
},
"ldp_vp": {
"proof_type": [
"JsonWebSignature2020"
]
},
"jwt_vc": {
"alg": [
"ES256"
]
},
"jwt_vp": {
"alg": [
"ES256"
]
}
},
"id": "pd_any_care_organization",
"name": "Care organization",
"purpose": "Finding a care organization for authorizing access to medical metadata",
"input_descriptors": [
{
"id": "id_nuts_care_organization_cred",
"constraints": {
"fields": [
{
"path": [
"$.type"
],
"filter": {
"type": "string",
"const": "NutsOrganizationCredential"
}
},
{
"path": [
"$.issuer"
],
"filter": {
"type": "string",
"enum": ["did:web:left.local:iam:left", "did:web:right.local:iam:right"]
}
},
{
"id": "organization_name",
"path": [
"$.credentialSubject.organization.name",
"$.credentialSubject[0].organization.name"
],
"filter": {
"type": "string"
}
},
{
"id": "organization_city",
"path": [
"$.credentialSubject.organization.city",
"$.credentialSubject[0].organization.city"
],
"filter": {
"type": "string"
}
}
]
}
}
]
}
}
5 changes: 4 additions & 1 deletion docker-compose/right/config/node/nuts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ auth:
irma:
autoupdateschemas: false
policy:
directory: /opt/nuts/policies
directory: /nuts/policies
discovery:
definitions:
directory: /nuts/discovery
Loading

0 comments on commit 27f08a3

Please sign in to comment.