-
Notifications
You must be signed in to change notification settings - Fork 11.7k
feat(admin): Add admin controls documentation #18644
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
+119
−0
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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
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 |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # Enterprise Admin Controls | ||
|
|
||
| Gemini CLI empowers enterprise administrators to manage and enforce security | ||
| policies and configuration settings across their entire organization. Secure | ||
| defaults are enabled automatically for all enterprise users, but can be | ||
| customized via the [Management Console](https://goo.gle/manage-gemini-cli). | ||
|
|
||
| **Enterprise Admin Controls are enforced globally and cannot be overridden by | ||
| users locally**, ensuring a consistent security posture. | ||
|
|
||
| ## Admin Controls vs. System Settings | ||
|
|
||
| While [System-wide settings](../cli/settings.md) act as convenient configuration | ||
| overrides, they can still be modified by users with sufficient privileges. In | ||
| contrast, admin controls are immutable at the local level, making them the | ||
| preferred method for enforcing policy. | ||
|
|
||
| ## Available Controls | ||
|
|
||
| ### Strict Mode | ||
|
|
||
| **Enabled/Disabled** | Default: enabled | ||
|
|
||
| If enabled, users will not be able to enter yolo mode. | ||
|
|
||
| ### Extensions | ||
|
|
||
| **Enabled/Disabled** | Default: disabled | ||
|
|
||
| If disabled, users will not be able to use or install extensions. See | ||
| [Extensions](../extensions/index.md) for more details. | ||
|
|
||
| ### MCP | ||
|
|
||
| #### Enabled/Disabled | ||
|
|
||
| **Enabled/Disabled** | Default: disabled | ||
|
|
||
| If disabled, users will not be able to use MCP servers. See | ||
| [MCP Server Integration](../tools/mcp-server.md) for more details. | ||
|
|
||
| #### MCP Servers (preview) | ||
|
|
||
| **Default**: empty | ||
|
|
||
| Allows administrators to define an explicit allowlist of MCP servers. This | ||
| guarantees that users can only connect to trusted MCP servers defined by the | ||
| organization. | ||
|
|
||
| **Allowlist Format:** | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "external-provider": { | ||
| "url": "https://api.mcp-provider.com", | ||
| "type": "sse", | ||
| "trust": true, | ||
| "includeTools": ["toolA", "toolB"], | ||
| "excludeTools": [] | ||
| }, | ||
| "internal-corp-tool": { | ||
| "url": "https://mcp.internal-tool.corp", | ||
| "type": "http", | ||
| "includeTools": [], | ||
| "excludeTools": ["adminTool"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| **Supported Fields:** | ||
|
|
||
| - `url`: (Required) The full URL of the MCP server endpoint. | ||
| - `type`: (Required) The connection type (e.g., `sse` or `http`). | ||
| - `trust`: (Optional) If set to `true`, the server is trusted and tool execution | ||
| will not require user approval. | ||
| - `includeTools`: (Optional) An explicit list of tool names to allow. If | ||
| specified, only these tools will be available. | ||
| - `excludeTools`: (Optional) A list of tool names to hide. These tools will be | ||
| blocked. | ||
|
|
||
| **Client Enforcement Logic:** | ||
|
|
||
| - **Empty Allowlist**: If the admin allowlist is empty, the client uses the | ||
| user’s local configuration as is (unless the MCP toggle above is disabled). | ||
| - **Active Allowlist**: If the allowlist contains one or more servers, **all | ||
| locally configured servers not present in the allowlist are ignored**. | ||
| - **Configuration Merging**: For a server to be active, it must exist in | ||
| **both** the admin allowlist and the user’s local configuration (matched by | ||
| name). The client merges these definitions as follows: | ||
| - **Override Fields**: The `url`, `type`, & `trust` are always taken from the | ||
| admin allowlist, overriding any local values. | ||
| - **Tools Filtering**: If `includeTools` or `excludeTools` are defined in the | ||
| allowlist, the admin’s rules are used exclusively. If both are undefined in | ||
| the admin allowlist, the client falls back to the user’s local tool | ||
| settings. | ||
| - **Cleared Fields**: To ensure security and consistency, the client | ||
| automatically clears local execution fields (`command`, `args`, `env`, | ||
| `cwd`, `httpUrl`, `tcp`). This prevents users from overriding the connection | ||
| method. | ||
| - **Other Fields**: All other MCP fields are pulled from the user’s local | ||
| configuration. | ||
| - **Missing Allowlisted Servers**: If a server appears in the admin allowlist | ||
| but is missing from the local configuration, it will not be initialized. This | ||
| ensures users maintain final control over which permitted servers are actually | ||
| active in their environment. | ||
|
|
||
| ### Unmanaged Capabilities | ||
|
|
||
| **Enabled/Disabled** | Default: disabled | ||
|
|
||
| If disabled, users will not be able to use certain features. Currently, this | ||
| control disables Agent Skills. See [Agent Skills](../cli/skills.md) for more | ||
| details. | ||
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
Oops, something went wrong.
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.