Skip to content
Snippets Groups Projects
README.md 2.4 KiB
Newer Older
zdravko iliev's avatar
zdravko iliev committed
# SSI Abstraction Service
zdravko iliev's avatar
zdravko iliev committed
## Description

<hr/>  
  <p align="center">A core service for the Organizational Credential Manager, providing the DIDComm functionality and initializing the agent, wallet and ledger interactions of the whole application.</p>

## Usage
zdravko iliev's avatar
zdravko iliev committed
<hr/>

### Endpoint documentation at:
zdravko iliev's avatar
zdravko iliev committed

[Aries REST Extension](swagger.json)

[Full Agent Events](EVENTS-DOCUMENTATION.md)

[Sign and Verify Interface](SIGN-AND-VERIFY.md)

with the default exposed ports:
zdravko iliev's avatar
zdravko iliev committed

- 3010 - Aries REST extension
- 3009 - Sign and Veify interface exposed
- 4000 - didcomm interface
zdravko iliev's avatar
zdravko iliev committed

## Installation
zdravko iliev's avatar
zdravko iliev committed
<hr/>

Dependencies:
zdravko iliev's avatar
zdravko iliev committed
```bash
$ pnpm install
zdravko iliev's avatar
zdravko iliev committed
```

- **If docker is not installed, [Install docker](https://docs.docker.com/engine/install/)**.
zdravko iliev's avatar
zdravko iliev committed

- **If docker-compose is not installed, [Install docker-compose](https://docs.docker.com/compose/install/)**.
zdravko iliev's avatar
zdravko iliev committed

- (optional) Postgres GUI
  https://dbeaver.io/download/
zdravko iliev's avatar
zdravko iliev committed

<hr/>

## Running the app
zdravko iliev's avatar
zdravko iliev committed
<hr/>

### Environment variables
zdravko iliev's avatar
zdravko iliev committed
[.env.example](.env.example)

- PORT is the port for the signing and verification interface
- AGENT_AUTO_ACCEPT_CONNECTION can be either true or false
- AGENT_AUTO_ACCEPT_CREDENTIAL can be either: always, contentApproved, never
- AGENT_PUBLIC_DID_SEED will generate the did and verkey (32 symbols)
- for security reasons AGENT_WALLET_KEY and AGENT_WALLET_ID should be different
- AGENT_LEDGER_ID can be: ID_UNION,BCOVRIN_TEST,GREEN_LIGHT

zdravko iliev's avatar
zdravko iliev committed
  - the three pool transaction genesis are inside the code configuration
  - every ledger can be provided on its own
  - multiple ledgers can also be specified, separated by a comma

- AGENT_ID_UNION_KEY is needed if the ledger of choice is IDUnion
zdravko iliev's avatar
zdravko iliev committed

**Each service in the Organizational Credential Manager can be run from the infrastructure repository with Docker.**

**The .env files are in the infrastructure repository under /env**

### There are two separate Dockefiles in "./deployment" of every project:
zdravko iliev's avatar
zdravko iliev committed
```bash
    ## production in:
      ./deployment/ci
    ## development in:
      ./deployment/dev
```

- (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles.
zdravko iliev's avatar
zdravko iliev committed

- Run while in **"infrastructure"** project:
zdravko iliev's avatar
zdravko iliev committed

```bash
$ docker-compose up --build
```

## Test
zdravko iliev's avatar
zdravko iliev committed
<hr/>

```bash
# unit tests
zdravko iliev's avatar
zdravko iliev committed

# e2e tests
zdravko iliev's avatar
zdravko iliev committed

# test coverage
zdravko iliev's avatar
zdravko iliev committed
```

## GDPR
zdravko iliev's avatar
zdravko iliev committed
<hr/>

[GDPR](GDPR.md)

## Dependencies
zdravko iliev's avatar
zdravko iliev committed
<hr/>

[Dependencies](package.json)

## License
zdravko iliev's avatar
zdravko iliev committed
<hr/>

[Apache 2.0 license](LICENSE)