mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
ui(mcp): reframe network access as 'Internal network only' restriction
Replace scary 'Available on Public Internet' toggle with 'Internal network only' opt-in restriction. Toggle OFF (default) = all networks allowed. Toggle ON = restricted to internal network only. Auth is always required either way. - MCPPermissionManagement: new label/tooltip/description, invert display via getValueProps/getValueFromEvent so underlying available_on_public_internet value is unchanged - mcp_server_view: 'Public' → 'All networks', 'Internal' → 'Internal only' (orange) - mcp_server_columns: same badge updates
This commit is contained in:
parent
afe86bd6f6
commit
0ab1392735
3 changed files with 14 additions and 12 deletions
|
|
@ -90,17 +90,19 @@ const MCPPermissionManagement: React.FC<MCPPermissionManagementProps> = ({
|
|||
<div className="flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<span className="text-sm font-medium text-gray-700 flex items-center">
|
||||
Available on Public Internet
|
||||
<Tooltip title="When enabled, this MCP server is accessible from external/public IPs (e.g., ChatGPT). When disabled, only callers from internal/private networks can access it.">
|
||||
Internal network only
|
||||
<Tooltip title="When on, only requests from within your internal network are accepted. Turn off to allow external clients (other clusters, ChatGPT, etc). API key authentication is always required regardless of this setting.">
|
||||
<InfoCircleOutlined className="ml-2 text-blue-400 hover:text-blue-600 cursor-help" />
|
||||
</Tooltip>
|
||||
</span>
|
||||
<p className="text-sm text-gray-600 mt-1">Enable if this server should be reachable from the public internet.</p>
|
||||
<p className="text-sm text-gray-600 mt-1">Turn on to restrict access to callers within your internal network only.</p>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="available_on_public_internet"
|
||||
valuePropName="checked"
|
||||
initialValue={mcpServer?.available_on_public_internet ?? true}
|
||||
getValueProps={(value) => ({ checked: !value })}
|
||||
getValueFromEvent={(checked: boolean) => !checked}
|
||||
initialValue={true}
|
||||
className="mb-0"
|
||||
>
|
||||
<Switch />
|
||||
|
|
|
|||
|
|
@ -157,9 +157,9 @@ export const mcpServerColumns = (
|
|||
cell: ({ row }) => {
|
||||
const isPublic = row.original.available_on_public_internet;
|
||||
return isPublic ? (
|
||||
<span className="px-2 py-0.5 bg-green-50 text-green-700 rounded text-xs font-medium">Public</span>
|
||||
<span className="px-2 py-0.5 bg-green-50 text-green-700 rounded text-xs font-medium">All networks</span>
|
||||
) : (
|
||||
<span className="px-2 py-0.5 bg-gray-100 text-gray-600 rounded text-xs font-medium">Internal</span>
|
||||
<span className="px-2 py-0.5 bg-orange-50 text-orange-700 rounded text-xs font-medium">Internal only</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -251,20 +251,20 @@ export const MCPServerView: React.FC<MCPServerViewProps> = ({
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<Text className="font-medium">Available on Public Internet</Text>
|
||||
<Text className="font-medium">Network Access</Text>
|
||||
<div className="flex items-center gap-2">
|
||||
{mcpServer.available_on_public_internet ? (
|
||||
<span className="px-2 py-1 bg-green-50 text-green-700 rounded-md text-sm">
|
||||
Public
|
||||
All networks
|
||||
</span>
|
||||
) : (
|
||||
<span className="px-2 py-1 bg-gray-100 text-gray-600 rounded-md text-sm">
|
||||
Internal
|
||||
<span className="px-2 py-1 bg-orange-50 text-orange-700 rounded-md text-sm">
|
||||
Internal only
|
||||
</span>
|
||||
)}
|
||||
{mcpServer.available_on_public_internet && (
|
||||
{!mcpServer.available_on_public_internet && (
|
||||
<Text className="text-xs text-gray-500">
|
||||
Accessible from external/public IPs
|
||||
Restricted to internal network
|
||||
</Text>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue