MTE API Relay On-Premise Deployment
Introduction
MTE API Relay is an end-to-end encryption system that protects HTTP traffic between server applications. It acts as a proxy server in front of your backend services, communicating with another API Relay instance to encode and decode all proxied traffic. This enables secure application-to-application communications using the Eclypses MTE encryption engine.
Below is a typical architecture where one server application communicates through an MTE API Relay container, which transmits proxied traffic to another API Relay that decodes and forwards the request to its target backend service:

MTE API Relay instances are only compatible with each other. Neither an MTE Relay Server nor an MTE Client SDK can communicate with an MTE API Relay. MTE API Relays are strictly for server-to-server communications.
Prerequisites
Technical Requirements
- An existing backend service that accepts HTTP calls.
- We provide a demo using a Postman Collection and https://jsonplaceholder.typicode.com.
- Docker installed and running on your system.
- AWS CLI installed.
Skills and Knowledge
- Familiarity with Docker and/or Kubernetes.
- General knowledge of container deployment models.
Credentials
- An AWS Access Key ID and AWS Secret Access Key provided by Eclypses to access the private container repository.
Deployment Options
MTE API Relay is provided as a Docker image and can be deployed on-premise using:
- Docker Run
- Docker Compose
- Kubernetes
- Other container runtimes (e.g., Docker Swarm, Podman, K3s)
1. Configure AWS CLI Access
Configure a new AWS CLI profile with the Eclypses-issued credentials:
aws configure --profile eclypses-customer-on-prem
When prompted:
- AWS Access Key ID: Enter the ID provided by Eclypses.
- AWS Secret Access Key: Enter the secret key provided.
- Default region name: us-east-1
- Default output format: json
2. Pull the Docker Image
Authenticate Docker with the Eclypses ECR registry:
- bash
- PowerShell
aws ecr get-login-password \
--region us-east-1 \
--profile eclypses-customer-on-prem \
| docker login --username AWS \
--password-stdin 321186633847.dkr.ecr.us-east-1.amazonaws.com
aws ecr get-login-password `
--region us-east-1 `
--profile eclypses-customer-on-prem `
| docker login --username AWS `
--password-stdin 321186633847.dkr.ecr.us-east-1.amazonaws.com
Then pull the image:
docker pull 321186633847.dkr.ecr.us-east-1.amazonaws.com/customer/on-prem/mte-api-relay:4.5.0
Environment Variables
Using these environment variables will result in the MTE Relay Server being configured to only handle a single domain.
Example:
UPSTREAM- Upstream API or service URL.CLIENT_ID_SECRET- Secret for signing client IDs (minimum 32 characters).CORS_ORIGINS- Comma-separated list of allowed origins.CORS_METHODS- Comma-separated list of allowed methods. Default:GET, POST, PUT, PATCH, DELETE.PASS_THROUGH_ROUTES- Comma-separated list of routes proxied without encoding/decoding.OUTBOUND_TOKEN- Token for authenticating outbound requests.
UPSTREAM='https://api.my-company.com'
CLIENT_ID_SECRET='2DkV4DDabehO8cifDktdF9elKJL0CKrk'
CORS_ORIGINS='https://www.my-company.com,https://dashboard.my-company.com'
CORS_METHODS='GET, POST, PUT, PATCH, DELETE'
PASS_THROUGH_ROUTES='/health,/version'
OUTBOUND_TOKEN='s3cr3tT0k3nV4lu3'
Additional Environment Variables
PORT- Default:8080.LOG_LEVEL- One of trace, debug, info, warning, error, panic, disabled. Default:info.HEADERS- A JSON string of additional headers to add to upstream requests.
Video Guide
Deployment Steps
Option A: Docker Run
Using the docker run command, we can launch a single MTE Relay container locally for testing or local development purposes.
Copy the command below, modify the environment variable values, and run it in your terminal.
- bash
- PowerShell
docker run --rm -it \
--name mte-api-relay \
-p 8080:8080 \
-e UPSTREAM=__YOUR_UPSTREAM_URL__ \
-e CLIENT_ID_SECRET=__YOUR_CLIENT_ID_SECRET__ \
-e OUTBOUND_TOKEN=__YOUR_SECURE_OUTBOUND_ACCESS_TOKEN__ \
321186633847.dkr.ecr.us-east-1.amazonaws.com/customer/on-prem/mte-api-relay:4.5.0
docker run --rm -it `
--name mte-api-relay `
-p 8080:8080 `
-e UPSTREAM=__YOUR_UPSTREAM_URL__ `
-e CLIENT_ID_SECRET=__YOUR_CLIENT_ID_SECRET__ `
-e OUTBOUND_TOKEN=__YOUR_SECURE_OUTBOUND_ACCESS_TOKEN__ `
321186633847.dkr.ecr.us-east-1.amazonaws.com/customer/on-prem/mte-api-relay:4.5.0
Command Explanation:
docker run
Runs a container from the specified image.--rm
Automatically removes the container when it exits.-it
Allocates an interactive terminal (-ifor interactive input,-tfor pseudo-TTY).--name mte-relay
Assigns a custom name (mte-relay) to the container.-p 8080:8080
Maps host port8080to container port8080. You may change the host port if needed. Do not change the container port.-e UPSTREAM=__YOUR_UPSTREAM_URL__
Sets the environment variableUPSTREAMto the provided URL.-e CLIENT_ID_SECRET=__YOUR_CLIENT_ID_SECRET__
Sets the environment variableCLIENT_ID_SECRET.-e CORS_ORIGINS=__YOUR_CORS_ORIGINS__
Sets the environment variableCORS_ORIGINS.- The last line is the image to run.
Option B: Docker Compose
Docker Compose provides a convenient way to define and manage multi-container applications by allowing you to describe all of your services in a single YAML file. Once defined, Docker Compose can automatically create and start the containers with a single command, ensuring consistency across environments.
Create a new file named docker-compose.yaml with the following content, and update the environment variable values as needed:
version: "3.8"
services:
mte-api-relay:
image: 321186633847.dkr.ecr.us-east-1.amazonaws.com/customer/on-prem/mte-api-relay:4.5.0
ports:
- "8080:8080"
environment:
- UPSTREAM=__YOUR_UPSTREAM_URL__ # Update this value!
- CLIENT_ID_SECRET=__YOUR_CLIENT_ID_SECRET__ # Update this value!
- OUTBOUND_TOKEN=__YOUR_OUTBOUND_ACCESS_TOKEN__ # Update this value!
- REDIS_URL=redis://redis:6379
depends_on:
- redis
redis:
image: "redis:alpine"