Credentialling Services setup (Dev / Docker / Helm)
The same three-way split as the Registry: run locally for development, bring it up with Docker Compose, or deploy to Kubernetes with Helm.
Node.js version:
v20.11.0Runs identity-service, credential-schema, and credentials-service locally. Vault is required — see Working with the Vault.
Environment variables: check the docker-compose.yml for the values credentialling services expect (e.g.
DATABASE_URL=postgres://postgres:postgres@db:5432/registry).Per service:
cdinto the service directory,yarn install, thenyarn start.
Dependency chain
System requirements: 4 Cores / 8 GB RAM / 100 GB disk (same as Registry).
Download the credentialling docker-compose.yml from the
devopsrepo.Create a
.envfrom the example file provided alongside it.
docker-compose up -d
docker-compose psSwagger: <base-url>/docs
Same trip-up as the Registry Helm page: this deploys from Sunbird-RC/devops, not a deployment repo, and the credentialling charts live specifically at deploy-as-code/helm/v2/credentialling.
System requirements and prerequisites are the same as the Registry Helm setup, plus the High-Level Architecture page is worth a read first.
Deploy Vault
Credentialling Services use HashiCorp Vault as the keystore. Follow HashiCorp's Kubernetes Raft deployment guide in the same namespace you created above, then:
Initialize (first time only):
vault operator init— save the unseal keys and root token securely. Base64-encode the root token asVAULT_SECRET_TOKENinvalues.yaml.Unseal:
vault operator unseal, repeated with enough distinct unseal keys to reach the threshold (typically 3).Log in:
vault login <root_token>.Enable a KV engine:
vault secrets enable -path=kv kv-v2— whatever path you choose here must matchroot_path: http://vault:8200/v1/kvinvalues.yaml.
Service configuration
Environment variables passed to each credentialling service.
DATABASE_URL
postgres://<username>:<password>@<db_url>:<db_port>/<db_name>
VAULT_ADDR
Address for the HashiCorp Vault, e.g. http://<vault_address>:8200/v1
VAULT_TOKEN
Vault API token
VAULT_ROOT_PATH
Vault root path for the key-value store, e.g. http://<vault_address>:8200/v1/kv
VAULT_TIMEOUT
API timeout for Vault in ms (e.g. 5000)
VAULT_PROXY
false
JWKS_URI
JWKS URI of the OAuth2 resource server for handling Bearer tokens
ENABLE_AUTH
Enable/disable authentication (e.g. false)
WEB_DID_BASE_URL
Base URL to generate a web-based DID
Supported signature suites: Ed25519Signature2020, Ed25519Signature2018, RSASignature2018.
DATABASE_URL
postgres://<username>:<password>@<db_url>:<db_port>/<db_name>
(identity endpoint)
http://identity-service:3332
JWKS_URI
JWKS URI of the OAuth2 resource server
ENABLE_AUTH
Enable/disable authentication
DATABASE_URL
postgres://<username>:<password>@<db_url>:<db_port>/<db_name>
CREDENTIAL_SERVICE_BASE_URL
Base URL for the credential service, used to set the verify URL in the QR code
JWKS_URI
JWKS URI of the OAuth2 resource server
ENABLE_AUTH
Enable/disable authentication
QR_TYPE
Set to W3C_VC to embed a compressed VC in the QR code instead of a verify-credential URL
Last updated