Closed woutslakhorst closed 1 month 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.
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
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.
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:
In the user flow, DIDs are used in 2 places:
client_id
for signing the Authorization Request (JAR). This could be determined by introducing a custom supported_did_methods
property in the OAuth2 Authorization Server metadata. The wallet then needs to use a DID as client_id
that is supported by the AS.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
.
This flow uses a DID when fulfilling a Presentation Definition. This needs to be replaced with the submission builder choosing the right DID(s).
We need to following features:
supported_client_id_did_methods
in OAuth2 Authorization Server metadata: https://github.com/nuts-foundation/nuts-node/pull/3319all done or covered by new issues.
List of required changes
Config
DID feature consolidation
Storage
VDR v2 API
Check ifcreationOptions
is still applicable. Maybe make it a map with each method as key, so a caller can add custom settings if required. Default of nothing creates all configured methods.VDR
alsoKnownAs
to did documents based on sql db (did table) #3208Auth v2 API
didweb.DIDToURL
is not forwards compatible. Change API so auth server url can be passed: https://github.com/nuts-foundation/nuts-node/issues/3197Discovery API
Migration
add alsoKnownAs to did:nuts docs via network transactions?Wallet
Presentation Submission building should takealsoKnownAs
into accountVerifiable Presentation verification should takealsoKnownAs
into accountKey management
Broken