Skip to content

Commit 08321f3

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
Merge remote-tracking branch 'origin/staging' into feature/pi-exa
# Conflicts: # packages/db/migrations/meta/0268_snapshot.json # packages/db/migrations/meta/_journal.json # scripts/check-api-validation-contracts.ts
2 parents f9a3f9f + 513292f commit 08321f3

40 files changed

Lines changed: 20151 additions & 273 deletions

apps/docs/content/docs/en/platform/enterprise/data-retention.mdx

Lines changed: 107 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,50 @@
11
---
22
title: Data Retention
3-
description: Control how long execution logs, deleted resources, and copilot data are kept before permanent deletion
3+
description: Control how long execution logs, deleted resources, and Chat data are kept before permanent deletion — and redact PII from workflow data
44
---
55

6+
import { Callout } from 'fumadocs-ui/components/callout'
67
import { FAQ } from '@/components/ui/faq'
78
import { Image } from '@/components/ui/image'
89

9-
Data Retention lets organization owners and admins on Enterprise plans configure how long three categories of data are kept before they are permanently deleted. The configuration applies to every workspace in the organization.
10+
Data Retention lets organization owners and admins on Enterprise plans control two things:
11+
12+
1. **Retention periods** — how long execution logs, soft-deleted resources, and Chat data are kept before they are permanently deleted.
13+
2. **PII redaction** — masking personally identifiable information out of your workflow data at up to three points: workflow input, block outputs, and logs.
14+
15+
Both are configured once at the **organization level** and apply to every workspace, with optional **per-workspace overrides** for workspaces that need different rules.
1016

1117
---
1218

1319
## Setup
1420

1521
Go to **Settings → Enterprise → Data Retention** in your workspace.
1622

17-
<Image src="/static/enterprise/data-retention.png" alt="Data Retention settings showing three dropdowns — Log retention, Soft deletion cleanup, and Task cleanup — each set to Forever" width={900} height={500} />
23+
<Image src="/static/enterprise/data-retention.png" alt="Data Retention settings showing the Retention policies list with the Organization default row and its summary of retention periods and PII stages" width={900} height={537} />
24+
25+
The page shows your **retention policies** as a list:
1826

19-
You will see three independent settings, each with the same set of options: **1 day, 3 days, 7 days, 14 days, 30 days, 60 days, 90 days, 180 days, 1 year, 5 years,** or **Forever**.
27+
- The **Organization** row (tagged *Default*) holds the settings that apply to every workspace without its own override.
28+
- Each **workspace override** row below it applies to one or more specific workspaces.
2029

21-
Setting a period to **Forever** means that category of data is never automatically deleted.
30+
Open a row to edit it, or click **Add override** to create a workspace override. Each policy has a **Retention** section, and — when PII redaction is enabled — a **PII redaction** section.
2231

2332
---
2433

25-
## Settings
34+
## Retention periods
35+
36+
Each policy has three independent retention settings, each with the same set of options: **1 day, 3 days, 7 days, 14 days, 30 days, 60 days, 90 days, 180 days, 1 year, 5 years,** or **Forever**.
37+
38+
Setting a period to **Forever** means that category of data is never automatically deleted. On a workspace override, each field can also be set to **Inherit from organization** to fall back to the organization default for just that field.
2639

2740
### Log retention
2841

29-
Controls how long **workflow execution logs** are kept.
42+
Controls how long **execution logs** are kept.
3043

31-
When the retention period expires, execution log records are permanently deleted, along with any files associated with those executions stored in cloud storage.
44+
When the retention period expires, log records are permanently deleted, along with any files associated with those executions in cloud storage. This covers:
45+
46+
- Workflow execution logs
47+
- Background job logs (deployed APIs, schedules, and webhooks)
3248

3349
### Soft deletion cleanup
3450

@@ -40,33 +56,83 @@ Resources covered:
4056

4157
- Workflows
4258
- Workflow folders
43-
- Knowledge bases
59+
- Knowledge bases (and their documents)
4460
- Tables
4561
- Files
4662
- MCP server configurations
4763
- Agent memory
64+
- Chat conversations
4865

4966
### Task cleanup
5067

51-
Controls how long **Mothership data** is kept, including:
68+
Controls how long **Chat data** is kept, including:
5269

53-
- Copilot chats and run history
70+
- Chat conversations and run history
5471
- Run checkpoints and async tool calls
55-
- Inbox tasks (Sim Mailer)
72+
- Inbox tasks
5673

5774
Each setting is independent. You can configure a short log retention period alongside a long soft deletion cleanup period, or any combination that fits your compliance requirements.
5875

5976
---
6077

61-
## Organization-wide configuration
78+
## PII redaction
79+
80+
When PII redaction is enabled for your organization, each policy gains a **PII redaction** section that masks personally identifiable information — names, emails, phone numbers, credit-card numbers, national IDs, and more — from your workflow data. Sim detects and masks PII with [Microsoft Presidio](https://microsoft.github.io/presidio/); each match is replaced with a placeholder token such as `<EMAIL_ADDRESS>`.
81+
82+
Redaction is configured per **stage** — the point in a run where masking is applied. Select a stage, then choose which entity types and custom patterns to redact for it:
83+
84+
| Stage | What it does |
85+
|---|---|
86+
| **Logs** | Redacts workflow logs when they are persisted. Observability-only — the workflow still runs on the original data. |
87+
| **Workflow input** | Redacts the workflow input **before execution**. The workflow runs on the masked data, which may change its output. |
88+
| **Block outputs** | Masks every block output **before the next block reads it**. Runs in-flight and may change output and execution performance. |
89+
90+
<Image src="/static/enterprise/data-retention-pii.png" alt="PII redaction section with the Block outputs stage selected, showing the entity type grid grouped by Common, United States, United Kingdom, and Other regions" width={900} height={537} />
91+
92+
<Callout type="warn">
93+
The **Workflow input** and **Block outputs** stages alter what the workflow computes on, not just what is stored. Redacted data is masked during the run and may affect workflow output. Enable them only where that trade-off is acceptable.
94+
</Callout>
95+
96+
### Entity types and language
97+
98+
For each stage, choose the **entity types** to redact from the searchable grid. They are grouped as:
99+
100+
- **Common** — person name, email, phone, credit card, IP address, URL, IBAN, crypto wallet, medical license, VIN
101+
- **United States** — SSN, passport, driver's license, bank account, ITIN
102+
- **United Kingdom** — NHS number, National Insurance number
103+
- **Other regions** — Singapore, Australian, and Indian identifiers
104+
105+
The **Block outputs** stage is restricted to regex- and checksum-based recognizers, so it can run in-flight over large payloads without a performance penalty. Types that need name-model detection — person name, location, date or time — are not offered for that stage.
106+
107+
Detection is language-aware: pick the **language** whose recognizers should apply. English, Spanish, Italian, Polish, and Finnish are supported, and the grid filters to the identifiers available for the selected language.
108+
109+
<Callout type="warn">
110+
Some recognizers match loosely and over-redact — US Social Security Number, US bank account number, and Date or time have no checksum and match aggressively. Enable these only where false positives are acceptable.
111+
</Callout>
112+
113+
### Custom patterns
62114

63-
Retention is configured at the **organization level**. A single configuration applies to every workspace in the organization — there are no per-workspace overrides.
115+
Beyond the built-in entity types, each stage can redact anything a **regular expression** matches — employee IDs, internal URLs, ticket numbers. Give each pattern a name, a regex, and a replacement token; every match is replaced with the replacement text wrapped in angle brackets (e.g. `EMPLOYEE_ID``<EMPLOYEE_ID>`).
116+
117+
---
118+
119+
## Per-workspace overrides
120+
121+
Retention and PII redaction are configured at the **organization level** and apply to every workspace by default. When a workspace needs different rules, add a **workspace override**.
122+
123+
<Image src="/static/enterprise/data-retention-override.png" alt="Add workspace override panel showing the workspace picker, retention fields set to Inherit from organization, and the PII redaction Inherit or Override switch" width={900} height={537} />
124+
125+
- An override targets one or more workspaces (a workspace can belong to only one override).
126+
- Each **retention** field either sets its own period or **inherits** the organization value.
127+
- **PII redaction** on an override is either **Inherit** (use the organization's redaction) or **Override** (workspace-specific). Choosing Override replaces the organization's redaction rules entirely for that workspace — it is not merged stage-by-stage.
128+
129+
Removing an override returns its workspaces to the organization defaults.
64130

65131
---
66132

67133
## Defaults
68134

69-
By default, all three settings are unconfigured — no data is automatically deleted in any category until you configure it. Setting a period to **Forever** has the same effect as leaving it unconfigured, but makes the intent explicit and allows you to change it later without saving from scratch.
135+
By default, retention settings are unconfigured — no data is automatically deleted in any category, and no PII is redacted, until you configure it. Setting a retention period to **Forever** has the same effect as leaving it unconfigured, but makes the intent explicit and lets you change it later without configuring from scratch.
70136

71137
---
72138

@@ -84,13 +150,17 @@ By default, all three settings are unconfigured — no data is automatically del
84150
answer: "No. Once the soft deletion cleanup period expires and the cleanup job runs, resources are permanently deleted and cannot be recovered."
85151
},
86152
{
87-
question: "Does the retention period apply to all workspaces in my organization?",
88-
answer: "Yes. Retention is configured once per organization and applies to every workspace in the organization."
153+
question: "Does a policy apply to all workspaces?",
154+
answer: "The organization policy applies to every workspace that does not have its own override. Add a per-workspace override to give specific workspaces different retention periods or PII redaction rules."
89155
},
90156
{
91157
question: "What happens if I shorten the retention period?",
92158
answer: "The next cleanup job will delete any data that is older than the new, shorter period — including data that would have been kept under the previous setting. Shortening the period is irreversible for data that falls outside the new window."
93159
},
160+
{
161+
question: "Does PII redaction change how my workflows run?",
162+
answer: "The Logs stage does not — it only masks data as it is persisted, so the workflow runs on the original data. The Workflow input and Block outputs stages do: they mask data in-flight, so the workflow computes on the redacted values, which can change its output."
163+
},
94164
{
95165
question: "What is the minimum retention period?",
96166
answer: "1 day (24 hours)."
@@ -105,10 +175,28 @@ By default, all three settings are unconfigured — no data is automatically del
105175

106176
## Self-hosted setup
107177

108-
### Environment variables
178+
### Retention periods
109179

110180
```bash
111181
NEXT_PUBLIC_DATA_RETENTION_ENABLED=true
182+
DATA_RETENTION_ENABLED=true
183+
```
184+
185+
Once enabled, retention settings are configurable through **Settings → Enterprise → Data Retention** the same way as Sim Cloud.
186+
187+
### PII redaction
188+
189+
PII redaction runs against a standalone [Presidio](https://microsoft.github.io/presidio/) service. Deploy it (see `apps/pii`) and point Sim at it, then enable the redaction surfaces:
190+
191+
```bash
192+
# The Presidio service exposing /analyze and /anonymize
193+
PII_URL=http://localhost:5001
194+
195+
# Expose the log-redaction stage and the Data Retention PII section
196+
PII_REDACTION=true
197+
198+
# Additionally expose the execution-altering stages (Workflow input, Block outputs)
199+
PII_GRANULAR_REDACTION=true
112200
```
113201

114-
Once enabled, data retention settings are configurable through **Settings → Enterprise → Data Retention** the same way as Sim Cloud.
202+
`PII_GRANULAR_REDACTION` layers on top of `PII_REDACTION` — with only `PII_REDACTION` enabled, just the **Logs** stage is configurable.

apps/docs/content/docs/en/platform/enterprise/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pages": [
44
"index",
55
"sso",
6+
"verified-domains",
67
"session-policies",
78
"access-control",
89
"custom-blocks",
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Verified Domains
3+
description: Prove ownership of your email domains before configuring single sign-on
4+
---
5+
6+
import { Callout } from 'fumadocs-ui/components/callout'
7+
import { FAQ } from '@/components/ui/faq'
8+
9+
Verified Domains let organization owners and admins on Enterprise plans prove they control an email domain (like `acme.com`) with a DNS TXT record. Verifying a domain is the security precondition for configuring single sign-on for it.
10+
11+
<Callout type="warning">
12+
Configuring SSO for a domain requires it to be verified first. Verifying proves your organization controls the domain — without it, anyone could point another company's domain at their own identity provider. Domains you had already configured for SSO are automatically treated as verified.
13+
</Callout>
14+
15+
---
16+
17+
## Verify a domain
18+
19+
Go to **Settings → Security → Verified domains** in your organization settings.
20+
21+
1. Enter the domain, for example `acme.com`, and click **Add domain**.
22+
2. Sim shows a DNS **TXT record** to publish — a host (`_sim-challenge.acme.com`) and a unique value (`sim-domain-verification=…`).
23+
3. Add that TXT record at your DNS provider.
24+
4. Click **Verify**. Sim looks up the record; on success the domain is marked **Verified**.
25+
26+
DNS changes can take up to 48 hours to propagate — if verification does not succeed immediately, wait and retry. You can remove the TXT record after the domain is verified; the verification persists.
27+
28+
Add each domain you own separately. Subdomains (`eng.acme.com`) are verified independently of the apex.
29+
30+
---
31+
32+
## FAQ
33+
34+
<FAQ
35+
items={[
36+
{
37+
question: 'Where does the TXT record go?',
38+
answer:
39+
'On a dedicated host, _sim-challenge.<your-domain>, rather than the root of your domain — this avoids colliding with your SPF, DMARC, or other root TXT records.',
40+
},
41+
{
42+
question: 'What happens to domains we already use for SSO?',
43+
answer:
44+
'They are automatically treated as verified, so existing single sign-on keeps working with no action needed.',
45+
},
46+
{
47+
question: 'Can two organizations verify the same domain?',
48+
answer:
49+
'No. A verified domain belongs to exactly one organization. Once verified, another organization cannot claim it.',
50+
},
51+
{
52+
question: 'What if I remove a verified domain?',
53+
answer:
54+
'You lose the ownership proof, so you cannot configure SSO for that domain until you re-add and re-verify it. Removing it does not sign anyone out — an already-configured SSO provider keeps working.',
55+
},
56+
]}
57+
/>
285 KB
Loading
317 KB
Loading
87.1 KB
Loading

0 commit comments

Comments
 (0)