{"id":34525223,"url":"https://github.com/kiva/protocol-integration-tests","last_synced_at":"2026-05-25T20:02:30.297Z","repository":{"id":38727371,"uuid":"376986521","full_name":"kiva/protocol-integration-tests","owner":"kiva","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-24T11:26:20.000Z","size":1459,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-04-13T09:17:37.850Z","etag":null,"topics":["protocol","protocol-backend","protocol-infra"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.txt","support":null}},"created_at":"2021-06-15T00:02:07.000Z","updated_at":"2022-01-17T04:18:51.000Z","dependencies_parsed_at":"2023-02-13T20:47:05.848Z","dependency_job_id":null,"html_url":"https://github.com/kiva/protocol-integration-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kiva/protocol-integration-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-integration-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-integration-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-integration-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-integration-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiva","download_url":"https://codeload.github.com/kiva/protocol-integration-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-integration-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27995843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["protocol","protocol-backend","protocol-infra"],"created_at":"2025-12-24T05:07:46.616Z","updated_at":"2025-12-24T05:07:46.942Z","avatar_url":"https://github.com/kiva.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Protocol Integration Tests\n\nThis is a set of tests that can be run against the backend services and infrastructure that make up Kiva Protocol to\nverify that a variety of basic use cases are functional.\n\n## Components Under Test\n\nThe services tested are:\n- [Gateway](https://github.com/kiva/protocol-gateway)\n- [Aries Key Guardian](https://github.com/kiva/aries-key-guardian)\n- [Aries Guardianship Agency](https://github.com/kiva/aries-guardianship-agency)\n- [Bio Auth Service](https://github.com/kiva/guardian-bio-auth/tree/main/bio_auth_service)\n- [Bioanalyzer Service](https://github.com/kiva/guardian-bio-auth/tree/main/bioanalyzer_service)\n- [Demo Controller](https://github.com/kiva/protocol-demo)\n- [FSP Controller](https://github.com/kiva/protocol-aries-controllers)\n- [Kiva Controller](https://github.com/kiva/protocol-aries-controllers)\n\nThe infrastructure tested is:\n- Multitenant (Used by Aries Guardianship Agency)\n- Tails Server (Used by Multitenant)\n- Indy Pool (Used by Aries Guardianship Agency, Multitenant, and Tails Server)\n- Auth DB (Used by Aries Key Guardian)\n- Identity DB (Used by FSP Controller)\n- Identity Template DB (Used by Bio Auth Service)\n- Identity Wallet DB (Used by Multitenant)\n\n## Pre-requisites\n\nYou need to have the following installed locally:\n- Git\n- Docker\n- Docker-Compose\n- NPM\n- NodeJS\n\n## Setup\n\n1. Clone the repo\n    ```\n    git clone https://github.com/kiva/protocol-integration-tests\n    cd protocol-integration-tests\n    ```\n2. Copy the contents of `dummy.env` into `.env`. You can do this manually, or via a script:\n    ```\n    ./scripts/setup_env.sh\n    ```\n3. Install the integration tests' dependencies by running `npm install`\n4. If you have not already, pull the Aries Cloudagent Python (AcaPy) image from Docker.\n    ```\n    docker pull bcgovimages/aries-cloudagent:py36-1.16-1_0.7.1\n    ```\n\n## How to Run the Tests\n\nRunning the tests is super simple! Just bring up the docker-compose, set up your test fixtures, and run the tests. Like this:\n\n```\ndocker-compose up -d\n./scripts/setup_fixtures.sh\nnpm run test\n```\n\nThe version of each service tested will be whichever version is currently tagged with `latest` in\n[dockerhub](https://hub.docker.com/orgs/kivaprotocol/repositories).\n\n### Building the Frontend\n\nThe default behavior of this repo is to build only our backend stack for testing. But you can build our frontend out, too!\n\nTo do so, simply add the `--profile frontend` to the `docker-compose up` command in the steps above. Please note that it takes some time to build out these Docker images.\n\n```\ndocker-compose --profile frontend up -d\n./scripts/setup_fixtures.sh\nnpm run test\n```\n\nOnce the the Docker script finishes running (and it may take a while!), you can head to `http://localhost:7567` in your browser window to test out our services. (Please note that right now the only UI paths that will work are those related to fingerprint scanning. Verification and Issuing using QR codes or SMS is not currently supported.)\n\n### Testing the Frontend with Fingerprints\n\nOnce you've built the frontend using Docker, you can create a new credential and verify it using the browser. Here are the steps you should follow.\n\n1. Navigate to `http://localhost:7567`\n2. Click \"Accept\", then click \"Fingerprint Registration\" and then \"Select\"\n3. Upload a photo for your credential, or use the webcam UI in order to take a picture of yourself. Silly pictures only, please. Once you've finished, click \"Continue.\"\n4. Input your information into the next page. If you're not a Kiva employee, these fields will not make much sense to you - feel free to get creative, or just use the \"Populate Form\" button to add fake data. Click \"Continue\" when you're done.\n    * Note: Copy the value of the email you used for this step. It will be needed later.\n5. Click at least one of the boxes to upload a fingerprint image for your credential. The `docker-compose` script automatically creates an API that delivers fake fingerprint images when called, so don't worry about using your own fingerprint if you don't want to.\n    * Please note: We don't recommend uploading a fingerprint for each finger due [to an issue with one of our services](https://github.com/kiva/guardian-bio-auth/issues/50). Pick your three favorites.\n6. Click \"Next\" and wait for the success message. This may take a minute.\n7. Click \"Start New EKYC\" in the top right corner. Click \"Accept\", then click \"Fingerprint Scan\" followed by \"Select.\"\n8. Enter the email that you used in step 4, then click \"Next\".\n9. If you added an image for the Right Thumb box in step 5, you can just click \"Next\". If you didn't, click \"Use a different finger\", select the finger that you used for creating your credential, then click the button below the fingerprint selection UI before clicking \"Next\".\n10. Once the request finishes, you should be able to see your credential data.\n\nIf you'd rather have a machine do these steps automatically, you can do that easily by running the following command.\n\n```\nnpm run test:browser\n```\n\n## How to Test a Particular Change\n\nThe real value of the these integration tests is that it makes testing changes across components easy.\n\nFor example, if you want to make some changes to the way fingerprints are processed, you will likely need up update\nBio Auth Service. How do you know that those changes didn't break authentication? Run the tests!\n\n1. **Make your changes in the target code base.** In this example, you'd have a local clone of Bio Auth Service and\n   you'd have some local changes.\n2. **Build a docker image from your local changes.** In this example, you'd navigate to Bio Auth Service's parent \n   directory (`guardian-bio-auth`) and run `docker build -f Dockerfile.bioauthservice .`.\n3. **Tag your locally built docker image.** In this example, you'd run `docker tag bio-auth-service bio-auth-service:local`\n4. **Update .env to reference your locally build docker image.** In this example, you'd edit `.env` such that the line\n   that line which sets the image for Bio Auth Service reads: `BIO_AUTH_SERVICE_IMAGE=bio-auth-service:local`\n5. **Run the tests like normal**\n\nYou can do this for as many services as you like! You could, for example, update the images for Bio Auth Service,\nBioanalyzer Service, and Aries Key Guardian and test them all together at the same time.\n\nYou can also test changes to infrastructure in a similar way. Instead of updating `.env`, though, you'd directly update\nthe image for the relevant container in `docker-compose.yml`.\n\n## Using Auth0\n\nThese tests were initially meant to be run using an authentication token from [Auth0](https://auth0.com/), because the Protocol project was originally built using Auth0 as the permissioning system for network requests.\n\nWe have disabled the use of bearer tokens in this repo by default, but if you have an Auth0 account, you can enable authentication headers with the following steps:\n\n1. Using the values from your Auth0 account, add values for the following environment variables to `.env`:\n   ```\n   AUTH0_DOMAIN=\u003cauth0 domain\u003e\n   AUTH0_CLIENT_ID=\u003cauth0 client ID\u003e\n   AUTH0_CLIENT_SECRET=\u003cauth0 client secret\u003e\n   AUTH0_EXPIRED_TOKEN=\u003cvalid, but expired auth0 token\u003e\n   AUTH0_USER_CLIENT_ID=\u003cauth0 user client ID\u003e\n   AUTH0_USERNAME=\u003cauth0 username\u003e\n   AUTH0_PASSWORD=\u003cauth0 password\u003e\n   ```\n2. Make sure to update the `AUTH0_DOMAIN` in `demo_controller/test.env` and `fsp_controller/test.env`, using the same\n   value you provided in the previous step.\n\n_*PLEASE NOTE*_: If you have already built the Docker containers without your Auth0 account info provided as environment variables, you'll have to rebuild the images.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiva%2Fprotocol-integration-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiva%2Fprotocol-integration-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiva%2Fprotocol-integration-tests/lists"}