Kubernetes operator for managing Aten Security Thoth control-plane configuration from inside customer clusters.
- Aten Security docs: https://docs.atensecurity.com/docs/kubernetes-operator/
- Public runbook: https://github.com/atensecurity/thoth-runbooks/blob/main/onboarding/kubernetes-operator.md
This operator reconciles a ThothTenant custom resource and applies desired state to the Thoth headless governance control plane:
- Tenant settings (
/{tenant}/thoth/settings) - Optional webhook test (
/{tenant}/thoth/settings/webhook/test) - MDM provider upsert (
/{tenant}/thoth/mdm/providers) - Optional MDM sync run + polling (
/{tenant}/thoth/mdm/providers/{provider}/sync) - Policy bundle provisioning (
/{tenant}/thoth/policy-bundles) - Bulk compliance pack assignments (
/{tenant}/thoth/packs/apply) - Optional policy sync trigger (
/{tenant}/thoth/policies/sync) - Optional governance evidence backfill (
/{tenant}/governance/evidence/thoth/backfill) - Optional decision-field backfill (
/{tenant}/thoth/governance/backfill-decision-fields) - Optional redacted decision metadata export (
/{tenant}/thoth/governance/decision-metadata/export)
Use a hybrid model:
- Terraform/Pulumi for platform lifecycle and global governance resources.
thoth-operatorfor cluster-local day-2 operations (GitOps-driven settings, tenant bootstrap automation, secret rotation alignment).
helm upgrade --install thoth-operator ./charts/thoth-operator \
--namespace thoth-system \
--create-namespace
kubectl -n thoth-system create secret generic thoth-admin-token \
--from-literal=token='<THOTH_ADMIN_BEARER_TOKEN>'
kubectl apply -f examples/thothtenant.yamlapi/— CRD API typescontrollers/— reconcile logicinternal/thoth/— Thoth API client with retry/backoffconfig/— raw Kubernetes manifestscharts/thoth-operator/— Helm chart distributionexamples/— sample resources
ThothTenant.spec key fields:
tenantId(required)apexDomain(optional, defaultatensecurity.com)apiBaseURL(optional override; otherwise derived ashttps://grid.{tenantId}.{apexDomain})authMode(optional:auto/bearer/api_key; defaultauto)authSecretRef(required: Kubernetes secret name/key containing admin bearer token)settings(optional arbitrary JSON map)mdmProvider(optional provider block)mdmSync(optional one-shot sync on spec generation change)webhookSettings(optional typed webhook config + webhook test on apply)policyBundles(optional list of Cedar/OPA deterministic policies to create/update)packAssignments(optional list of bulk pack apply operations)policySync(optional bool to trigger policy sync on generation changes)governanceEvidenceBackfill(optional block to trigger evidence backfill on generation changes)governanceDecisionFieldBackfill(optional block to backfill decision evidence fields)decisionMetadataExport(optional periodic export; defaults to internal Moses collector)
decisionMetadataExport is designed for model-training pipelines without leaking raw user/tool content:
- Raw content and tool arguments are not exported.
- Sensitive identities are HMAC-SHA256 hashed per tenant.
- Export includes decision context (policy IDs, reason codes, action class, trace IDs, parameter keys).
- By default, payload is delivered to the internal GovAPI collector:
POST /:tenant-id/thoth/governance/moses/training/decision-metadata/collect. - If
decisionMetadataExport.destinationUrlis set, payload is delivered to that external endpoint instead.
Use decisionMetadataExport.authTokenSecretRef when your external collector requires bearer auth.
- Store Thoth admin and MDM tokens only in Kubernetes Secrets (never inline in CRs).
- Restrict operator namespace + RBAC scope where possible.
- Rotate secrets and rely on reconciliation for re-application.
- Secret updates are watched; changing referenced secrets triggers immediate reconcile.
- Run at least two replicas with leader election enabled.
- Scope
watchNamespaceif each tenant is isolated per namespace. - Use GitOps for
ThothTenantresources and token secret rotation. - Pin the operator image tag and promote tags through staging before production.
- Monitor
Readycondition and operator logs for reconciliation failures.
- Public release workflow:
.github/workflows/release.yml - Trigger: signed tag push (
vX.Y.ZorvX.Y.Z-rcN) inatensecurity/thoth-operator - GitHub release notes are sourced from the matching section in
CHANGELOG.md(for RC tags, falls back to base version orUnreleased). - Outputs:
- Multi-arch image:
ghcr.io/atensecurity/thoth-operator:<version> - OCI Helm chart:
oci://ghcr.io/atensecurity/charts/thoth-operator:<version> - Cosign signatures for both image and chart digest
- Multi-arch image:
Apache License 2.0.