Skip to content

Commit 959fc6a

Browse files
authored
Merge pull request #24596 from dvdksn/sbx-policy-org-vs-userdefined
sbx: clarify org/local policy and user defined setting
2 parents e8fd109 + 9040445 commit 959fc6a

File tree

1 file changed

+43
-23
lines changed
  • content/manuals/ai/sandboxes/security

1 file changed

+43
-23
lines changed

content/manuals/ai/sandboxes/security/policy.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ Policies can be set at two levels:
1919
- **Local policies** — configured by individual users with the `sbx policy`
2020
command. These apply to all sandboxes on the local machine.
2121

22-
If your organization has enabled governance, organization policies take
23-
precedence over local rules and can't be overridden locally. See
24-
[Precedence](#precedence) for the full evaluation model.
22+
If your organization has enabled governance, organization policies replace
23+
local rules — local `sbx policy` rules are not evaluated unless an admin
24+
also turns on the **User defined** setting. See [Precedence](#precedence)
25+
for details.
2526

2627
## Organization policies {tier="Limited Access"}
2728

@@ -34,18 +35,30 @@ Organization admins can centrally manage policies through the
3435
organization settings and enable **Manage AI governance**.
3536

3637
Once enabled, the policies defined in the Admin Console apply to all
37-
sandboxes across the organization, regardless of any local policies
38-
configured with `sbx policy`.
38+
sandboxes across the organization.
3939

4040
### Local extensions to organization policy
4141

42-
Organization policy is the baseline for all sandboxes in your organization.
43-
Admins can optionally permit users to extend it locally by enabling the
44-
**User defined** setting in AI governance settings. When enabled, users can
45-
add hosts to the allowlist from their own machine using `sbx policy allow network`.
42+
When organization governance is active, local rules are ignored by default.
43+
Admins can optionally let users extend the organization policy by turning on
44+
the **User defined** setting in AI governance settings. When turned on,
45+
local `sbx policy` rules are evaluated alongside organization rules, letting
46+
users add hosts to the allowlist from their own machine using
47+
`sbx policy allow network`.
4648

47-
Local extensions can only expand access within what the organization permits.
48-
They can't override organization-level deny rules.
49+
Local extensions can expand access for domains the organization hasn't
50+
explicitly denied, but can't override organization-level deny rules. This
51+
applies to exact matches and wildcard matches alike — if the organization
52+
denies `*.example.com`, a local allow for `api.example.com` has no effect
53+
because the org-level wildcard deny covers it.
54+
55+
For example, given an organization policy that allows `api.anthropic.com`
56+
and denies `*.corp.internal`:
57+
58+
- `sbx policy allow network api.example.com` — works, because the
59+
organization hasn't denied `api.example.com`
60+
- `sbx policy allow network build.corp.internal` — no effect, because the
61+
organization denies `*.corp.internal`
4962

5063
## Network policies
5164

@@ -76,6 +89,11 @@ Choose a default network policy:
7689
You can change your effective policy at any time using `sbx policy allow` and
7790
`sbx policy deny`, or start over by running `sbx policy reset`.
7891

92+
> [!NOTE]
93+
> If your organization manages AI governance policies, organization rules
94+
> take precedence over the policy you select here. See
95+
> [Organization policies](#organization-policies).
96+
7997
### Non-interactive environments
8098

8199
In non-interactive environments such as CI pipelines or headless servers, the
@@ -257,18 +275,20 @@ Each rule takes a path pattern and an action (allow or deny).
257275
Within any layer, deny rules beat allow rules — if a domain matches both,
258276
it's blocked regardless of specificity.
259277

260-
Docker Sandboxes ships with a baseline allowlist (the default policies). Local
261-
`sbx policy` rules add to this baseline. The full evaluation order when
262-
organization policies are enabled:
263-
264-
1. **Organization policies** (Docker Admin Console) — highest precedence.
265-
Organization admins can modify or replace the default allowlist and define
266-
their own rules. Organization-level denials can't be overridden locally.
267-
2. **Local extensions** — if the admin has enabled the **User defined**
268-
setting, users can add allow rules with `sbx policy allow network`. These
269-
can only expand access within what the organization permits.
270-
3. **Local rules** (`sbx policy`) — lowest precedence. Can't override
271-
organization-level denials.
278+
All outbound traffic is blocked by default unless an explicit rule allows it.
279+
How rules are evaluated depends on whether organization governance is active.
280+
281+
Without organization governance, local rules (`sbx policy`) are the only
282+
rules evaluated against this default-deny baseline.
283+
284+
With organization governance, local rules are not evaluated. Only
285+
organization rules (Docker Admin Console) determine what is allowed or
286+
denied. Organization-level denials can't be overridden locally.
287+
288+
If the admin turns on the **User defined** setting, local rules are also
289+
evaluated alongside organization rules. Local rules can expand access for
290+
domains the organization hasn't explicitly denied, but can't override
291+
organization-level denials.
272292

273293
The same model applies to filesystem policies: organization-level rules take
274294
precedence over local behavior.

0 commit comments

Comments
 (0)