Verifier Configuration API microservice provides workflow dependent configuration for use by Digital Health Pass verifier application / mobile apps. This service API provides functionality for storing and managing Verifier Configurations, Rules, TrustList, DisplayPreferences etc.
It is recommended to use Node.js v16
The following environment variables must be set before starting the application regardless of the deployment environment.
Environment Variable | Value |
---|---|
LOG_LEVEL | Standard log4js log levels. debug, info, error, etc. |
CONTEXT_ROOT | The context root for all endpoints. e.g. /api/v1/credential-issuer |
USE_HTTPS | true or false. If true, then endpoints must be accessed via https, otherwise http |
TLS_FOLDER_PATH | Default ./config/tls , Path to tls certs for https enabling |
The following environment variables must be set to execute the service in IBM Cloud
Environment Variable | Value |
---|---|
NOSQL_DB_FILE_NAME | cloudant.js |
CLOUDANT_URL | Document database Cloudant URL found in IBM Cloud service credentials url |
CLOUDANT_IAM_KEY | The Cloudant IAM key found in IBM Cloud service credentials apikey value |
APP_ID_URL | The App ID URL found in IBM Cloud service credentials oauthServerUrl value |
APP_ID_IAM_KEY | The App ID URL found in IBM Cloud service credentials apikey value |
APP_ID_TENANT_ID | The App ID URL found in IBM Cloud service credentials tenantId value |
APP_ID_AUTH_SERVER_HOST | The App ID appidServiceEndpoint value, for e.g. https://us-east.appid.cloud.ibm.com |
APP_ID_CLIENT_ID | App ID instance ClientID |
APP_ID_SECRET | App ID instance secret |
For local dev environment, use a .env
file in the project root with the following minimumber env variables
USE_HTTPS=false
TLS_FOLDER_PATH=./config/tls # if set, overrides the default directory that holds the server.cert and server.key files
CONTEXT_ROOT=/api/v1
AUTH_STRATEGY=no-auth-strategy.js ## app-id-auth-strategy.js or azure-auth-strategy.js
# For local couch as NoSQL DB
NOSQL_DB_FILE_NAME=couchdb.js # for other cloud providers cosmos-db.js / cloudant.js
COUCHDB_URL=
To enable HTTPS with tls1.2, enable USE_HTTPS and set TLS_FOLDER_PATH to relative or abs path to folder containing server.key & server.cert files. Without this setting, server starts up in http mode.
For e.g. set following env vars
USE_HTTPS=true
TLS_FOLDER_PATH=./config/tls
npm install
npm run start
- We use eslint for linting js code
- NoSQL supported
- Couch DB
- Azure cosmos DB
- Cloudant DB
Specifications for the rules language used in Verifier configuration: JSON Logic - https://jsonlogic.com/
See libraries
- js - https://www.npmjs.com/package/json-logic-js
- java - https://github.com/jamsesso/json-logic-java
- swift - https://github.com/advantagefse/json-logic-swifta
This section lists license details of libraries / dependencies.
Table: Dependent libraries and links