Skip to content

refactor: refactor environment variables and applications OP#244

Alexey Lunin requested to merge 244-refactor-env-vars into main

Blocked by MR

!81 (closed)

CUrrent MR is based on 81 MR. So, based MR should be merged first

Description

This MR contains the code which refactors applications and environment variables. Main idea of this refactoring is to remove not used code and also extract the code which is application specific.

What were done:

  • created hin-agent application. All hin code (listeners, specific for HIN env variables) now is located here
  • extracted env variables from agent app
  • removed not used connection, attestation, proof and gateway managers and remove assotiated envs
  • fixed missed env variables in validation
  • refactored deployment folders and split the code to appropriate folders

As soon as hin app functionallity was separated from regular agent, and deploy scripts were also moved there new image repo will be used for hin eu.gcr.io/vrgn-infra-prj/gaiax/ocm/ocm-engine/hin-agent (how to create it? Or it will be created automatically?)

Related issues

https://plan.vereign.com/projects/vbd/work_packages/244

https://plan.vereign.com/projects/vbd/work_packages/245

Testing

As soon as changes ware in deployments and env variables, so

Hin specific test:

Create invitation with goal in connection data

curl --location 'https://ssi-dev.vereign.com/api-hin-agent/api/v1/invitations' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic b2NtaGluLWFkbWluOmFZUERiZVpOOEYwVHd3ZWFB' \
--data '{
 "goal": "connection.exchange",
  "multiUseInvitation": true
}'

As a result of this request you will receive connection invitaiton URL. Transform it into QR code. When you scan it using VCM, you will connection to hin-agent ocm and hin-agent automatically sends proof reqeust

Checklist

  • I have updated the documentation (if necessary)
  • I have added unit tests for new functionality (if applicable)
  • My code follows the style guidelines of this project
  • I have tested this code on my local machine before submitting this MR

Reviewers

@zdravko.iliev @boyan.tsolov

Edited by Alexey Lunin

Merge request reports

Loading