nuts-foundation / nuts-node

The reference implementation of the Nuts specification. A decentralized identity network based on the w3c ssi concepts with practical functionality for the healthcare domain.
https://nuts-foundation.gitbook.io
GNU General Public License v3.0
25 stars 16 forks source link

DID forwards compatibility #3191

Closed woutslakhorst closed 1 month ago

woutslakhorst commented 5 months ago

List of required changes

Config

DID feature consolidation

Storage

VDR v2 API

VDR

Auth v2 API

Discovery API

Migration

Wallet

Key management

Broken

reinkrul commented 3 months ago

For private key storage, we should consider providing both subject and key ID to the storage layer; depending on the backend, it can then store keys in a multi-tenant or hierarchical manner, if supported.

reinkrul commented 3 months ago

There should be a way to derive the subject ID from a DID: when a remote party accesses data using a service-to-service access token, the PEP extracts the DID of the local party, which is then passed to the upstream resource server.

But the vendor applications now interact with the Nuts node using the subject ID instead of DID, so applications administer subject ID of DID (e.g. in mapping to a tenant/customer-specific FHIR store). Thus; it needs to know which subject the token is about, instead of just the DID. Options:

Issue: https://github.com/nuts-foundation/nuts-node/issues/3258

woutslakhorst commented 3 months ago

There should be a way to derive the subject ID from a DID: when a remote party accesses data using a service-to-service access token, the PEP extracts the DID of the local party, which is then passed to the upstream resource server.

But the vendor applications now interact with the Nuts node using the subject ID instead of DID, so applications administer subject ID of DID (e.g. in mapping to a tenant/customer-specific FHIR store). Thus; it needs to know which subject the token is about, instead of just the DID. Options:

Have an API that returns the subject ID for a particular DID (and all related DIDs and other useful info) Have Token Introspection provide the subject ID

we should make this an issue and discuss (label!) it.

reinkrul commented 2 months ago

Since we now support multiple DID methods, and not all of them might not be supported by all verifiers (e.g., they disabled did:web in favor of did:tdw), we can't pre-emptively select a DID to use in the flows (user flow (OpenID4VP), OpenID4VCI and service-to-service flow). These need to be selected based on what the server asks for:

User flow

In the user flow, DIDs are used in 2 places:

OpenID4VCI

In OpenID4VCI, a DID is used to create proof which also signals to the issuer who is the intended holder of the credential. This can also be replaced by the holder inspecting supported_did_methods.

Service to Service flow

This flow uses a DID when fulfilling a Presentation Definition. This needs to be replaced with the submission builder choosing the right DID(s).

Summarizing

We need to following features:

woutslakhorst commented 1 month ago

all done or covered by new issues.