How to deploy Connect

Pre-Requirements

Database PostgreSQL

  • Create a database for Connect component

    • It’s not necessary to create the schemas. Connect creates the schemas automatically when it’s launched.

Docker image

To deploy Connect it’s necessary to get access to the Connect docker image. If you have no access to it, please contact Gataca.

docker pull gatacaid/gataca-connect-api:[VERSION]

Deploying Connect

Due to the security is one of our main concerns, these are the rules to secure communications:

  • Internal communications (internal network) SHOULD be encrypted, but it’s not mandatory.

  • External communication (public) MUST be encrypted, using an official certificate (avoid Self-Signed certificates). Gataca Wallet rejects all communications not protected by a valid certificate.

  • Gataca strongly, recommends to use SSL for database communications.

Deploying the container

There are many ways to deploy the component using docker: docker daemon, docker compose, orchestrator… However, this documentation shows how to do it using docker directly.

So, to deploy the service, it’s necessary to execute the following command.

docker run -d --name Gataca-Connect --env-file connect-conf.lst -p 443:9090 -v [path-to-certificates]:/certificates gatacaid/gataca-connect-api:[VERSION]

This command launches the container using the following parameters:

Parameter

Description

Parameter

Description

-d

Launches the container in background mode. If this parameter is not set up, the terminal instead of exit the process, continue showing the container logs.

--name

Set up the name of the container in the machine deployed.

--env-file

Set up the the file to configure all the environment variables used by the container to be configured internally.

-p

Map the external and internal ports. By default, service is running in the port 9090, so to map the service to a SSL port it could be done as in the example [443:9090].

If the default port is changed in the env-file, this mapping must be changed to link the external port (443) to the internal one.

Although, Gataca recommends to deploy the service using a SSL channel (443), it’s possible also to deploy the service without SSL. In that case, port 443 should be changed too.

-v path-to-certificates

This parameters allows the image to receive files from the host. In this case, Connect use this mechanism to obtain the certificates used in the SSL channel.

Although, Gataca recommends to deploy the service using a SSL channel (443), it’s possible also to deploy the service without SSL. In that case, this parameter is not necessary.

The table above shows the parameters to launch the container through Docker, but also it’s necessary to configure the service internally. To do this, Gataca uses environment variables set up through an environment file (It could also be done in the command shown previously).

Internal configuration

To set up the internal configuration, Connect uses environment variables. These variables could be configured using the Docker command directly or using a configuration file, as in this example.

Configuration file

In this example, it’s named connect-conf.lst (--env-file connect-conf.lst ).

The next section shows the main properties to be configured in the component.

GAT_SERVER_DOMAIN=connect.gataca.io GAT_SERVER_BACKBONE_HOST=https://backbone.gataca.io GAT_SERVER_SESSION_TIMEOUT=3600000 GAT_DATABASE_HOST=database.gataca.io GAT_DATABASE_PORT=5432 GAT_DATABASE_NAME=connect GAT_DATABASE_USER=connect-db-user GAT_DATABASE_PASS=12345678 GAT_DATABASE_SSLMODE=disable GAT_TLS_CERTIFICATE=/certificates/fullchain.pem GAT_TLS_KEY=/certificates/privkey.pem GAT_APP_DIDS_HOST=https://dids.gataca.io GAT_APP_GOVERNANCE_HOST=https://governance.gataca.io GAT_APP_ACCOUNTS_HOST=https://accounts.gataca.io GAT_APP_CONFIG_KEYS=DB GAT_APP_EBSI_URL=https://api.preprod.ebsi.eu GAT_APP_EBSI_ONBOARDINGISSUER=did:ebsi:4jPxcigvfifZyVwym5zjxaKXGJTt7YwFtpg6AXtsR4d5 GAT_APP_USEPLATFORMCATALOG=true

Variable

Description

Variable

Description

GAT_SERVER_DOMAIN

URL of the subdomain where the service is deployed

GAT_SERVER_SESSION_TIMEOUT

Server session timeout in milliseconds

GAT_DATABASE_HOST

Database engine URL (Postgres)

GAT_DATABASE_PORT

Database engine port (Postgres)

GAT_DATABASE_NAME

Database name

GAT_DATABASE_USER

Database user

GAT_DATABASE_PASS

Database user password

GAT_DATABASE_SSLMODE

[Optional] Indicates if the database connection requires SSL or not. By default, the connection must be secured using certificates, but it’s possible to configure without SSL.

GAT_TLS_CERTIFICATE

[Optional] Indicates the certificate used to secure the communications. By default, the service is configured without SSL.

If this field exists in the configuration, GAT_TLS_KEY should be configured also. If not, the service will not be launched successfully.

GAT_TLS_KEY

[Optional] Indicates the certificate key used to secure the communications. By default, the service is configured without SSL.

If this field exists in the configuration, GAT_TLS_CERTIFICATE should be configured also. If not, the service will not be launched successfully.

GAT_APP_DIDS_HOST

URL of the Gataca DID registry service. This service provides a mechanism to resolve and create new DIDs.

The value of this variable must be https://dids.gataca.io

GAT_APP_GOVERNANCE_HOST

URL of the Gataca Governance service. This service provides data about the catalogs (registries).

  • Issuers

  • Service providers

  • Schemas

The value of this variable must be https://governance.gataca.io

GAT_APP_ACCOUNTS_HOST

URL of the Gataca Accounts service. This service provides mechanism to interact with the user device (Push notifications)

The value of this variable must be https://accounts.gataca.io

GAT_APP_CONFIG_KEYS

Indicates where the private keys are in the component. Possible values are [DB, FILE].

By default, this property must be DB.

GAT_APP_EBSI_URL

[Optional] URL of EBSI to interact with.

GAT_APP_EBSI_ONBOARDINGISSUER

[Optional] EBSI DID. This property is used to control when an object provides from EBSI (Issuer).

GAT_APP_USEPLATFORMCATALOG

[Optional] Indicates if the client wants to use the remote catalog from the Gataca platform, or on the other hand, it wants to use the private catalogs. Default value: false.

Gataca recommends to use true.

Once the command to launch the instance is executed, if the configuration has been set correctly, the service must show a screen as this one in the logs:

If this image is not shown, the service notifies what the problem is executing the service.