Deployment
Deployment
This guide outlines the step-by-step process to deploy the On-Demand architecture, including configuring the API dashboard, setting up the Client-Gateway, and integrating the Data Layer.
Step-by-Step Guide
1. Configure On-Demand in the API Dashboard
Log In:
Access the API Dashboard and log in with your account.
Enable On-Demand Mode:
Navigate to the On-Demand Settings section.
Enable the On-Demand mode for your account.
Choose the Integration Option:
Webhooks:
Enter the URLs for each operation (
/create
,/import
,/revoke
,/verify
).
Client-Gateway:
Select the Gateway option to use our pre-configured solution.
Generate Security Keys:
Click Generate Keys to create:
API_KEY
: Used by the SDK Client and Gateway for authentication.CLIENT_SECRET
: Used for internal communication within the On-Demand system.
Save Configuration:
Save the On-Demand settings to activate the mode.
2. Deploy the Client-Gateway
The Client-Gateway is a pre-built service that simplifies the management of credential operations. You can deploy it using a pre-built Docker image or by building it locally.
Option 1: Use the Pre-built Docker Image
Pull the Docker Image:
Run the Gateway: Use the following command to start the Gateway:
docker run -d -p 8080:8080 -e API_BASE_URL=https://api.example.com -e API_KEY=your-api-key -e CLIENT_SECRET=your-client-secret your-registry/client-gateway:latest
Option 2: Build the Gateway Locally
Clone the Repository:
Built docker image
git clone https://github.com/your-repo/client-gateway.git cd client-
git clone https://github.com/your-repo/client-gateway.git cd client-gateway
Run Gateway
docker run -d -p 8080:8080 -e API_BASE_URL=https://api.example.com -e API_KEY=your-api-key -e CLIENT_SECRET=your-client-secret client-gateway
3. Set Up the Data Layer
The Data Layer stores and manages sensitive data. You need to implement this layer based on your infrastructure.
Choose a Database Technology:
Supported options include MongoDB, PostgreSQL, MySQL, or others.
Implement the Required Endpoints:
Create endpoints for operations such as
/create
,/import
,/revoke
, and/verify
.Refer to the Data Layer section for example implementations.
Configure the Gateway:
Update the Gateway configuration to point to your Data Layer endpoints
const DATA_LAYER_URL = 'http://your-database-service';
4. Test the Deployment
Test SDK Integration:
Use the SDK Client to make test requests for each operation (
create
,import
,revoke
,verify
).Ensure the requests are routed to the Gateway or Webhooks based on your configuration.
Verify API Logs:
Log in to the API Dashboard and check the logs to confirm that operations are being recorded.
Check the Data Layer:
Verify that data is being stored and managed correctly in your database.
Last updated