Sign inSign up

fabisch/did-web-verification-method-server

By fabisch

Updated 4 days ago

Serves an existing PEM certificate as did:web verification method.

Image
0

2.1K

fabisch/did-web-verification-method-server repository overview

did:web Verification Method Server

Serves an existing PEM certificate as did:web verification method.

Verifiable credentials contain a proof section, which contains a cryptographic signature of the credential's contents. A verifier needs to obtain the issuer's public key in order to validate the proof. The public key is usually accompanied by a certificate that identifies the issuer.

This service exposes an existing PEM certificate as DID document containing the verification method for the JsonWebKey2020 proof type. In accordance with the DID specification, the public key is exposed as a JSON Web Key (JWK, RFC7517). The x5u property is added to the JWK, in order to provide the full certificate chain. Optionally, known root certificates are added.

The DID document will be exposed on any valid did:web URL. The certificate chain will be linked accordingly. Examples:

Configuration Options

The service is configured via environment variables.

ConfigurationDescription
CERTIFICATEPEM-formatted certificate chain (required)
PORTPort to expose the service (defaults to 3000)
ADD_ROOT_CERTIFICATEEnable to add root certificate to the certificate chain (defaults to true)

Deployment

If you use Docker, there is a prebuilt image available, which is kept up to date with this repository: fabisch/did-web-verification-method-server:latest

If you are looking to deploy this on Kubernetes, where you already have your TLS certificate stored in a secret, you may find this gist useful.

Usage as Package

The handlers to serve the did document and certificate chaint can also be used through an npm package: @fabianscheidt/did-web-verification-method-server

Tag summary

Content type

Image

Digest

sha256:2a0e059a2

Size

60.8 MB

Last updated

4 days ago

docker pull fabisch/did-web-verification-method-server