Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/scripts/http-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ case "$group" in
scim)
export NEXT_PUBLIC_FORCE_HOSTED=true
export BILLING_ENABLED=true NEXT_PUBLIC_BILLING_ENABLED=true
export ENTERPRISE_ENABLED=true NEXT_PUBLIC_ENTERPRISE_ENABLED=true
export SCIM_ENABLED=true NEXT_PUBLIC_SCIM_ENABLED=true
export SSO_ENABLED=true NEXT_PUBLIC_SSO_ENABLED=true
export ORGANIZATIONS_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
export ENTERPRISE_ENABLED=true
export SCIM_ENABLED=true
export SSO_ENABLED=true
export ORGANIZATIONS_ENABLED=true
export INTERNAL_API_SECRET=scim-http-ci-local-secret-at-least-32-characters
export DB_TX_TRIPWIRE=throw
export NEXT_PUBLIC_CHAT_DISABLED=true
Expand Down Expand Up @@ -282,7 +282,6 @@ case "$group" in
export NEXT_PUBLIC_FORCE_HOSTED=false
export COPILOT_TOOL_PERMISSIONS_ENABLED=true
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
case "$group" in assistant-actions|organization-search) needs_browser=true ;; *) needs_browser=false ;; esac
if [ "$needs_browser" = true ]; then start_browser_install "$group" --only-shell chromium; fi
export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters
Expand Down Expand Up @@ -335,7 +334,6 @@ case "$group" in
export NEXT_PUBLIC_FORCE_HOSTED=false
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
export SIM_LINKS=true
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true
export API_ENCRYPTION_KEY="$ENCRYPTION_KEY"
start_browser_install "$group" --no-shell chromium
extension_identity=$(bun - <<'JS'
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/chat/mailer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Sim Mailer gives an enabled workspace an email address. Send or forward a messag

A workspace **Admin** configures the inbox. On Sim Cloud, availability follows the workspace's Max or Enterprise plan and active billing, rather than the sender's individual plan.

On self-hosted deployments, availability depends on configured Chat and email services. `INBOX_ENABLED` or billing-disabled configuration can allow access, but the required Chat service key must still be configured. See [self-hosted environment variables](/platform/self-hosting/environment-variables).
On self-hosted deployments without billing, the inbox is on by default. Set `INBOX_ENABLED=false` to turn it off; that closes it on the server and removes it from the interface. It still needs the Chat service key and email services configured to work. See [self-hosted environment variables](/platform/self-hosting/environment-variables).

Members keep their own workspace permissions when submitting email tasks. An allowed external email sender can submit read-only tasks; allowlisting does not grant workspace membership, workflow execution, mutation access, or raw-secret access.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ On billing-disabled deployments, enable permission groups through the enterprise

```bash
ACCESS_CONTROL_ENABLED=true
NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true
```

The enterprise master configuration can enable the feature; an explicit feature value takes precedence. Billing-enabled self-hosted deployments still require Enterprise. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/platform/enterprise/audit-logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ On billing-disabled deployments, enable audit logs through enterprise configurat

```bash
AUDIT_LOGS_ENABLED=true
NEXT_PUBLIC_AUDIT_LOGS_ENABLED=true
```

Explicit feature values take precedence over the enterprise master setting. Billing-enabled self-hosted deployments retain the Enterprise gate. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Callout } from '@/components/ui/callout'

Publish a workflow as a custom block so teammates can provide its inputs and use selected outputs without access to its source workflow. The block always runs the source's latest deployment. Use it for a shared knowledge lookup, an authenticated internal API, an enrichment step, or a prompt and guardrail maintained in one place.

Publishing and managing a block requires admin access to its source workspace. Billing-enabled deployments require an Enterprise organization. On billing-disabled deployments, enable the custom-block feature through enterprise configuration or `CUSTOM_BLOCKS_ENABLED=true` and `NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED=true`. An organization is still required; see [self-hosted enterprise setup](/platform/enterprise/self-hosted).
Publishing and managing a block requires admin access to its source workspace. Billing-enabled deployments require an Enterprise organization. On billing-disabled deployments, enable the custom-block feature through enterprise configuration or `CUSTOM_BLOCKS_ENABLED=true`. An organization is still required; see [self-hosted enterprise setup](/platform/enterprise/self-hosted).

## Publish a block

Expand Down
3 changes: 1 addition & 2 deletions apps/docs/content/docs/platform/enterprise/data-drains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,9 @@ Enable the feature through enterprise configuration or explicitly set:

```bash
DATA_DRAINS_ENABLED=true
NEXT_PUBLIC_DATA_DRAINS_ENABLED=true
```

An explicit feature value takes precedence over `ENTERPRISE_ENABLED`. When disabled, the page is hidden, mutating drain requests return `404`, and the dispatcher does no work. Billing-enabled deployments retain the Enterprise gate. Keep server and public feature configuration aligned; `bunx sim-setup doctor` checks the pair. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
An explicit feature value takes precedence over `ENTERPRISE_ENABLED`. When disabled, the page is hidden, mutating drain requests return `404`, and the dispatcher does no work. Billing-enabled deployments retain the Enterprise gate. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).

The dispatcher requires scheduled calls to `GET /api/cron/run-data-drains`. Set the same `CRON_SECRET` on the app and its caller; the endpoint returns `401` when it is unset. Generate a secret if needed, then install it in both configurations:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ On billing-disabled deployments, enable retention through enterprise configurati

```bash
DATA_RETENTION_ENABLED=true
NEXT_PUBLIC_DATA_RETENTION_ENABLED=true
```

An explicit feature value takes precedence over the enterprise master configuration. No plan-based default window is introduced: configure the windows you intend to apply.
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/platform/enterprise/forks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ On billing-disabled deployments, enable forking through enterprise configuration

```bash
FORKING_ENABLED=true
NEXT_PUBLIC_FORKING_ENABLED=true
```

Explicit feature values take precedence over the master configuration. Billing-enabled self-hosted deployments still require Enterprise. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/platform/enterprise/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ On a self-hosted deployment with billing disabled, enable enterprise features th

```bash
ENTERPRISE_ENABLED=true
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
```

Individual feature flags override the master switch. Most enterprise settings also need an organization that owns the workspace. Choose one instance-wide organization or provision separate organizations through the Admin API.
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/platform/enterprise/scim/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Configure [SSO](/platform/enterprise/sso) separately for authentication. SCIM ca

- On Sim Cloud, use an Enterprise organization and an organization owner or admin account.
- [Verify every email domain](/platform/enterprise/verified-domains) you will provision. Sim refuses account creation or an email change to an unverified domain.
- On self-hosted deployments, enable SSO to reach **Single sign-on → Provisioning**, and enable SCIM. The enterprise master pair enables both; individual setup uses `SSO_ENABLED`, `NEXT_PUBLIC_SSO_ENABLED`, `SCIM_ENABLED`, and `NEXT_PUBLIC_SCIM_ENABLED`. See [Self-hosted SSO setup](/platform/enterprise/sso#self-hosted-setup) and [Deployment and upgrades](#deployment-and-upgrades).
- On self-hosted deployments, enable SSO to reach **Single sign-on → Provisioning**, and enable SCIM. `ENTERPRISE_ENABLED` enables both; individual setup uses `SSO_ENABLED` and `SCIM_ENABLED`. See [Self-hosted SSO setup](/platform/enterprise/sso#self-hosted-setup) and [Deployment and upgrades](#deployment-and-upgrades).

## Plan membership and access

Expand Down Expand Up @@ -205,7 +205,7 @@ While the connection is disabled, **Lock managed membership** and **Disable just
Apply database migrations before the new application code. The SCIM tables and suspension fields are additive, allowing older code to run against the expanded schema during rollout.

<Callout type="warn">
Keep `SCIM_ENABLED=false` and `NEXT_PUBLIC_SCIM_ENABLED=false` until all older application instances and workers are drained. Older code does not enforce SCIM suspension or explicit permission-group membership. These explicit flags also override the hosted default.
Keep `SCIM_ENABLED=false` until all older application instances and workers are drained. Older code does not enforce SCIM suspension or explicit permission-group membership. This explicit flag also overrides the hosted default.
</Callout>

After SCIM has suspended accounts or established managed access, rolling back to code that predates SCIM is unsafe: it cannot enforce those restrictions. Disabling synchronization does not undo suspension or restore earlier membership semantics.
Expand Down
47 changes: 23 additions & 24 deletions apps/docs/content/docs/platform/enterprise/self-hosted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,19 @@ This guide covers the standard billing-disabled configuration. If billing is ena

## Enable the feature set

Set both the server flag and its browser twin, then restart the application:
Set the server flag, then restart the application:

```bash
ENTERPRISE_ENABLED=true
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
```

The server flag controls access and the server-resolved workspace settings. The browser twin also enables controls that read browser configuration directly, including SSO on the login page and the Function block's **Sandbox** selector. On a Compose install or source checkout, `bunx sim-setup doctor` reports mismatched twins. See [Verify your install](/platform/self-hosting/verify).
The server flag controls access and everything the browser shows, including SSO on the login page and the Function block's **Sandbox** selector: the browser reads the server's resolved settings, so there is no `NEXT_PUBLIC_` variable to set. Browser variables left over from older releases do nothing; on a Compose install or source checkout, `bunx sim-setup doctor` reports them. See [Verify your install](/platform/self-hosting/verify).

Individual flags override the master switch. For example, to enable the suite with data drains disabled:

```bash
ENTERPRISE_ENABLED=true
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
DATA_DRAINS_ENABLED=false
NEXT_PUBLIC_DATA_DRAINS_ENABLED=false
```

You can also leave the master switch unset and enable individual features. The [feature flag reference](#feature-flag-reference) lists them all.
Expand Down Expand Up @@ -238,29 +235,31 @@ OAuth token cleanup removes expired and revoked credentials independently of sig

Explicit individual flags override the master switch, including when set to `false`. With billing disabled and no enterprise flags set, session policies and the Sim Mailer inbox remain enabled by default. Other features require opt-in.

| Feature | Server variable | Browser variable |
| --- | --- | --- |
| Enterprise suite | `ENTERPRISE_ENABLED` | `NEXT_PUBLIC_ENTERPRISE_ENABLED` |
| Organizations | `ORGANIZATIONS_ENABLED` | `NEXT_PUBLIC_ORGANIZATIONS_ENABLED` |
| Permission groups | `ACCESS_CONTROL_ENABLED` | `NEXT_PUBLIC_ACCESS_CONTROL_ENABLED` |
| SAML and OIDC sign-in | `SSO_ENABLED` | `NEXT_PUBLIC_SSO_ENABLED` |
| Directory provisioning | `SCIM_ENABLED` | `NEXT_PUBLIC_SCIM_ENABLED` |
| Audit logs | `AUDIT_LOGS_ENABLED` | `NEXT_PUBLIC_AUDIT_LOGS_ENABLED` |
| Insights | `USAGE_MONITORING_ENABLED` | `NEXT_PUBLIC_USAGE_MONITORING_ENABLED` |
| Custom blocks | `CUSTOM_BLOCKS_ENABLED` | `NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED` |
| Session policies — enabled by default | `SESSION_POLICIES_ENABLED` | `NEXT_PUBLIC_SESSION_POLICIES_ENABLED` |
| Retention deletion | `DATA_RETENTION_ENABLED` | `NEXT_PUBLIC_DATA_RETENTION_ENABLED` |
| Data drains | `DATA_DRAINS_ENABLED` | `NEXT_PUBLIC_DATA_DRAINS_ENABLED` |
| Credential groups | `CREDENTIAL_GROUPS` | — |
| Workspace forks | `FORKING_ENABLED` | `NEXT_PUBLIC_FORKING_ENABLED` |
| Sim Mailer inbox — enabled by default | `INBOX_ENABLED` | `NEXT_PUBLIC_INBOX_ENABLED` |
| Sandboxes | `SANDBOXES_ENABLED` | `NEXT_PUBLIC_SANDBOXES_ENABLED` |
Each feature is one server variable. Permission groups also turn on organizations, and organizations are always on when billing is enabled.

| Feature | Variable |
| --- | --- |
| Enterprise suite | `ENTERPRISE_ENABLED` |
| Organizations | `ORGANIZATIONS_ENABLED` |
| Permission groups | `ACCESS_CONTROL_ENABLED` |
| SAML and OIDC sign-in | `SSO_ENABLED` |
| Directory provisioning | `SCIM_ENABLED` |
| Audit logs | `AUDIT_LOGS_ENABLED` |
| Insights | `USAGE_MONITORING_ENABLED` |
| Custom blocks | `CUSTOM_BLOCKS_ENABLED` |
| Session policies — enabled by default | `SESSION_POLICIES_ENABLED` |
| Retention deletion | `DATA_RETENTION_ENABLED` |
| Data drains | `DATA_DRAINS_ENABLED` |
| Credential groups | `CREDENTIAL_GROUPS` |
| Workspace forks | `FORKING_ENABLED` |
| Sim Mailer inbox — enabled by default | `INBOX_ENABLED` |
| Sandboxes | `SANDBOXES_ENABLED` |

### Sandbox readiness

A Sandbox entitlement also requires a remote execution provider with credentials and an immutable Function base image. Until the server verifies readiness, the Function block offers no **Shell** language, and **Settings → Sandboxes** shows an upgrade notice instead of a sandbox list.

`NEXT_PUBLIC_SANDBOXES_ENABLED` exposes the Function block's **Sandbox** selector; it asserts readiness rather than checking it. Set it only after configuring the selected provider and Function base. `bunx sim-setup doctor` compares it with provider readiness.
The Function block's **Sandbox** selector appears once the server confirms both the entitlement and a ready provider. There is no browser variable to set.

JavaScript without `import`, `require`, a selected sandbox, or a sandbox file-path reference runs in local Node child workers in the app container when Sandbox flags are off. Python, Shell, JavaScript with external imports, and selected custom Sandboxes require the remote Function base and fail with a configuration error until it is ready. See [Sandboxes](/platform/self-hosting/sandboxes).

Expand All @@ -269,7 +268,7 @@ JavaScript without `import`, `require`, a selected sandbox, or a sandbox file-pa
| Symptom | Check |
| --- | --- |
| A settings section is missing | Check its server flag and restart the app after changing environment variables. These values load at boot; a rebuild is not needed. |
| The login page has no SSO option, or Function has no Sandbox selector | Set the matching `NEXT_PUBLIC_` flag. Run `bunx sim-setup doctor` to check twins and Sandbox readiness. |
| The login page has no SSO option, or Function has no Sandbox selector | Check `SSO_ENABLED` (or `ENTERPRISE_ENABLED`) and Sandbox readiness, then restart the app. Run `bunx sim-setup doctor` to check Sandbox readiness. |
| **Settings → Sandboxes** shows an upgrade notice | Check Sandbox entitlement, provider credentials, and the immutable Function base. |
| An enabled feature has no effect in a workspace | Confirm that the workspace belongs to an organization. Use the backfill or workspace move procedure if needed. |
| Retention deletes nothing | Check `DATA_RETENTION_ENABLED`, explicit windows, scheduler requests, and `CRON_SECRET`. |
Expand Down
7 changes: 2 additions & 5 deletions apps/docs/content/docs/platform/enterprise/sso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,22 +275,19 @@ Different domains can also use different providers, such as Okta for `eng.acme.c

## Self-hosted setup

For a deployment with billing disabled, enable SSO and its browser twin:
For a deployment with billing disabled, enable SSO:

```bash
SSO_ENABLED=true
NEXT_PUBLIC_SSO_ENABLED=true

# Organization membership on first SSO sign-in
ORGANIZATIONS_ENABLED=true
NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true

# Optional directory provisioning tab
SCIM_ENABLED=true
NEXT_PUBLIC_SCIM_ENABLED=true
```

The enterprise master pair also enables these features. See [Self-hosted enterprise](/platform/enterprise/self-hosted) for organization setup.
`ENTERPRISE_ENABLED=true` also enables these features. See [Self-hosted enterprise](/platform/enterprise/self-hosted) for organization setup.

`SSO_TRUSTED_PROVIDER_IDS` is an optional comma-separated list for non-SSO provider account linking. It does not authorize SSO linking; SSO trust comes from the provider's verified domain.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ Enable Insights through enterprise configuration or explicitly set:

```bash
USAGE_MONITORING_ENABLED=true
NEXT_PUBLIC_USAGE_MONITORING_ENABLED=true
```

Explicit values take precedence over the enterprise master configuration. Billing-enabled deployments retain the Enterprise gate. Organization owner/admin access is still required. See [self-hosted enterprise setup](/platform/enterprise/self-hosted).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ Enable SSO to expose **Domains** in the single sign-on settings:

```bash
SSO_ENABLED=true
NEXT_PUBLIC_SSO_ENABLED=true
```

You can instead enable the enterprise suite with both `ENTERPRISE_ENABLED=true` and `NEXT_PUBLIC_ENTERPRISE_ENABLED=true`. Set the browser twin too: the login page's SSO entry point reads it before a workspace loads. See [Self-hosted enterprise](/platform/enterprise/self-hosted).
You can instead enable the enterprise suite with `ENTERPRISE_ENABLED=true`. The login page's SSO entry point reads the server's setting, so there is no browser variable to set. See [Self-hosted enterprise](/platform/enterprise/self-hosted).

The older `/workspace/<workspaceId>/settings/domains` path still resolves to **Single sign-on → Domains**.

Expand Down
Loading
Loading