Workload hardening
The workload layer of the Zero Trust architecture ensures that only trusted, hardened code runs in your cluster. Alquimia Platform provides deployment overlays and policy guidance to enforce this.
What is enforced
Section titled “What is enforced”| Control | Purpose |
|---|---|
| Immutable image identity | Every runtime image is signed so its origin can be verified. |
| Signature verification at admission | The cluster rejects unsigned or untrusted images before they run. |
| Curated registries | Only approved container registries are allowed. |
| Hardened pod spec | Pods run as non-root, drop all capabilities, use a read-only root filesystem, and apply a default seccomp profile. |
| Resource limits | Every container declares CPU and memory requests and limits. |
| MCP stdio allow-list | Worker pods refuse to spawn stdio MCP servers unless explicitly allowed. |
| Egress allow-list | Optional per-agentspace host allow-list restricts tool, model, and audio connector destinations. |
Deployment overlays
Section titled “Deployment overlays”The runtime repository provides overlays for different environments:
| Overlay | Use |
|---|---|
kubernetes | Vanilla Kubernetes without admission policies for flexibility. |
production | Includes Kyverno admission policies (Enforce mode) that enforce signing, registry allow-lists, and pod security. |
openshift | OpenShift / ROSA; uses OpenShift’s built-in security constraints instead of Kyverno policies. |
spire-openshift | SPIRE deployment patched for OpenShift, for SPIFFE workload identity. |
Choose the overlay that matches your cluster’s security tooling and compliance requirements.
On OpenShift, the restricted-v2 SCC enforces the hardened pod spec. Red Hat Advanced Cluster Security or ClusterImagePolicy takes over the signature, registry, and resource policies that Kyverno enforces on vanilla Kubernetes. See the supported operator stack.
Agent-spec execution controls
Section titled “Agent-spec execution controls”Agent specs are code-level configuration, and pulled registry artifacts are loaded straight into agent specs. alquimia-core 0.6.1 adds execution-side guards for the risky parts of a spec.
MCP stdio allow-list
Section titled “MCP stdio allow-list”MCP stdio transport (command, args, env, and transport: "stdio") spawns a subprocess inside the worker pod. In 0.6.1 this is rejected by default. Enable it only by setting ALQUIMIA_MCP_STDIO_ALLOWED=true and, preferably, narrowing the allowed commands with ALQUIMIA_MCP_STDIO_ALLOWLIST. The recommended pattern in production is to run stdio servers as separate sidecars or external services and connect to them over HTTP.
Egress allow-list
Section titled “Egress allow-list”Agentspace metadata can carry an egress_allowlist of allowed hosts. When set, the runtime checks every tool URL, model base_url, and audio connector base_url/host against the list and refuses calls to destinations that are not explicitly allowed. This prevents a compromised or malicious spec from exfiltrating secrets to an arbitrary host. See the Runtime configuration reference for the environment variables and the CLI reference for how to set the allow-list on an agentspace.
Image signing and verification
Section titled “Image signing and verification”Runtime images are signed during the build pipeline using keyless signing tied to the CI workflow. At admission, the cluster verifies that the image was built by the trusted workflow and mutates the image reference to its digest for immutability.
Handling exceptions
Section titled “Handling exceptions”If a workload genuinely needs to deviate from a policy — for example, a disaster-recovery container that must run as root — add an explicit exception rather than relaxing the base policy. Document the business justification and review period.
Worker trust-boundary hardening
Section titled “Worker trust-boundary hardening”Worker pods run arbitrary agent code, tool calls, and model inference. The runtime hardens the boundary between the control plane and workers so that a compromised worker cannot spoof tasks, replay old events, or read secrets outside its scope.
Kafka event signing and verification
Section titled “Kafka event signing and verification”Every Kafka CloudEvent is signed with a kid from a key ring. Set KAFKA_SIGNING_KEY (a 64-character hex key) for a single-key deployment, or KAFKA_SIGNING_KEYS (kid1:hex1,kid2:hex2) to support rotation. Keys must be 32 bytes of decoded key material. Workers verify signatures before handling events; pre-#339 signatures are rejected unless KAFKA_SIGNING_ACCEPT_LEGACY=true.
| Variable | Purpose |
|---|---|
KAFKA_SIGNING_KEY | Single signing/verification key |
KAFKA_SIGNING_KEYS | Key ring for rotation and verification |
KAFKA_SIGNING_ACCEPT_LEGACY | Accept pre-#339 signatures during rolling upgrades |
Replay and duplicate protection
Section titled “Replay and duplicate protection”Signed events whose time is outside KAFKA_EVENT_MAX_AGE_SECONDS (default 1 hour, with ±5 minutes skew tolerance) are sent to the DLQ. The runtime also de-duplicates by (source,id) with Redis SET NX and makes tool calls idempotent by (task_id, control_id, step_id). Failed or timed-out dispatches release their claim so DLQ redrive can retry them.
| Variable | Purpose |
|---|---|
KAFKA_EVENT_MAX_AGE_SECONDS | Maximum accepted age of a signed event |
KAFKA_HANDLER_TIMEOUT_SECONDS | Ceiling on handler runtime before DLQ |
Worker output shields
Section titled “Worker output shields”MCP tool results and A2A sub-agent results are screened by the shields map on ToolRegistration before they reach the agent context. If a shield errors, the tool call fails closed. This prevents retrieved or computed data from carrying prompt-injection payloads into the model.
Execution ceilings
Section titled “Execution ceilings”The runtime clamps agent-specified execution limits so a malicious or oversized spec cannot exhaust the worker:
| Variable | Default | Ceiling |
|---|---|---|
EVALUATION_MAX_STEPS_CEILING | 50 | Max max_steps |
EVALUATION_MAX_CONCURRENT_TOOLS_CEILING | 16 | Max concurrent tool calls |
MCP_TOOL_TIMEOUT_SECONDS | 120 | MCP fetch + call time |
KAFKA_HANDLER_TIMEOUT_SECONDS | 540 | Total Kafka handler time |
Production TLS profile
Section titled “Production TLS profile”Set TLS_ENFORCE=true to enable a production profile that refuses unsafe configurations:
POSTGRES_SSL_MODEmust beverify-full; anything weaker counts as plaintext.- Keycloak and OTLP endpoints must use HTTPS.
ENCRYPTION_KEYandKAFKA_SIGNING_KEYmust both be configured.KNOWLEDGE_AUTHZ_DEFAULT_DENYdefaults totrue.
Channel ingress hardening
Section titled “Channel ingress hardening”Provider webhooks are verified with provider-specific signatures or tokens. In addition:
TRUSTED_PROXY_CIDRSrestricts which proxies may supplyX-Forwarded-For.- Browser WebSocket streams must use single-use encrypted tickets from
POST /streaming/auth-ticket(?ticket=);?token=is refused unlessSTREAMING_ALLOW_QUERY_TOKEN=true. - Clean sessions close with
1000; close reasons are capped to RFC 6455 limits.
Encryption at rest
Section titled “Encryption at rest”v2 envelopes bind AES-GCM AAD to the Redis key or Postgres table.column, and plaintext is refused once a key is configured unless ENCRYPTION_ALLOW_PLAINTEXT_READS=true. v1 envelopes remain readable via ENCRYPTION_ALLOW_UNBOUND_READS (default on). Channel routes, route tokens, pending approvals, Twilio stream tickets, and WebSocket tickets are sealed, and ticket Redis keys are SHA-256 hashes.
Supply-chain best practices
Section titled “Supply-chain best practices”- Pin images to digests in production overlays.
- Scan images for vulnerabilities before deployment.
- Limit registry access to trusted sources.
- Rotate signing credentials on a schedule.
- Monitor admission-control denials as a security signal.