Merative® Digital Health Pass
Version 2.1, November 2022 © Copyright Merative US L.P. and others 2020-2022
↳ General Environment Variables
↳ IBM Cloud Environment Variables
↳ Testing Environment Variables
Merative® provides this service for use by Digital Health Pass customers that want to create link and attached documents with the link.
A Postman collection and environment are provided in the /postman
folder which demonstrates all the functionality of this service, including onboarding an issuer, creating schemas, and creating/verifying/revoking credentials. To use the collection and environment you must first import them into Postman. More information on postman can be found here and here.
It is recommended to use Node.js v16
To install the dependencies and run the service perform the following from a command line. Note: Environment variables must be set, as described in following sections, before starting the service.
cd dhp-postbox-service
npm i
node start
To execute all tests run the following from a command line.
npm run test
To execute only unit tests run the following from a command line.
npm run test-unit
To execute only integration tests run the following from a command line.
npm run test-integration
The following environment variables must be set before starting the application regardless of the executing 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 |
USE_HTTPS | true or false. If true, then endpoints must be accessed via https, otherwise http |
SESSION_SECRET | A random session secret used by cookie-session |
The following environment variables must be set to execute the service in IBM Cloud
Environment Variable | Value |
---|---|
NOSQL_DB_FILE_NAME | cloudant.js |
AUTH_STRATEGY_FILE_NAME | app-id-auth-strategy.js |
CLOUDANT_URL | The Cloudant URL found in IBM Cloud service credentials url value |
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 URL found in IBM Cloud service credentials appidServiceEndpoint value |
APP_ID_CLIENT_ID | TODO: How to get this |
APP_ID_SECRET | TODO: How to get this |
KEY_PROTECT_URL | Key Protect URL found in IBM Cloud service endpoints. The URL must be post-fixed with /api/v2/keys |
KEY_PROTECT_GUID | TODO: How to get this |
KEY_PROTECT_IAM_KEY | TODO: How to get this |
The service can run locally and point to any of the configurable IBM Cloud or Azure services, but to run in a stand-alone local mode you must install CouchDB locally. The following environment variables for a stand-alone local configuration
Environment Variable | Value |
---|---|
COUCHDB_URL | The local CouchDB URL including user id and password. e.g. http://userid:password@127.0.0.1:5984 |
NOSQL_DB_FILE_NAME | couchdb.js |
AUTH_STRATEGY_FILE_NAME | no-auth-strategy.js |
The following environment variables must be set to run integration tests.
IBM Cloud integration tests environment variables.
Environment Variable | Value |
---|---|
INTEGRATION_TESTS_IBM_EMAIL | The email address of an IBM App ID user with the scope healthpass.admin |
INTEGRATION_TESTS_IBM_PASSWORD | The user's password |
This section lists open source libraries used in this SDK.
Table 3: Libraries and sources for this SDK