Skip to content

Commit 1947825

Browse files
waleedlatif1claude
andcommitted
docs(self-hosting): correct claims that contradict the source
An audit of the 27 self-hosting and enterprise pages checked every concrete claim against the code it describes. This fixes what it found. Errors that made a documented path fail: - `openssl rand -hex 32` prints 64 hex characters, not the "32 hex chars" five entries claimed. Only ENCRYPTION_KEY and API_ENCRYPTION_KEY are length- validated; the rest are free-form minimums, so the fix differs per variable. - API_ENCRYPTION_KEY was absent from the whole Kubernetes path and listed as required elsewhere. It is optional, and unset means API keys are stored in plain text behind one warning — a silent failure documented nowhere. - The per-purpose S3 fallback was described backwards: knowledge-base, chat, copilot and profile-picture buckets resolve to an empty string, not a literal. The GCS table carried the mirror-image claim, and Azure had no warning at all. - Local uploads go to /app/uploads, not /uploads, and no compose file or chart mounts a volume there. - The remote-sandbox table omitted the immutable template and snapshot refs, so the documented configuration could not work. - The GKE BackendConfig snippet set a values key no template renders. - Retention deletion is scheduled by nothing in the chart, so a deployment that followed the docs deleted nothing. - Every "Settings → Enterprise/Security → X" path named nav groups that do not exist, across eleven enterprise pages. Claims that understated what ships: - The outbound-proxy section said no platform traffic can be proxied. The server runs on Bun, whose fetch honors the proxy variables, so provider SDK and Resend traffic already proxies; guarded egress, SMTP, object storage and OTLP do not. Replaced with a per-path table, including the constraint that the per-request proxyUrl refuses a private address. - Telemetry is off by default on Helm, not on, and enabling the collector collects nothing until NEXT_TELEMETRY_DISABLED is cleared. - The CronJob count was 18 in two places; there are 22 in both the chart and the crontab. - The permission-group table was stale throughout, named a deployment key that does not exist, and inverted the checkbox semantic. About fifteen governed toggles were undocumented. Also documents ~25 environment variables nothing described, the migration advisory lock and its operational knobs, the CloudWatch metrics that activate on any deployment with AWS credentials, and sim-setup doctor. Redundancy removed where a page restated itself: FAQ blocks that repeated their own body, four drifting copies of the same tables, and three cloud tabs identical but for a filename. The sandbox base-image runbook moves from the enterprise enablement page, where it was out of place, to its own self-hosting page rather than being lost. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BwsJTEQRzWJaY4BRCkPZt
1 parent bc2622a commit 1947825

35 files changed

Lines changed: 894 additions & 542 deletions

apps/docs/content/docs/platform/enterprise/access-control.mdx

Lines changed: 89 additions & 82 deletions
Large diffs are not rendered by default.

apps/docs/content/docs/platform/enterprise/audit-logs.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Audit logs give your organization a tamper-evident record of every significant a
1414

1515
### In the UI
1616

17-
Go to **Settings → Enterprise → Audit Logs** in your workspace. Logs are displayed in a table with the following columns:
17+
Go to **Settings → Organization → Audit logs** in your workspace. Logs are displayed in a table with the following columns:
1818

1919
<Image src="/static/enterprise/audit-logs.png" alt="Audit Logs settings showing a table of events with columns for Timestamp, Event, Description, and Actor, along with search and filter controls" width={900} height={830} />
2020

@@ -149,4 +149,13 @@ AUDIT_LOGS_ENABLED=true
149149
NEXT_PUBLIC_AUDIT_LOGS_ENABLED=true
150150
```
151151

152-
Once enabled, audit logs are viewable in **Settings → Enterprise → Audit Logs** and accessible via the API.
152+
Once enabled, audit logs are viewable in **Settings → Organization → Audit logs** and accessible via the API.
153+
154+
`GET /api/v1/audit-logs` requires a session and an organization on an Enterprise plan, so it is unreachable on a deployment that has no organization yet. The admin-key equivalent has neither requirement:
155+
156+
```http
157+
GET /api/v1/admin/audit-logs
158+
x-admin-key: <admin-api-key>
159+
```
160+
161+
It accepts the same filters as the organization endpoint plus `limit` (max 250) and `offset`, and returns entries across the whole deployment rather than one organization. `GET /api/v1/admin/audit-logs/<id>` returns a single entry. Set `ADMIN_API_KEY` to use it — see the [self-hosted enterprise guide](/platform/enterprise/self-hosted).

apps/docs/content/docs/platform/enterprise/custom-blocks.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Custom blocks turn a workflow one team owns into infrastructure the whole organi
3535

3636
### 1. Open Custom blocks settings
3737

38-
Go to **Settings → Enterprise → Custom blocks** and click **Create block**.
38+
Go to **Settings → Organization → Custom blocks** and click **Create block**.
3939

4040
<Image src="/static/enterprise/custom-blocks-list.png" alt="Custom blocks settings page listing a published block with its icon, name, and description, with a Create block button in the header" width={900} height={570} />
4141

@@ -102,7 +102,7 @@ Consumers don't need any access to the source workflow. The block runs on its ow
102102

103103
## Managing blocks
104104

105-
Open a block from **Settings → Enterprise → Custom blocks** to edit or delete it.
105+
Open a block from **Settings → Organization → Custom blocks** to edit or delete it.
106106

107107
- **Editing** changes only the block's presentation, interface, and trace policy — name, description, icon, input placeholders, exposed outputs, and whether runs are traced in consumer logs. The source workflow can't be re-pointed.
108108
- **Changing what the block does** is done by editing and **redeploying the source workflow**. The block picks up the new deployment automatically; there's nothing to republish.

apps/docs/content/docs/platform/enterprise/data-drains.mdx

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Drains are independent of [Data Retention](/platform/enterprise/data-retention)
1313

1414
## Setup
1515

16-
Go to **Settings → Enterprise → Data Drains** in your workspace, then click **New drain**.
16+
Go to **Settings → Organization → Data drains** in your workspace, then click **New drain**.
1717

1818
![Data Drains settings page showing two configured drains — one exporting workflow logs to Amazon S3 daily, another exporting Copilot chats to an HTTPS webhook hourly](/static/enterprise/data-drains-list.png)
1919

@@ -207,10 +207,6 @@ After data lands in your bucket or webhook system, archive lifecycle (transition
207207
question: "Who can configure data drains?",
208208
answer: "Only organization owners and admins can view, create, edit, run, or delete drains. On Sim Cloud, the organization must be on an Enterprise plan."
209209
},
210-
{
211-
question: "Will drained data be duplicated if a run fails?",
212-
answer: "The drain cursor only advances on overall success, so a failure replays the same chunks on the next run. Every row has a stable `id` field and every webhook chunk has an `Idempotency-Key` header so receivers can dedupe."
213-
},
214210
{
215211
question: "Can I export multiple sources to the same destination?",
216212
answer: "Yes — create one drain per source, all pointing at the same bucket or endpoint. S3 destinations namespace by source automatically; webhook receivers can branch on the `X-Sim-Source` header."
@@ -240,6 +236,27 @@ DATA_DRAINS_ENABLED=true
240236
NEXT_PUBLIC_DATA_DRAINS_ENABLED=true
241237
```
242238

243-
`NEXT_PUBLIC_DATA_DRAINS_ENABLED` shows the **Settings → Enterprise → Data Drains** page in the UI. `DATA_DRAINS_ENABLED` gates the server-side mutating endpoints and the cron dispatcher — when unset on a self-hosted deployment, drain create/update/delete/run requests return `404` and the dispatcher is a no-op. Both should be set to `true` together.
239+
`NEXT_PUBLIC_DATA_DRAINS_ENABLED` shows the **Settings → Organization → Data drains** page in the UI. `DATA_DRAINS_ENABLED` gates the server-side mutating endpoints and the cron dispatcher — when unset on a self-hosted deployment, drain create/update/delete/run requests return `404` and the dispatcher is a no-op. Both should be set to `true` together.
240+
241+
### Scheduling the dispatcher
242+
243+
The dispatcher is an HTTP endpoint, not a self-scheduling job — something has to call it:
244+
245+
```
246+
GET /api/cron/run-data-drains
247+
```
248+
249+
It authenticates with a bearer token equal to `CRON_SECRET` and returns `401` when that variable is unset, so a self-hosted deployment must set it:
250+
251+
```bash
252+
CRON_SECRET=$(openssl rand -hex 32)
253+
```
254+
255+
The Helm chart schedules this endpoint hourly for you (`cronjobs.jobs.runDataDrains`). Outside Helm, schedule it yourself:
256+
257+
```bash
258+
curl -H "Authorization: Bearer $CRON_SECRET" \
259+
https://sim.example.com/api/cron/run-data-drains
260+
```
244261

245-
Data Drains otherwise rely on the standard Trigger.dev background job infrastructure used elsewhere in Sim — no additional setup is required. The cron dispatcher runs hourly and fans out due drains as background jobs.
262+
Each due drain is then fanned out as a `run-data-drain` background job, so the deployment also needs `TRIGGER_DEV_ENABLED` with a configured Trigger.dev project, or the local job backend. See [background jobs](/platform/self-hosting/background-jobs).

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

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Both are configured once at the **organization level** and apply to every worksp
1818

1919
## Setup
2020

21-
Go to **Settings → Enterprise → Data Retention** in your workspace.
21+
Go to **Settings → Organization → Data retention** in your workspace.
2222

2323
<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} />
2424

@@ -97,10 +97,10 @@ The **Workflow input** and **Block outputs** stages alter what the workflow comp
9797

9898
For each stage, choose the **entity types** to redact from the searchable grid. They are grouped as:
9999

100-
- **Common** — person name, email, phone, credit card, IP address, URL, IBAN, crypto wallet, medical license, VIN
100+
- **Common** — person name, email, phone, credit card, IP address, location, date or time, URL, IBAN, crypto wallet, nationality/religious/political group, medical license, VIN
101101
- **United States** — SSN, passport, driver's license, bank account, ITIN
102102
- **United Kingdom** — NHS number, National Insurance number
103-
- **Other regions**Singapore, Australian, and Indian identifiers
103+
- **Other regions**Spanish (NIF, NIE), Italian (fiscal code, driver's licence, VAT code, passport, identity card), Polish (PESEL), Singaporean (NRIC/FIN, UEN), Australian (ABN, ACN, TFN, Medicare), Indian (PAN, Aadhaar, vehicle registration, voter ID, passport), and Finnish (personal identity code) identifiers
104104

105105
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.
106106

@@ -182,7 +182,30 @@ NEXT_PUBLIC_DATA_RETENTION_ENABLED=true
182182
DATA_RETENTION_ENABLED=true
183183
```
184184

185-
Once enabled, retention settings are configurable through **Settings → Enterprise → Data Retention** the same way as Sim Cloud.
185+
Once enabled, retention settings are configurable through **Settings → Organization → Data retention** the same way as Sim Cloud.
186+
187+
### Scheduling the deletion pass
188+
189+
`DATA_RETENTION_ENABLED` permits deletion; it does not perform it. Deletion runs when a scheduled request reaches one of three endpoints, each authenticated with a bearer token equal to `CRON_SECRET`:
190+
191+
| Category | Endpoint |
192+
|----------|----------|
193+
| Execution and job logs | `GET /api/logs/cleanup` |
194+
| Soft-deleted resources | `GET /api/cron/cleanup-soft-deletes` |
195+
| Chats and Chat runs | `GET /api/cron/cleanup-tasks` |
196+
197+
<Callout type="warn">
198+
The Helm chart does **not** schedule these three endpoints. An operator who sets `DATA_RETENTION_ENABLED=true` on the chart alone still deletes nothing. Add them to `cronjobs.jobs`, or call them daily from an external scheduler.
199+
</Callout>
200+
201+
```bash
202+
CRON_SECRET=$(openssl rand -hex 32)
203+
204+
curl -H "Authorization: Bearer $CRON_SECRET" \
205+
https://sim.example.com/api/logs/cleanup
206+
```
207+
208+
Each call fans the work out as background jobs, so the deployment also needs `TRIGGER_DEV_ENABLED` with a configured Trigger.dev project, or the local job backend.
186209

187210
### PII redaction
188211

@@ -193,4 +216,4 @@ PII redaction runs against a standalone [Presidio](https://microsoft.github.io/p
193216
PII_URL=http://localhost:5001
194217
```
195218

196-
All PII stages are configurable under **Settings → Enterprise → Data Retention**.
219+
All PII stages are configurable under **Settings → Organization → Data retention**.

apps/docs/content/docs/platform/enterprise/forks.mdx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ On Sim Cloud, your organization may also need the feature turned on for your acc
2929

3030
### 1. Open Forks
3131

32-
Go to **Settings → Enterprise → Workspace Forks** in the workspace you want to fork from (or manage).
32+
Go to **Settings → Organization → Workspace forks** in the workspace you want to fork from (or manage).
3333

3434
<Image src="/static/enterprise/forks-list.png" alt="Workspace Forks settings page showing Parent and Forks sections with Docs, See activity, and Create fork actions" width={900} height={369} />
3535

@@ -62,7 +62,7 @@ Click **Fork**. The child workspace is created immediately. Deployed workflows l
6262

6363
### 3. Open the parent edge (from the child)
6464

65-
Open the **child** workspace → **Settings → Enterprise → Workspace Forks**. On the **Parent** row, open the menu and choose **Edit mappings**.
65+
Open the **child** workspace → **Settings → Organization → Workspace forks**. On the **Parent** row, open the menu and choose **Edit mappings**.
6666

6767
Child rows (when you are on the parent) only offer **Open workspace** and **Disconnect** — mapping and sync are owned by the child configuring how it relates to its parent.
6868

@@ -373,13 +373,8 @@ Schedules, webhooks, and triggers are not live in the child until you **deploy**
373373

374374
<FAQ items={[
375375
{ question: "Why is Sync greyed out?", answer: "Usually a blocking reference, an unmapped credential or secret, or a required dependent field (label, channel, document, …) still empty. Open Blocking sync and the mapping sections — each row explains what to fix. Sync also stays disabled while details are loading or if loading failed (reload the page)." },
376-
{ question: "Why weren’t my credentials copied into the fork?", answer: "Credentials are never copied, for security. Fields are cleared on fork. On sync you map each source credential to a credential that already exists in the target, then re-pick dependent fields." },
377-
{ question: "Do secret values get copied?", answer: "No. Only names like {{API_KEY}} appear in workflow text. Create the values under Secrets in each workspace, and map key names on sync if they differ." },
378-
{ question: "Can I sync with a grandparent or another fork?", answer: "No. Sync only works along a direct parent↔child edge." },
379-
{ question: "What if I deselect resources when creating a fork?", answer: "References to those resources in the forked workflows are cleared in the child. You will see a warning in the modal before you confirm." },
380376
{ question: "Is sync a merge?", answer: "No. Deploy is like a commit; sync is a force push or force pull of deployed workflows onto the target. Use Rollback only for the last sync into a workspace, and remember copied resources may remain." },
381-
{ question: "What happens to chat URLs?", answer: "Deployed chats are carried with a new URL on fork. On sync, a chat is created on the target only if that workflow does not already have one. Existing target chats are not replaced." },
382-
{ question: "Who can disconnect a fork I cannot open?", answer: "Any admin on your side of the edge. Disconnect does not require access to the other workspace — so you are not stuck if the other side lost membership." },
377+
{ question: "Who can disconnect a fork I cannot open?", answer: "Any admin on your side of the edge. Disconnect does not require access to the other workspace — so you are not stuck if the other side lost membership." }
383378
]} />
384379

385380
---
@@ -392,4 +387,4 @@ Self-hosted deployments turn Forks on with an environment variable instead of th
392387
|----------|-------------|
393388
| `FORKING_ENABLED`, `NEXT_PUBLIC_FORKING_ENABLED` | Enables workspace forking when billing is not used as the entitlement gate |
394389

395-
Once enabled, use the same **Settings → Enterprise → Workspace Forks** UI as Sim Cloud. Only workspace admins can manage forks.
390+
Once enabled, use the same **Settings → Organization → Workspace forks** UI as Sim Cloud. Only workspace admins can manage forks.

apps/docs/content/docs/platform/enterprise/index.mdx

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,29 @@ title: Enterprise
33
description: Enterprise features for business organizations
44
---
55

6-
import { FAQ } from '@/components/ui/faq'
7-
86
Sim Enterprise adds fine-grained access control, SSO, audit logging, compliance features, and workspace forking on top of Team plans.
97

108
---
119

12-
## Access Control
10+
## Permission groups
1311

14-
Define permission groups on a workspace to control what features and integrations its members can use. Permission groups are scoped to a single workspace — a user can belong to different groups (or no group) in different workspaces.
12+
Define permission groups to control what features, models, blocks, and integrations your members can use. A permission group belongs to an **organization**. The organization's single **default group** governs everyone org-wide; every other group targets a specific set of workspaces and, by default, governs all members of those workspaces — or only named members once you add them. A user is governed by exactly one group in any given workspace.
1513

16-
External workspace members can be assigned to permission groups just like internal organization members, but they remain outside the organization roster and do not consume seats.
14+
External workspace members can be governed by permission groups just like internal organization members, but they remain outside the organization roster and do not consume seats.
1715

18-
### Features
16+
### What a group controls
1917

20-
- **Allowed Model Providers** - Restrict which AI providers users can access (OpenAI, Anthropic, Google, etc.)
21-
- **Allowed Blocks** - Control which workflow blocks are available
22-
- **Platform Settings** - Hide Knowledge Base, disable MCP tools, disable custom tools, or disable invitations
18+
- **Model providers** - Restrict which AI providers members can use, and deny individual models within an allowed provider
19+
- **Blocks** - Control which workflow blocks are available, and deny individual tools within an allowed integration
20+
- **Platform** - Revoke modules (Chat, Knowledge Base, Tables, Files, Sim Mailer), deployment surfaces, tool types, log detail, collaboration actions, and credential access
2321

2422
### Setup
2523

26-
1. Navigate to **Settings****Access Control** in the workspace you want to manage
24+
1. Navigate to **Settings****Organization****Permission groups** from any workspace in your organization
2725
2. Create a permission group with your desired restrictions
28-
3. Add workspace members to the permission group
26+
3. Scope it to workspaces, and optionally add named members
2927

30-
Any workspace admin on an Enterprise-entitled workspace can manage permission groups. Users not assigned to any group have full access. Restrictions are enforced at both UI and execution time, based on the workflow's workspace.
28+
Only organization owners and admins can manage permission groups. Users not governed by any group have full access. Restrictions are enforced at both UI and execution time, based on the organization that owns the workflow's workspace.
3129

3230
See the [Access Control guide](/platform/enterprise/access-control) for full details.
3331

@@ -41,9 +39,9 @@ See the [SSO setup guide](/platform/enterprise/sso) for step-by-step instruction
4139

4240
---
4341

44-
## Whitelabeling
42+
## White-labeling
4543

46-
Replace Sim's default branding — logos, product name, and favicons — with your own. See the [whitelabeling guide](/platform/enterprise/whitelabeling).
44+
Replace Sim's default branding — logos, wordmark, product name, and theme colors — with your own. Instance-wide branding environment variables additionally cover the favicon and custom CSS. See the [white-labeling guide](/platform/enterprise/whitelabeling).
4745

4846
---
4947

@@ -77,14 +75,6 @@ Clone a workspace into a linked child, then push or pull **deployed** workflow c
7775

7876
---
7977

80-
<FAQ items={[
81-
{ question: "Who can manage Enterprise features?", answer: "Workspace admins on an Enterprise-entitled workspace. Access Control, SSO, whitelabeling, audit logs, data retention, data drains, and forks are all configured per workspace under Settings → Enterprise." },
82-
{ question: "Which SSO providers are supported?", answer: "Sim supports SAML 2.0 and OIDC, which works with virtually any enterprise identity provider including Okta, Azure AD (Entra ID), Google Workspace, ADFS, and OneLogin." },
83-
{ question: "How do access control permission groups work?", answer: "Permission groups are created per workspace and let you restrict which AI providers, workflow blocks, and platform features are available to specific members of that workspace. Each user can belong to at most one group per workspace. Users not assigned to any group have full access. Restrictions are enforced at both the UI level and at execution time based on the workflow's workspace." },
84-
]} />
85-
86-
---
87-
8878
## Self-hosted setup
8979

9080
Self-hosted deployments unlock enterprise features through environment configuration instead of billing. One switch turns on the whole set:

0 commit comments

Comments
 (0)