Skip to main content

did:webs DID Method Resolver

Project description

did:webs resolver

A DID resolver for did:webs and did:keri DIDs also compatible with the Universal Resolver.

A demonstration of a did:webs service and resolver. Implements the did:webs specification.

CI codecov

Components:

  • did:webs static artifact generator - generates did.json and keri.cesr for did:webs DIDs.
  • did:webs resolver in static server mode - serves static did.json and keri.cesr files from a local directory for did:webs DIDs. Works with the Universal Resolver subcomponent of the did:webs resolver below.
  • did:webs dynamic artifact resolver - dynamically generates did.json and keri.cesr files upon receiving HTTP requests to /{did path}/{aid}/{did.json,keri.cesr}.
  • did:webs resolver service - supports the DIF Universal Resolver at /1.0/identifiers/{did}
    • supports both did:webs and did:keri DID resolution.

Quick Start

The quick start shows you how to use either the Docker Compose setup or the local shell script setup to:

  1. Generate did:webs artifacts (did.json, keri.cesr)
  2. Host those artifacts using a static server
  3. Resolve a did:webs DID against those artifacts using the dws did webs resolve command.
  4. Resolve a did:keri DID against those artifacts using the dws did keri resolve command.
  5. Run the did:webs resolver service in static server mode supporting the Universal Resolver.

Docker

  1. docker compose up - this will generate the did:webs assets (did.json, keri.cesr), start the static server, start the did:webs resolver service, and boot up the dws-shell container.
  2. docker compose exec -it dws-shell /bin/bash - drop in to the shell container to run commands.
  3. review the ./docker/test-resolutions.sh for a guide on how to use either the universal resolver resource or the dws did webs resolve command to resolve did:webs DIDs.

Local Shell Script

  1. kli witness demo to start the witnesses up. Run this from the root of the keripy respository in a separate terminal window.
  2. Create a local Python virtual environment with uv lock and uv sync to install the dependencies.
  3. Source the uv environment with source .venv/bin/activate.
  4. Run the local script with ./local/did_webs_workflow.sh to view the end-to-end resolution process.

Developers - Getting Started

Developers who want to jump into using the did:webs reference implementation should follow the Getting Started guide.

A breakdown of the commands can be found here.

did:webs service

For a did:webs service to operate securely it should only serve AIDs whose KELs have been processed into the service's database.

There are two methods to do this:

  1. Local only support - start the service using an existing local keystore.

This is useful for development and can be done by provide an existing named keystore to the did:webs service.

For example, to start the service using the multisig1 keystore (https://github.com/WebOfTrust/keripy/blob/v1.2.4/scripts/demo/basic/multisig.sh)

dws did webs service --name multisig1
  1. Import supported - start the service using an empty local keystore, and import AID KELs. The following workflow can be applied to start the service, export an existing keystore and import it to the service.
dws did webs service --name dws
kli export --name multisig1 --files 

to import an AID to the service securely we use a IPEX Grant to present the exported KEL to the service.

kli grant 

Bootstrapping

Prior art

did:keri resolver by Philip Feairheller @pfeairheller here

Thank you to Markus Sabadello @peacekeeper from DanubeTech who started the original tutorial for IIW37 here

Development Warnings

  • Some of the tests in test_habs.py and test_clienting.py are flaky, so re-running the tests is fine. We need to use more mocks there. The problem in habbing gets down to how the "temp=False" option causes Filer to use or not use temporary filesystem files. We should just mock this out. The problem in clienter is likely due to timeouts not being set with enough of a margin of error. Mocking here might be the best solution as well.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

did_webs_resolver-0.3.3.tar.gz (146.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

did_webs_resolver-0.3.3-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file did_webs_resolver-0.3.3.tar.gz.

File metadata

  • Download URL: did_webs_resolver-0.3.3.tar.gz
  • Upload date:
  • Size: 146.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.5

File hashes

Hashes for did_webs_resolver-0.3.3.tar.gz
Algorithm Hash digest
SHA256 683fb20ede36742b51d0a29d620e28976bde347e5cf635ace228b97a10a1fe33
MD5 2b784a29a143e3b199227a477466d3e0
BLAKE2b-256 5d800e7a84cbeaa7dc223aed28495eb82025f096cb07e16b71daab7aec829e3c

See more details on using hashes here.

File details

Details for the file did_webs_resolver-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for did_webs_resolver-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48b08b0cb44ad8c598f3e23b93330f6f7f529c9996bc2d3a51f9e86771a47ae5
MD5 a7852b415afcce30a8e38b5bbf15b90f
BLAKE2b-256 778dc1ae5eb30ad42ef075ab34e83b4cf121575950a78ab06c3b625fbc1b7d21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page