Prerequisites
- Kubernetes cluster with Helm 3.8+
kubectlandhelmconfiguredopensslavailable for key generation- Access to create Secrets in the target namespace
Step 1: Generate JWT Secret and Create K8s Secret
JWT is used to authenticate connections between clients and the ChatCLI server.Step 2: Configure TLS Certificates
- cert-manager (recommended)
- Manual certificate
Step 3: Set Up Rate Limiting
Define request limits to prevent abuse and DoS:Step 4: Enable Audit Logging
Audit logging records each operation with details of who, what, and when:- Authenticated user (via JWT claims)
- Command or operation executed
- Timestamp and result (success/failure)
- Source IP of the request
Step 5: Configure Agent Command Allowlist
Enablestrict mode to ensure only approved commands are executed:
In
strict mode, over 150 common commands are already pre-approved across 8 categories (file, text, dev, containers, network, system, editors, shell). Only add commands specific to your workflow.Step 6: Sign Plugins with Ed25519
To ensure only trusted plugins are loaded:Step 7: Set Up Session Encryption
Enable encryption for sessions stored on disk:Step 8: Configure Operator Security
For environments with the K8s operator, configure additional protections. First, create a Secret with the operator API keys (dashboard / REST API auth):This Secret is different from the
chatcli-api-keys Secret consumed by the chatcli server (which carries OPENAI_API_KEY, ANTHROPIC_API_KEY etc. via Instance.spec.apiKeys.name). See Security โ Operator Authentication for the comparison table.Step 9: Deploy with Helm (Complete Configuration)
Combine all configurations into a singlevalues-prod.yaml:
Step 10: Verify Security
Run this checklist to confirm everything is configured correctly:1
Verify TLS
2
Verify JWT Secret
3
Verify Pod SecurityContext
4
Verify NetworkPolicy
5
Verify gRPC Reflection is disabled
6
Test authenticated connection
7
Verify rate limiting
8
Verify audit logs
Final Checklist
Next Steps
Security and Hardening
Complete documentation of all security measures.
Deploy with Docker and Helm
Complete containerized deployment guide.
K8s Operator
Configure the Kubernetes operator.
Configuration Reference
All available environment variables.