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

VDR: Support multiple did:web domains #2790

Open reinkrul opened 8 months ago

reinkrul commented 8 months ago

Currently, a Nuts node is tied to 1 domain for did:web DIDs. E.g., if the Nuts node's url config is https://example.com, all created did:web DIDs will be in the format of did:web:example.com:iam:....

However, there are use cases in which a free-to-choose domain (or at least not tied to 1 specific preconfigured domain) is useful for did:web DIDs;

I suggest making the did:web DID domain (and port) free to choose, to make the Nuts node more flexible. There's no security/functional requirement that prevents us from doing so. It also decouples the did:web domain from the auth module's IRMA/Yivi base path, which also uses the url config (which might be constraining when they have to be the same).

Impact

Suggested changes

Side notes

If did:web does not use url anymore (say the caller MUST provide the DID), only the Auth module uses the url config parameter. Thus, it could be optional (again)...

woutslakhorst commented 8 months ago

Does the XIS/ECD require multiple domain or the auth server (which can be shared)?

rolandgroen commented 8 months ago

This request came from my notion that in order to issue a VC (oid4vci), we currently do not make use of the nuts-node in both the mitzXnuts as the iaa in de zorg implementations. The reason is that we need an /authorize endpoint to log the user in, and then later on issue a VC. We could make use of the nuts-node provision both the did:web implementation, VC creation and wallet management, however, that would reside in a somewhat complex host / url mapping setup or proxy pattern, because the did:web is bound to one single hostname by configuration.

In this context I wondered why the binding with the hostname / did:web is this rigid: in our current implementation we are very hostname independent as we build up he did:web base path using the incoming request (host header or X-Forwarded-Host). Although not really 100% clear how this could solve our problem, it would introduce some flexibility we would welcome in solving the issue.