Networking Policies and Ingress
This reference documents the network security policies and ingress configurations that control traffic flow in the GovTech platform.Zero Trust Architecture
The platform implements a default-deny network policy, then explicitly allows only required traffic:- Frontend can communicate with Backend
- Backend can communicate with Database
- Database cannot initiate outbound connections
- All components can access DNS
Default Deny Policy
Blocks all ingress and egress traffic by default:platform/kubernetes/network-policies.yaml:24-36
This policy applies to all pods in the govtech namespace and denies all traffic until explicitly allowed.
Frontend Network Policy
Allows frontend to receive traffic from the Ingress controller and communicate with the backend:platform/kubernetes/network-policies.yaml:44-89
Allowed Traffic
Ingress:- HTTP (80) from Ingress controller in
kube-systemnamespace
- HTTP (3000) to backend pods
- DNS (53 TCP/UDP) for name resolution
Backend Network Policy
Allows backend to receive traffic from frontend/ingress and communicate with the database:platform/kubernetes/network-policies.yaml:97-155
Allowed Traffic
Ingress:- HTTP (3000) from frontend pods
- HTTP (3000) from Ingress controller
- PostgreSQL (5432) to database pods
- HTTPS (443) to external AWS APIs (excluding private IP ranges)
- DNS (53 TCP/UDP) for name resolution
Database Network Policy
Strictly limits database access to backend only:platform/kubernetes/network-policies.yaml:173-208
Allowed Traffic
Ingress:- PostgreSQL (5432) from backend pods only
- DNS (53 UDP) for internal name resolution
- No external connections allowed
AWS ALB Ingress
Provides external HTTPS access via AWS Application Load Balancer:platform/kubernetes/ingress/ingress-aws.yaml:21-121
Key Features
- Scheme: Internet-facing ALB
- Target Type: IP-based routing to pods
- SSL/TLS: ACM certificate with automatic HTTP→HTTPS redirect
- Health Checks:
/api/healthendpoint monitoring - Routing:
/api/*→ backend-service/*→ frontend-service
ALB Configuration
platform/kubernetes/ingress/ingress-aws.yaml:72-94
NGINX Ingress (Alternative)
For non-AWS environments or local testing:platform/kubernetes/ingress/ingress-nginx.yaml:14-67
Rate Limiting
- Max RPS: 100 requests/second per IP
- Max Connections: 20 simultaneous connections per IP
- Upload Limit: 10MB request body size
Traffic Flow
Security Best Practices
- Default Deny: All traffic denied unless explicitly allowed
- Least Privilege: Each component has minimal required permissions
- Layer Isolation: Database cannot be accessed directly from frontend
- External Access Control: Only ALB can reach internal services
- Private IP Exclusion: Backend cannot access internal networks via internet