The snippet above covers the standalone chatcli server exposed on a public domain. If you are using the Operator + Instance CR to dial gRPC via in-cluster DNS (<instance>.<ns>.svc.cluster.local), this cert will fail with x509: certificate is not valid for any names (no SANs) and x509: certificate signed by unknown authority (no ca.crt in the Secret). For that path, use the openssl.cnf with subjectAltName and the 3-key Secret documented in AIOps Production Setup §2.1.
# values-security.yaml (partial)security: rateLimitRps: 20 # 20 requests per second # bindAddress: "0.0.0.0" # Optional — auto-detected in Kubernetes
In Kubernetes, bindAddress is automatically set to 0.0.0.0 via KUBERNETES_SERVICE_HOST detection. Only set it explicitly for non-Kubernetes server deployments.
For multi-tenant environments, consider lower values (5-10 RPS per instance) and use HPA to scale horizontally.
Enable strict mode to ensure only approved commands are executed:
# values-security.yaml (partial)security: agentSecurityMode: strict# If you need additional commands:env: - name: CHATCLI_AGENT_ALLOWLIST value: "terraform;ansible;packer;vault" - name: CHATCLI_AGENT_WORKSPACE_STRICT value: "true" - name: CHATCLI_MAX_COMMAND_OUTPUT value: "50000"
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.
For environments with the K8s operator, configure additional protections.First, create a Secret with the operator API keys (dashboard / REST API auth):
apiVersion: v1kind: Secretmetadata: name: chatcli-operator-secrets # Must match the operator pod's namespace (POD_NAMESPACE / SA file). # Code default: chatcli-system. Adjust if you ran `helm install --namespace <other>`. namespace: chatcli-systemtype: OpaquestringData: api-keys: | - key: "<your-api-key>" role: admin description: "Dashboard admin"
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.
Changes to the Secret chatcli-operator-secrets (or the ConfigMap chatcli-operator-config as fallback — same api-keys field) are picked up automatically within 30 seconds. No operator restart is needed.
Then, configure the security environment variables:
# Send multiple rapid requests -- should return 429 error after the limitfor i in $(seq 1 30); do chatcli -p "ping" --remote chatcli.mydomain.com:50051 &done
8
Verify audit logs
kubectl -n chatcli logs deploy/chatcli | grep "audit"# Should show audit entries for the operations above