You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A secure, mTLS-enabled cryptocurrency signing server with two operational modes: Advanced Wallet Manager (dedicated signer) and Master Express (API gateway with integrated signing capabilities).
4
4
5
+
## Table of Contents
6
+
7
+
-[Overview](#overview)
8
+
-[Architecture](#architecture)
9
+
-[Installation](#installation)
10
+
-[Prerequisites](#prerequisites)
11
+
-[Quick Start](#quick-start)
12
+
-[Quick Start (No mTLS)](#quick-start-no-mtls---fastest-way-to-test)
This application provides secure cryptocurrency operations with mutual TLS (mTLS) authentication:
@@ -14,7 +30,7 @@ This application provides secure cryptocurrency operations with mutual TLS (mTLS
14
30
## Architecture
15
31
16
32
-**Advanced Wallet Manager** (Port 3080): Isolated signing server with no internet access, only connects to KMS API for key operations.
17
-
-**Master Express** (Port 3081): Full BitGo API functionality with secure communication to Advanced Wallet Manager
33
+
-**Master Express** (Port 3081): API gateway providing end-to-end wallet creation and transaction support, integrating BitGo APIs with secure communication to Advanced Wallet Manager
18
34
19
35
## Installation
20
36
@@ -25,6 +41,9 @@ This application provides secure cryptocurrency operations with mutual TLS (mTLS
25
41
-**OpenSSL** for certificate generation
26
42
-**Docker** and **Docker Compose** (for containerized deployment)
27
43
-**Podman** (alternative to Docker for containerized deployment)
44
+
-**KMS API Implementation** - Advanced Wallet Manager requires a KMS (Key Management Service) API for secure key operations. See implementation guides:
@@ -81,47 +100,49 @@ npm run container:build:advanced-wallet-manager
81
100
82
101
## Quick Start
83
102
84
-
### 1. Start Advanced Wallet Manager
103
+
### Quick Start (No mTLS) - Fastest Way to Test
104
+
105
+
For quick testing without mTLS security, you can disable TLS entirely. This is useful for local development and testing.
106
+
107
+
#### 1. Start Advanced Wallet Manager (Port 3080)
85
108
86
109
```bash
87
-
export APP_MODE=advanced-wallet-manager
88
-
export KMS_URL=https://your-kms-service
89
-
export SERVER_TLS_KEY_PATH=./demo.key
90
-
export SERVER_TLS_CERT_PATH=./demo.crt
91
-
export KMS_CLIENT_TLS_KEY_PATH=./demo.key
92
-
export KMS_CLIENT_TLS_CERT_PATH=./demo.crt
93
-
export KMS_SERVER_CA_CERT_PATH=./demo.crt
94
-
export KMS_SERVER_CERT_ALLOW_SELF_SIGNED=true
95
-
export CLIENT_CERT_ALLOW_SELF_SIGNED=true
110
+
TLS_MODE=disabled \
111
+
BITGO_ENV=test \
112
+
APP_MODE=advanced-wallet-manager \
113
+
ADVANCED_WALLET_MANAGER_PORT=3080 \
114
+
KMS_URL=http://localhost:3000 \
96
115
npm start
97
116
```
98
117
99
-
**Note:** KMS client certificates are required for outbound mTLS connections. For testing, we reuse the demo certificates, but in production, use separate certificates for security.
**Note:** AWM client certificates are required for outbound mTLS connections to Advanced Wallet Manager. For testing, we reuse the demo certificates, but in production, use separate certificates for security.
118
-
119
-
### 3. Test the Connection
131
+
#### 3. Test the Connection
120
132
121
133
```bash
122
-
curl -k -X POST https://localhost:3081/ping/advancedWalletManager
134
+
# Test Advanced Wallet Manager
135
+
curl -X POST http://localhost:3080/ping
136
+
137
+
# Test Master Express
138
+
curl -X POST http://localhost:3081/ping
139
+
140
+
# Test connection between services
141
+
curl -X POST http://localhost:3081/ping/advancedWalletManager
123
142
```
124
143
144
+
**Note:**`TLS_MODE=disabled` should only be used for local development and testing. Always use mTLS in production environments. See the [Production Setup](#production-setup) section for production mTLS configuration.
145
+
125
146
## Configuration
126
147
127
148
### Core Settings
@@ -141,22 +162,38 @@ curl -k -X POST https://localhost:3081/ping/advancedWalletManager
141
162
|`ADVANCED_WALLET_MANAGER_PORT`| Port to listen on |`3080`| ❌ |
142
163
|`KMS_URL`| KMS service URL | - | ✅ |
143
164
165
+
**Note:** See [Prerequisites](#prerequisites) for KMS API implementation requirements.
**Note:** When `TLS_MODE=mtls`, outbound client certificates are required and cannot reuse server certificates for security reasons. In `TLS_MODE=disabled` mode, these certificates are not required.
189
240
190
241
## Container Deployment with Podman
191
242
@@ -328,68 +379,143 @@ docker-compose down
328
379
-`POST /ping/advancedWalletManager` - Test connection to Advanced Wallet Manager
1.**Use CA-signed certificates** instead of self-signed
336
-
2.**Set `ALLOW_SELF_SIGNED=false`** in production
337
-
3.**Configure client certificate allowlisting** with `MTLS_ALLOWED_CLIENT_FINGERPRINTS`
338
-
4.**Use separate certificates** for each service
339
-
5.**Regularly rotate certificates**
340
-
6.**Secure private key storage**
386
+
The OpenAPI specification for Master Express is available at [`masterBitgoExpress.json`](./masterBitgoExpress.json).
341
387
342
-
### Production Example
388
+
To regenerate the API documentation:
389
+
390
+
```bash
391
+
npm run generate:openapi:masterExpress
392
+
```
393
+
394
+
This will generate/update the `masterBitgoExpress.json` file with the latest API specification. You can view this file with any OpenAPI viewer such as:
395
+
396
+
-[Swagger Editor](https://editor.swagger.io/)
397
+
-[Redoc](https://redocly.github.io/redoc/)
398
+
- VS Code OpenAPI extensions
399
+
400
+
## Production Setup
401
+
402
+
### Quick Start (With mTLS)
403
+
404
+
For production deployments with proper mTLS security:
For testing, you can use the server's IP address or `localhost` if running locally. In production deployments, configure your DNS or load balancer to point to the appropriate servers.
0 commit comments