Add did:webplus Universal Resolver Driver.#534
Add did:webplus Universal Resolver Driver.#534vdods wants to merge 7 commits intodecentralized-identity:mainfrom
Conversation
…pose.yml that might be necessary.
|
I tested the driver and it starts fine but when trying to resolve the example DIDs it throws a |
|
@BernhardFuchs Thanks for the heads up. I haven't been able to repro that -- if you're willing, could you edit your .env file and change |
|
wait is this running on AWS linux perchance? |
|
The infrastructure we use is AWS EKS, so I guess they are using AWS Linux for the EC2 instances. Here is the log with |
…imeouts resulting in wiping the in-memory DB.
|
This should be fixed. This bug was the result of an architectural limitation with universal resolver drivers -- each driver is limited to a single docker container, but in order for did:webplus's driver to function as intended, it should have a Postgres DB backing its storage. So the compromise was to use an in-container SQLite database. The bug stemmed from use of an in-memory SQLite database (intended to minimize latency and reduce concurrency problems), but such a DB gets wiped when all the connections to it time out/are dropped, and with it, the DB migrations. So the fix is to use a file-backed SQLite database within the container so that the migrations that create the tables persist. Still not ideal. @peacekeeper I believe we talked about this before, maybe on a Slack channel, but I can't find the communication -- would it be permissible for a driver to use a second docker container (e.g. running a Postgres server)? I just feel bad that the default configuration for the did:webplus driver is a rather improper configuration. |
|
In general I don't see an issue of having multiple containers per driver. If you are using a DB like Postgres there are some contraints:
I tested the current state of the PR and the first example DID DID document: Resolution Metadata: Document Metadata: |
@BernhardFuchs knows this better, but personally I feel like this could create a lot of complications. As far as I know, we have various scripts in place for building, configuring, and deploying the Universal Resolver, and I'm pretty sure something would break if two containers are required.. Why would a resolver require a database? Is this just some sort of cache, or is it necessary for the DID method to function properly? |
I think this is not an error, but actually normal behavior for a DID that has been deactivated, according to the HTTP(S) binding of the DID Resolution spec: https://www.w3.org/TR/did-resolution/#bindings-https |
Good question. It is to cache DID documents that have been fetched and verified. This makes repeated resolution into a constant-time operation. It's not strictly necessary, but it would degrade the performance of DID resolution unacceptably. The driver for did:webplus runs a "Full" DID resolver, which stores all fetched+verified DID documents. The did:webplus Verifiable Data Gateway (VDG) is a web service (that anyone could deploy) that plays a role similar to the universal resolver driver, in that it fetches, verifies, and resolves/serves DID documents, but is meant to be shared by many parties so that they may all partake in the same "scope of agreement" for DID updates. For did:webplus specifically, the VDG is preferred to the universal resolver driver, because it (along with the other did:webplus components) is architected to provide low resolution latency, resolution robustness+redundancy, and the "scope of agreement" property. |
|
I'm assuming that a second container running a postgres server isn't considered "go", so this PR is complete as-is (it uses an in-container SQLite database for its storage, understanding that it is not permanent storage), and is ready to be merged. |

No description provided.