Skip to content

Latest commit

 

History

History
185 lines (136 loc) · 5.63 KB

workflows_readme.md

File metadata and controls

185 lines (136 loc) · 5.63 KB

Quick Start Guide

  1. Install dependencies:
cd signify-ts-test
npm install
  1. Start verification services:
docker compose up verify -d
  1. Run the workflow:
WORKFLOW=singlesig-single-user.yaml CONFIGURATION=configuration-singlesig-single-user.json ./test-workflow.sh --data-report-verify-proxy

Credential Issuance Workflow and Configuration Documentation

Overview

This functionality provides generalized workflows and configurations for issuing credentials. It allows users to define custom configurations to manage credential issuance processes flexibly.

Requirements

  • Prerequisites:

    1. Run npm install in the signify-ts-test directory to install dependencies.

    2. Start the verification services:

    docker compose up verify -d

Configuration and Workflow Setup

The configurations and workflows are located in the following directories:

  • Configurations: signify-ts-test/src/config
  • Workflows: signify-ts-test/src/workflow

Configuration Files

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:

  1. Secrets: Specifies private keys for various agents for credential issuance.

    "secrets": {
        "gleif1": "D_PbQb01zuzQgK-kDWjq5",
        "qvi1": "BTaqgh1eeOjXO5iQJp6m5",
        ...
    }
  2. 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"
        },
        ...
    }
  3. 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"
        },
        ...
    }
  4. 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": {}
    }
  5. 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"]
        },
        ...
    ]

Customizing Configuration and Workflow Files

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.

Workflow Steps

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"

Explanation of Parameters

  • 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.

Test Data Generation

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.

Generated Credentials

  • 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:
  1. credential - this key will contain raw and CESR versions of the credential
  2. AID
  3. LEI
  4. engagementContextRole

Final Step: Execute the Workflow with the Configuration

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.

Additional Notes

This setup supports both single-signature (singlesig) and multi-signature (multisig) credential issuance. Configurations and workflows are available for both modes.