-
Notifications
You must be signed in to change notification settings - Fork 8.4k
sbx: document team-scoped governance policies #25251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dvdksn
merged 8 commits into
docker:main
from
dvdksn:worktree-sbx-team-scoped-governance
Jun 4, 2026
+133
−52
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3c6439c
sbx: document team-scoped governance policies
dvdksn d249426
sbx: add setup steps and team integration for org policies
dvdksn c7fa99d
sbx: drop bold from conceptual list labels per style guide
dvdksn 58737db
sbx: tone down projecting language in team policy docs
dvdksn 35a3208
sbx: align team/group-mapping framing with source docs
dvdksn 9e6b34f
sbx: consolidate policy evaluation into a single source of truth
dvdksn 5fa4f8f
sbx: fix Admin Console navigation for policy creation
dvdksn 77936b5
sbx: cover filesystem policies in the default-deny principle
dvdksn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,18 +11,17 @@ Docker sandbox governance is built around two resource types: **policies** and | |
| **rules**. | ||
|
|
||
| A **policy** is a named collection of rules that controls sandbox access. | ||
| Policies exist at different levels: | ||
| Policies exist at two levels: | ||
|
|
||
| - **Local**: configured per machine using the `sbx policy` CLI. Applies to | ||
| sandboxes on that machine only. | ||
| - **Organization**: configured in the Docker Admin Console or via the | ||
| [Governance API](/reference/api/ai-governance/). Applies uniformly across every sandbox in the | ||
| organization. | ||
| - **Team**: applies to sandboxes used by a specific team within an | ||
| organization. Coming soon. | ||
| [Governance API](/reference/api/ai-governance/). Applies to sandboxes across | ||
| the organization. An organization can have several policies, each applying | ||
| either org-wide or to specific teams. See [Policy scope](#policy-scope). | ||
|
|
||
| When multiple levels are active, organization policies take precedence over | ||
| local policies. See [Precedence](#precedence). | ||
| When organization governance is active, organization policies replace local | ||
| policies entirely. See [Precedence](#precedence). | ||
|
|
||
| A **rule** is the unit of access control within a policy. Each rule has: | ||
|
|
||
|
|
@@ -34,6 +33,24 @@ A **rule** is the unit of access control within a policy. Each rule has: | |
| Rules are grouped by domain: all rules in a policy must share the same domain, | ||
| either `network` or `filesystem`. | ||
|
|
||
| ## Policy scope | ||
|
|
||
| Each organization policy applies either across the whole organization or only | ||
| to specific teams: | ||
|
|
||
| - Org-wide: with no teams assigned, the policy applies to every member of the | ||
| organization. | ||
| - Team-scoped: with one or more teams assigned, the policy applies only to | ||
| members of those teams. | ||
|
|
||
| Teams are the same [teams](/manuals/admin/organization/manage/manage-a-team.md) | ||
| you manage for your organization; Docker matches a policy's teams against each | ||
| user's team membership. Because an organization can mix org-wide and team-scoped | ||
| policies, a single user is often subject to several at once. The policies that | ||
| apply to a given user are their _effective policies_: every org-wide policy, | ||
| plus every team-scoped policy for a team they belong to. See | ||
| [Rule evaluation](#rule-evaluation) for how a user's effective policies combine. | ||
|
|
||
| ## Rule syntax | ||
|
|
||
| ### Network rules | ||
|
|
@@ -43,12 +60,12 @@ hostnames, CIDR ranges, or ports. | |
|
|
||
| **Hostname patterns** | ||
|
|
||
| | Pattern | Example | Matches | | ||
| | ------- | ------- | ------- | | ||
| | Exact hostname | `example.com` | `example.com` only, not subdomains | | ||
| | Single-level wildcard | `*.example.com` | One subdomain level: `api.example.com` | | ||
| | Multi-level wildcard | `**.example.com` | Any depth: `api.example.com`, `v2.api.example.com` | | ||
| | Hostname with port | `example.com:443` | `example.com` on port 443 only | | ||
| | Pattern | Example | Matches | | ||
| | --------------------- | ----------------- | -------------------------------------------------- | | ||
| | Exact hostname | `example.com` | `example.com` only, not subdomains | | ||
| | Single-level wildcard | `*.example.com` | One subdomain level: `api.example.com` | | ||
| | Multi-level wildcard | `**.example.com` | Any depth: `api.example.com`, `v2.api.example.com` | | ||
| | Hostname with port | `example.com:443` | `example.com` on port 443 only | | ||
|
Comment on lines
-46
to
+68
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just formatting noise |
||
|
|
||
| `example.com` and `*.example.com` don't cover each other. Specify both if you | ||
| need to match the root domain and its subdomains. | ||
|
|
@@ -63,11 +80,11 @@ Both IPv4 and IPv6 notation are supported: `10.0.0.0/8`, `192.168.1.0/24`, | |
| Filesystem rules use the actions `read` and `write`. Resources are host paths | ||
| that sandboxes can mount as workspaces. | ||
|
|
||
| | Pattern | Example | Matches | | ||
| | ------- | ------- | ------- | | ||
| | Exact path | `/data` | `/data` only | | ||
| | Segment wildcard | `/data/*` | `/data/project`, one path segment only, not subdirectories | | ||
| | Recursive wildcard | `/data/**` | `/data/project`, `/data/project/src`, any depth | | ||
| | Pattern | Example | Matches | | ||
| | ------------------ | ---------- | ---------------------------------------------------------- | | ||
| | Exact path | `/data` | `/data` only | | ||
| | Segment wildcard | `/data/*` | `/data/project`, one path segment only, not subdirectories | | ||
| | Recursive wildcard | `/data/**` | `/data/project`, `/data/project/src`, any depth | | ||
|
Comment on lines
-66
to
+87
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just formatting noise |
||
|
|
||
| Use `**` when you intend to match a directory tree recursively. A single `*` | ||
| only matches within one path segment and won't cross directory boundaries. | ||
|
|
@@ -76,30 +93,35 @@ matches only direct children of `~`. | |
|
|
||
| ## Rule evaluation | ||
|
|
||
| All rules in a policy are evaluated against every request. The outcome follows | ||
| two principles: | ||
| When organization governance is active, the rules from all of a user's | ||
| [effective policies](#policy-scope) are combined and evaluated together against | ||
| each request, following two principles: | ||
|
|
||
| **Deny wins.** If any rule matches with `decision: deny`, the request is | ||
| denied regardless of any matching allow rules. | ||
| - Deny wins: if any rule matches with `decision: deny`, the request is denied, | ||
| regardless of any matching allow rules. | ||
| - Default deny: anything an allow rule doesn't match is blocked. Outbound | ||
| network traffic is blocked unless a network rule allows the destination, and a | ||
| host path can't be mounted unless a filesystem rule allows it. | ||
|
|
||
| **Default deny.** Outbound traffic is blocked unless an explicit allow rule | ||
| matches. | ||
| Because every effective policy feeds the same evaluation, allows are additive (a | ||
| request is allowed if any effective policy allows it) and denies are absolute (a | ||
| request is blocked if any effective policy denies it). A deny rule in an | ||
| org-wide policy therefore applies to everyone and can't be overridden by a | ||
| team-scoped policy, which makes org-wide deny rules useful as guardrails. | ||
|
|
||
| These principles apply within whichever policy is active. When organization | ||
| governance is active, only organization rules are evaluated; local rules have | ||
| no effect. | ||
| Local rules take no part in this evaluation; see [Precedence](#precedence). | ||
|
|
||
| ## Precedence | ||
|
|
||
| Local and organization policies don't combine. Which one applies depends on | ||
| whether your organization has governance enabled: | ||
|
|
||
| - **No organization governance**: local rules and any | ||
| - No organization governance: local rules and any | ||
| [kit-defined network rules](../customize/kits.md#control-network-access) | ||
| determine what sandboxes can access. | ||
| - **Organization governance active**: organization rules apply across all | ||
| developer machines, and local and kit-defined rules are not evaluated. They | ||
| still appear in `sbx policy ls`, but with an `inactive` status. | ||
| - Organization governance active: organization rules apply across all developer | ||
| machines, and local and kit-defined rules are not evaluated. They still appear | ||
| in `sbx policy ls`, but with an `inactive` status. | ||
|
|
||
| Within the active policy, deny rules beat allow rules regardless of specificity | ||
| or order. | ||
| When organization governance is active, a user's organization policies are | ||
| evaluated together, as described in [Rule evaluation](#rule-evaluation). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.