Authentication
Auth is per-tool — there is no global middleware that applies automatically. You must opt in for every tool that handles sensitive data.Enforce auth on every sensitive tool
Auth is per-tool. There is no global middleware. Every tool accessing sensitive data must have anauth block:
- Review all
app/tools/*/config.tersefiles for missingauthblocks. allow_allshould only appear on health checks and intentionally public tools.hyperterse validateconfirms structural correctness; manually verify auth presence.
Rotate credentials
API keys and tokens are resolved at startup. Rotation requires a restart. For zero-downtime rotation:- Update the secret in your secrets manager.
- Trigger a rolling restart.
- Verify the old key is rejected after all instances restart.
Network security
Hyperterse listens on plain HTTP. Encryption and access control belong to the infrastructure layer in front of it.TLS termination
Hyperterse does not terminate TLS natively. Deploy behind a reverse proxy:- Nginx —
proxy_passtohttp://localhost:8080. - Caddy — Automatic HTTPS with Let’s Encrypt.
- AWS ALB / GCP LB — Managed TLS.
- Kubernetes Ingress — cert-manager or cloud provider integration.
CORS
The runtime applies permissive CORS by default. For production:- Deploy behind a reverse proxy.
- Configure restrictive CORS at the proxy.
- Restrict the runtime’s built-in CORS to your domain.
Network segmentation
- Place the runtime in a private network segment.
- Restrict inbound traffic to the reverse proxy only.
- Restrict outbound to database hosts and external APIs used by handlers.
- Block direct internet access to the runtime port.
Logging hygiene
Logs are the first place an attacker looks after a breach. Keep them clean.Log level
Set production to2 (warn) or 3 (info):
Log routing
Use--log-file for file-based collection by aggregation systems. Review handler scripts for accidental credential logging via console.log.
Container security
A smaller container means fewer CVEs and a faster patch cycle.Minimal base image
alpine for shell access:
Non-root execution
Read-only filesystem
Hyperterse does not write to disk at runtime (cache is in-memory):Secrets management
Credentials must never appear in configuration files, logs, or version control.Environment variables
All credentials must come from environment variables:Kubernetes secrets
External secrets managers
Use a sidecar or init container to fetch from AWS Secrets Manager, Vault, etc. Signal restarts on rotation. Do not mount secrets as files — Hyperterse reads environment variables.Rate limiting
No built-in rate limiting. Implement at the infrastructure layer:- Reverse proxy — Nginx
limit_req, Caddyrate_limit, Envoy rate limit filter. - API gateway — AWS API Gateway, Kong, Traefik.
- Cloud provider — Cloud Armor, AWS WAF, Azure Front Door.
/mcp, which handles all tool invocations.
Health checks
Expose lightweight probes so your orchestrator can detect and restart unhealthy instances.Liveness
Readiness
For full-system readiness, create a tool that queries each adapter:Deployment checklist
- All sensitive tools have
authblocks. - No
allow_allon tools accessing sensitive data. - Credentials via environment variables, not plaintext.
-
.envexcluded from version control. - TLS at reverse proxy or load balancer.
- CORS restricted to application domain.
- Log level at 2 or 3.
- Container runs as non-root.
- Runtime port not exposed to public internet.
- Rate limiting at infrastructure layer.
- Health and readiness probes configured.
- Observability enabled.