Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/auth/scopes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const ALL_SCOPES = {
'workers_kv:write': 'Create and modify KV namespaces and data',
'workers_routes:write': 'Configure Worker routes',
'workers_tail:read': 'View Worker logs via tail',
'workers_deployments:read': 'View Worker deployment history and status',
'workers_builds:read': 'View Worker builds',
'workers_builds:write': 'Trigger Worker builds',
'workers_observability:read': 'View Worker metrics and traces',
Expand Down Expand Up @@ -115,6 +116,10 @@ export const ALL_SCOPES = {
// Notebooks
'notebook-examples:read': 'View notebook examples',

// MCP Portals
'mcp_portals:read': 'View MCP Portal configurations',
'mcp_portals:write': 'Create and modify MCP Portals',

// Other
'firstpartytags:write': 'Configure first-party tags'
} as const
Expand All @@ -139,6 +144,7 @@ export const SCOPE_TEMPLATES = {
scopes: [
...REQUIRED_SCOPES,
'workers:read',
'workers_deployments:read',
'workers_builds:read',
'workers_observability:read',
'pages:read',
Expand Down
5 changes: 4 additions & 1 deletion src/auth/workers-oauth-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,17 @@ export function renderApprovalDialog(request: Request, options: ApprovalDialogOp
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
font-size: 0.75rem;
color: var(--cf-text);
min-width: 140px;
white-space: nowrap;
flex-shrink: 0;
margin-right: 0.5rem;
}
.scope-desc {
color: var(--cf-text-light);
font-size: 0.75rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}

/* Info Text */
Expand Down
3 changes: 3 additions & 0 deletions src/tests/auth/scopes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const REGISTERED_SCOPES = [
'workers_kv:write',
'workers_routes:write',
'workers_tail:read',
'workers_deployments:read',
'workers_builds:read',
'workers_builds:write',
'workers_observability:read',
Expand Down Expand Up @@ -89,6 +90,8 @@ const REGISTERED_SCOPES = [
'url_scanner:write',
'radar:read',
'notebook-examples:read',
'mcp_portals:read',
'mcp_portals:write',
'firstpartytags:write'
] as const

Expand Down
Loading