# Policies

> The team-wide policies owners and admins can set in Team Cloud, their defaults, and which are enforced by Subcloak's server and which by Cloak Proxy on each Mac.

Source: https://docs.subcloak.com/cloak-proxy/team/policies/

Added in Cloak Proxy 0.7.0.

{/* L9 draft. Sources: PLAN 7.14 (the table, word for word in substance), 9.2 (step-up), 9.5 page 6, 11; T15 (pte1). Re-check labels against L2/L6/L8. */}

Policies are team-wide settings that owners and admins choose. Each one says who enforces it: **Subcloak's server**, **Cloak Proxy on each Mac**, or both. Set them on the console's **Policies** page. Every Mac shows them read-only in **Settings › Team**, with the same **Enforced by** column.

## The policies

{/* PLAN 7.14 */}

| Policy | Values (default in bold) | Enforced by |
|---|---|---|
| Require review for protected sets (no bypass for anyone) | on / **off** | **Subcloak's server** (refuses access lists with bypass on) and **each Mac** (refuses them while the policy is on). The review itself is enforced by signatures; this policy only stops managers turning it off. See [Protected sets](https://docs.subcloak.com/cloak-proxy/team/protected-sets/) |
| Share links of team data | **allowed, redacted** / allowed with **Hide all body values** forced / blocked | **Each Mac**, in Cloak Proxy and `cloakctl`: Personal Cloud share links (the Share Link sheet, **Share File…**, an assistant's `create_share_link` and `cloakctl share`), **Publish to GitHub Gist…**, **Report Bug** to GitHub, Jira or Linear, live shares, and an assistant's `export_session` and `make_bug_report`. A team library session opened as traffic counts as team data, and so do the sessions and HARs Cloak Proxy saves from it: they carry the team's mark, so the policy applies when they're shared. A file edited outside Cloak Proxy can lose that mark, and other formats (CSV, Postman, OpenAPI) don't carry it. Known secrets in team data are always redacted. Share links are made through a person's [Personal Cloud](https://docs.subcloak.com/cloak-proxy/cloud/share-links/), and the server can't see what a link holds |
| Server-side features (monitors, hosted mocks) | **allowed** / blocked | **Subcloak's server** |
| Pair debugging | **allowed** / blocked | **Subcloak's server** (the relay refuses) |
| CI tokens | **allowed** / blocked | **Subcloak's server** |
| Capture into team sessions: allowed apps and hosts | **any** / a list | **Each Mac** (the library upload filter) |
| Library retention | **keep** / 30 / 90 / 365 days | **Subcloak's server** (deletes older library entries) |
| Require SSO | on / **off** | **Subcloak's server** (refuses email-code sign-in for the team's verified domains; the owner and billing managers can still sign in to the console with a passkey, or with an email code from **Team owner or billing manager? Email me a code instead**, and the owner and admins are told) |
| Devices per member | 1 to 5 (**5**) | **Subcloak's server** (refuses the join) |
| Invitations only to verified domains | on / **off** | **Subcloak's server** |
| Who can create spaces | **everyone** / admins | **Subcloak's server** |
| Vault: reveal and copy | **allowed** / blocked | **Each Mac** |
| Personal Cloud on team Macs | **allowed** / blocked | **Each Mac**: blocked stops Personal sync and new Personal share links (links made before can still be revoked in **Settings › Cloud**), plus the managed preference `CloudPersonalDisabled` for hard enforcement |

## What "enforced by each Mac" means

{/* PLAN 1 principle 3, 1.1 published weaknesses */}

A policy enforced by Cloak Proxy on each Mac works in the Cloak Proxy app and in `cloakctl`. A modified copy of the app could ignore it. It limits what Cloak Proxy's own tools do, including the ones it gives AI assistants, not what an assistant that can run commands on the Mac does with files it can already read. Where that matters, use your device management too: for example, the managed preference `CloudPersonalDisabled` turns off Personal Cloud on a Mac regardless of the app's settings. See [Deploy to a team](https://docs.subcloak.com/cloak-proxy/getting-started/deploy-to-a-team/).

Until a Mac has received your team's policies the first time, it applies the strictest setting of each policy it enforces: Personal Cloud stays off and team data can't be shared until they arrive. After that it keeps the last policies it verified, even when it can't reach Subcloak. If a Mac can still reach Subcloak but hasn't received newer policies for 7 days after the last ones were signed, it treats them as unverified and applies the strictest settings again, and **Settings › Team** says "Couldn't refresh your team's policies".

## How policies reach each Mac

{/* PLAN 7.14 bullets; T15 */}

Policies are stored on Subcloak's server and delivered to each Mac inside the team's signed entitlement, so a network attacker can't change them. Subcloak's server itself could. None of the policies changes who holds the team's keys: who can read a space is decided by the keys, not by policies.

## Changing a policy

{/* PLAN 7.14, 9.2 step-up */}

Changes save per row. Loosening a policy, and any change to **Library retention** (a shorter one deletes older entries at the next daily run), asks you to confirm with a passkey or a fresh email code, and every change is recorded in the [audit log](https://docs.subcloak.com/cloak-proxy/team/audit-log/) as `policy.changed`.

## Related

  - [Spaces, roles and permissions](https://docs.subcloak.com/cloak-proxy/team/spaces-and-roles/#who-enforces-what): Who enforces everything else.
  - [Single sign-on](https://docs.subcloak.com/cloak-proxy/team/sso/): Require SSO and verified domains.
  - [Deploy to a team](https://docs.subcloak.com/cloak-proxy/getting-started/deploy-to-a-team/): Managed preferences for hard enforcement.
