- Install dependencies:
cd signify-ts-test
npm install
- Start verification services:
docker compose up verify -d
- Run the workflow:
WORKFLOW=singlesig-single-user.yaml CONFIGURATION=configuration-singlesig-single-user.json ./test-workflow.sh --data-report-verify-proxy
This functionality provides generalized workflows and configurations for issuing credentials. It allows users to define custom configurations to manage credential issuance processes flexibly.
-
Prerequisites:
-
Run
npm install
in thesignify-ts-test
directory to install dependencies. -
Start the verification services:
docker compose up verify -d
-
The configurations and workflows are located in the following directories:
- Configurations:
signify-ts-test/src/config
- Workflows:
signify-ts-test/src/workflow
Configuration files define the credential types, agents, and identifiers used in the workflow. Let's take as an example the configuration-singlesig-single-user.json
configuration file, the setup includes:
-
Secrets: Specifies private keys for various agents for credential issuance.
"secrets": { "gleif1": "D_PbQb01zuzQgK-kDWjq5", "qvi1": "BTaqgh1eeOjXO5iQJp6m5", ... }
-
Agents: Each agent is linked to a secret, representing an entity that can issue credentials.
"agents": { "gleif-agent-1": { "secret": "gleif1" }, "qvi-agent-1": { "secret": "qvi1" }, ... }
-
Identifiers: Each identifier here is and AID description associated with an agent.
"identifiers": { "gleif-aid-1": { "agent": "gleif-agent-1", "name": "gleif-aid-1" }, "qvi-aid-1": { "agent": "qvi-agent-1", "name": "qvi-aid-1" }, ... }
-
Credentials: Defines credential types with parameters like schema, privacy, and attributes.
"gleif_to_qvi_vlei_cred": { "type": "direct", "schema": "QVI_SCHEMA_SAID", "privacy": false, "attributes": {} }
-
Users: The users section lists users and associates them with identifiers. Each user is defined by their type and alias, mapping to a list of identifiers to facilitate their participation in credential issuance.
"users": [ { "type": "GLEIF", "alias": "gleif-user-1", "identifiers": ["gleif-aid-1"] }, { "type": "QVI", "alias": "qvi-user-1", "identifiers": ["qvi-aid-1"] }, ... ]
Users can create custom configurations by adding JSON configuration files in the config
directory, specifying credential types, schemas, privacy settings, and agents. Custom workflows, added to the workflow
directory as YAML files, enable users to define unique steps, credential sources, or verification processes for various use cases.
The YAML file specifies each credential issuance step in the workflow, defining the issuer, issuee, credential type, and additional options. For example:
ecr_cred2:
id: "ecr_cred2"
type: "issue_credential"
attributes:
personLegalName: "John Doe"
LEI: "875500ELOZEL05BVXV37"
issuer_aid: "le-aid-1"
issuee_aid: "ecr-aid-1"
description: "LE issues ECR vLEI credential"
credential: "le_to_ecr_vlei_cred"
credential_source: "le_cred"
generate_test_data: true
test_name: "3-user-check-upload-rev"
- id: Unique identifier for the step.
- type: Defines the action, e.g.,
issue_credential
. - attributes: Contains metadata for the credential.
- issuer_aid & issuee_aid: Identifiers for the issuer and recipient.
- generate_test_data: When set to
true
, this generates credential data JSON files for validation. - test_name: Specifies the directory name for saving test data.
When generate_test_data
is enabled, JSON files with test credential data are generated and saved in:
signify-ts-test/test/data/test_data/{test_name}
For example, data generated by the ecr_cred2
step is located in signify-ts-test/test/data/test_data/3-user-check-upload-rev
.
- Test Data Directory: JSON files are saved under
signify-ts-test/test/data/test_data/{test_name}
, based on the specified test name in each workflow step. - The generated credential json file will contain the following data:
- credential - this key will contain raw and CESR versions of the credential
- AID
- LEI
- engagementContextRole
To run the workflow with your specified configuration, use the following command:
WORKFLOW=singlesig-single-user.yaml CONFIGURATION=configuration-singlesig-single-user.json ./test-workflow.sh --data-report-verify-proxy
This command sets the workflow and configuration files as environment variables, enabling you to customize and test different workflows and configurations.
This setup supports both single-signature (singlesig
) and multi-signature (multisig
) credential issuance. Configurations and workflows are available for both modes.