Configure privacy policies
Create a SessionPrivacyPolicy, bind it to a workspace service group, override it for one agent, and rotate its encryption key.
A SessionPrivacyPolicy declares what to redact and how to encrypt. Per-user opt-out and consent live in privacy-api: see Manage user consent and opt-out. For every field, see the SessionPrivacyPolicy reference.
Prerequisites
Section titled “Prerequisites”- Omnia installed with
enterprise.enabled: true, and theomnia-crdsrelease installed withenterprise.enabled=true. A license is not required: without one Omnia runs in dev mode. - A Workspace with at least one service group.
kubectlaccess to the cluster.
Create a policy
Section titled “Create a policy”A policy must live in the Workspace’s namespace, the value of spec.namespace.name on the Workspace.
kubectl apply -f - <<'EOF'apiVersion: omnia.altairalabs.ai/v1alpha1kind: SessionPrivacyPolicymetadata: name: default-privacy namespace: my-workspace-nsspec: recording: pii: redact: true patterns: - email - ssn - credit_card strategy: replaceEOFCheck that the policy is active:
kubectl get sessionprivacypolicy default-privacy -n my-workspace-nsThe PHASE column shows Active.
Bind the policy to a service group
Section titled “Bind the policy to a service group”-
Edit the Workspace and add
privacyPolicyRefto the service group:Terminal window kubectl edit workspace my-workspacespec:services:- name: defaultprivacyPolicyRef:name: default-privacy -
Check the
PrivacyPolicyResolvedcondition:Terminal window kubectl get workspace my-workspace \-o jsonpath='{.status.conditions[?(@.type=="PrivacyPolicyResolved")]}'A resolved reference reports
status: "True"andreason: PolicyResolved. The message lists each binding, for exampleservices[default] -> default-privacy.
Override the policy for one agent
Section titled “Override the policy for one agent”-
Create the stricter policy in the agent’s namespace:
Terminal window kubectl apply -f - <<'EOF'apiVersion: omnia.altairalabs.ai/v1alpha1kind: SessionPrivacyPolicymetadata:name: strict-privacynamespace: my-workspace-nsspec:recording:pii:redact: truepatterns:- email- ssn- credit_card- phone_number- ip_addressstrategy: hashEOF -
Set
spec.privacyPolicyRefon the AgentRuntime:Terminal window kubectl patch agentruntime sensitive-agent -n my-workspace-ns \--type merge -p '{"spec":{"privacyPolicyRef":{"name":"strict-privacy"}}}' -
Check the condition on the AgentRuntime:
Terminal window kubectl get agentruntime sensitive-agent -n my-workspace-ns \-o jsonpath='{.status.conditions[?(@.type=="PrivacyPolicyResolved")]}'
session-api resolves a policy in this order: the agent’s spec.privacyPolicyRef, then its service group’s, then the global default. See resolution order.
Set a global default
Section titled “Set a global default”A policy named default in the operator’s namespace (omnia-system in a default install) applies to every agent that has no service group policy and no agent override. The operator installs one, in its omnia-resources release, when enterprise.enabled and sessionPrivacy.defaultPolicy.create are true, which is the default. To manage your own, apply it directly:
kubectl apply -f - <<'EOF'apiVersion: omnia.altairalabs.ai/v1alpha1kind: SessionPrivacyPolicymetadata: name: default namespace: omnia-systemspec: recording: pii: redact: true patterns: - email - phone_numberEOFRotate encryption keys
Section titled “Rotate encryption keys”Rotation asks the KMS for a new version of the key already named in encryption.keyID. The policy needs encryption.enabled: true and encryption.keyRotation.enabled: true.
-
Choose how to rotate:
-
On a schedule: set
encryption.keyRotation.scheduleto a cron expression such as"0 0 1 * *". -
Immediately: annotate the policy.
Terminal window kubectl annotate sessionprivacypolicy my-policy -n my-workspace-ns \omnia.altairalabs.ai/rotate-key=true
-
-
To rewrite existing records onto the new version, set
encryption.keyRotation.reEncryptExisting: true. The pass covers messagecontent, tool callarguments,resultanderrorMessage, and runtime eventdataanderrorMessage, and leaves plaintext records unchanged. -
To re-encrypt, give the arena-controller, which runs the key-rotation controller, the session database DSN. Add the flag to the chart values and upgrade the release:
enterprise:arena:controller:extraArgs:- --session-postgres-conn=<session-database-dsn>Without the flag, rotation still creates the new key version and skips re-encryption.
encryption.keyID and encryption.kmsProvider are immutable once set, and the encryption block cannot be removed. To move to a different key or KMS, let the old records age out under retention or erase them, then create a new policy. Keep the old key in the KMS while any record it sealed is within retention.
Setting encryption.enabled: false stops encrypting new writes. Records already encrypted are still decrypted with the policy’s key.
Verify
Section titled “Verify”Check the rotation status:
kubectl get sessionprivacypolicy my-policy -n my-workspace-ns \ -o jsonpath='{.status.keyRotation}'currentKeyVersion changes after a rotation. With reEncryptExisting set, reEncryptionProgress.status moves from InProgress to Completed or Failed.
Troubleshooting
Section titled “Troubleshooting”PrivacyPolicyResolved is false with reason PolicyNotFound
Section titled “PrivacyPolicyResolved is false with reason PolicyNotFound”The policy named in privacyPolicyRef.name does not exist in the expected namespace. Check the spelling, then list the policies in the workspace’s namespace:
kubectl get sessionprivacypolicy -n my-workspace-nsA change does not take effect
Section titled “A change does not take effect”session-api and memory-api pick up changes to policies and AgentRuntimes in their own namespace as the API server reports them. They re-read the global default policy and the Workspace service-group binding every 30 seconds, so a change to either takes up to 30 seconds.
Find which policy applies to an agent
Section titled “Find which policy applies to an agent”No endpoint reports the effective policy. Read the agent’s override, then its service group’s binding, then the global default:
kubectl get agentruntime my-agent -n my-workspace-ns \ -o jsonpath='{.spec.privacyPolicyRef.name}'Related pages
Section titled “Related pages”- SessionPrivacyPolicy reference: fields, encryption coverage per object type and example YAML.
- Manage user consent and opt-out: record and read per-user preferences via privacy-api.
- Handle data subject erasure (DSAR): erase all of a user’s data via privacy-api.