Skip to content

Commit ccbb18a

Browse files
feat(mbe): isolate awm network
1 parent d258bc2 commit ccbb18a

File tree

2 files changed

+103
-1
lines changed

2 files changed

+103
-1
lines changed

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,56 @@ Notes:
248248
- The `:Z` option in volume mounts is specific to SELinux-enabled systems and ensures proper volume labeling
249249
- The logs directory will be created with appropriate permissions if it doesn't exist
250250

251+
## Docker Compose Deployment
252+
253+
The application includes a Docker Compose configuration that runs both Advanced Wallet Manager (AWM) and Master BitGo Express (MBE) services with proper network isolation for enhanced security.
254+
255+
### Architecture Overview
256+
257+
The Docker Compose setup creates two isolated services:
258+
259+
- **Advanced Wallet Manager (AWM)**: Runs in an isolated internal network with no external access for maximum security
260+
- **Master BitGo Express (MBE)**: Connected to both internal network (for AWM communication) and public network (for external API access)
261+
- **Network Isolation**: AWM is completely isolated from external networks and only accessible through MBE
262+
263+
### Network Configuration
264+
265+
The setup creates two distinct networks:
266+
267+
1. **my-internal-network**:
268+
- Internal bridge network with `internal: true`
269+
- Used for secure AWM isolation and MBE-to-AWM communication
270+
- No external internet access for security
271+
272+
2. **my-public-network**:
273+
- Public bridge network
274+
- Used for external access to MBE APIs
275+
- Connected to host networking
276+
277+
### Prerequisites
278+
279+
1. **Install Docker and Docker Compose**
280+
2. **Ensure KMS service is running** on your host machine (typically on port 3000)
281+
282+
### Quick Start
283+
284+
1. **Start the services:**
285+
286+
```bash
287+
# Navigate to project directory
288+
cd advanced-wallet
289+
290+
# Start both services in background
291+
docker-compose up -d
292+
```
293+
294+
2. **Stop the services:**
295+
296+
```bash
297+
# Stop and remove containers
298+
docker-compose down
299+
```
300+
251301
## API Endpoints
252302

253303
### Advanced Wallet Manager (Port 3080)
@@ -300,4 +350,3 @@ env | grep -E "(APP_MODE|KMS_URL|ADVANCED_WALLET_MANAGER|TLS_)"
300350
## License
301351

302352
MIT
303-
```

docker-compose.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: '3.8'
2+
3+
services:
4+
# Service for advanced-wallet-manager (AWM)
5+
advanced-wallet-manager:
6+
build: . # Build from the Dockerfile inside the repo
7+
container_name: advanced-wallet-manager
8+
networks:
9+
- my-internal-network # Only part of the internal network
10+
environment:
11+
- ADVANCED_WALLET_MANAGER_PORT=3081
12+
- TLS_MODE=disabled
13+
- ALLOW_SELF_SIGNED=true
14+
- MTLS_REQUEST_CERT=false
15+
- RECOVERY_MODE=true
16+
- APP_MODE=advanced-wallet-manager
17+
- KMS_URL=http://172.20.0.1:3000
18+
- BIND=0.0.0.0
19+
restart: always
20+
ports: [] # No public ports exposed
21+
22+
# Service for master-bitgo-express (MBE) - both internal and publicly accessible
23+
master-bitgo-express:
24+
build: . # Build from the Dockerfile inside the repo
25+
container_name: master-bitgo-express
26+
networks:
27+
- my-internal-network # Connect to the internal network for internal communication
28+
- my-public-network # Connect to the public network for external access
29+
environment:
30+
- APP_MODE=master-express
31+
- BITGO_ENV=test
32+
- TLS_KEY_PATH=test-ssl-key.pem
33+
- TLS_CERT_PATH=test-ssl-cert.pem
34+
- ADVANCED_WALLET_MANAGER_URL=http://advanced-wallet-manager:3081
35+
- ENCLAVED_EXPRESS_CERT=./test-ssl-cert.pem
36+
- MTLS_REQUEST_CERT=false
37+
- ALLOW_SELF_SIGNED=true
38+
- TLS_MODE=disabled
39+
- RECOVERY_MODE=true
40+
- MASTER_EXPRESS_PORT=3081
41+
- BIND=0.0.0.0
42+
restart: always
43+
ports:
44+
- "3081:3081" # Expose MBE publicly on port 3081
45+
46+
# Networks section
47+
networks:
48+
my-internal-network:
49+
driver: bridge # Internal communication network, no access to the internet
50+
internal: true # Ensures this network is not accessible from outside
51+
52+
my-public-network:
53+
driver: bridge # Public network, allowing external access to MBE

0 commit comments

Comments
 (0)