zuplo 7.6.9 → 7.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ai-gateway/integrations/claude-code.mdx +34 -33
- package/docs/ai-gateway/integrations/claude-desktop.mdx +157 -0
- package/docs/mcp-gateway/connect-clients/claude-desktop.mdx +2 -0
- package/docs/policies/auth0-jwt-auth-inbound/doc.md +5 -0
- package/docs/policies/auth0-jwt-auth-inbound/schema.json +1 -1
- package/docs/policies/clerk-jwt-auth-inbound/doc.md +5 -0
- package/docs/policies/clerk-jwt-auth-inbound/schema.json +1 -1
- package/docs/policies/cognito-jwt-auth-inbound/doc.md +17 -0
- package/docs/policies/cognito-jwt-auth-inbound/schema.json +1 -1
- package/docs/policies/firebase-jwt-inbound/doc.md +17 -0
- package/docs/policies/firebase-jwt-inbound/schema.json +1 -1
- package/docs/policies/okta-jwt-auth-inbound/doc.md +23 -0
- package/docs/policies/okta-jwt-auth-inbound/schema.json +1 -1
- package/docs/policies/open-id-jwt-auth-inbound/doc.md +18 -0
- package/docs/policies/open-id-jwt-auth-inbound/schema.json +1 -1
- package/docs/policies/propel-auth-jwt-inbound/doc.md +5 -0
- package/docs/policies/propel-auth-jwt-inbound/schema.json +1 -1
- package/docs/policies/supabase-jwt-auth-inbound/doc.md +5 -0
- package/docs/policies/supabase-jwt-auth-inbound/schema.json +1 -1
- package/package.json +5 -5
|
@@ -6,10 +6,9 @@ description:
|
|
|
6
6
|
authenticated, metered, and routed by the gateway.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
the AI Gateway.
|
|
9
|
+
You can configure [Claude Code](https://www.claude.com/product/claude-code) to
|
|
10
|
+
send its model requests through the Zuplo AI Gateway, so the gateway
|
|
11
|
+
authenticates, meters, and routes every Claude Code session.
|
|
13
12
|
|
|
14
13
|
## Claude Code Setup
|
|
15
14
|
|
|
@@ -25,25 +24,37 @@ the AI Gateway.
|
|
|
25
24
|
|
|
26
25
|
4. Copy the **API URL** and **API Key** shown at the top of the app page
|
|
27
26
|
|
|
28
|
-
5. Add the API key
|
|
29
|
-
using either approach below
|
|
27
|
+
5. Add the API key, gateway URL, and model mappings to `.claude/settings.json`
|
|
30
28
|
|
|
31
29
|
</Stepper>
|
|
32
30
|
|
|
33
|
-
###
|
|
31
|
+
### Before copying: replace the provider name
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
:::warning
|
|
34
|
+
|
|
35
|
+
The examples below assume your provider is named `anthropic`. Replace that
|
|
36
|
+
prefix with the name of **your** provider before copying the configuration. For
|
|
37
|
+
example, a provider named `my-anthropic` routes `my-anthropic/claude-sonnet-5`,
|
|
38
|
+
while a Bedrock provider named `bedrock` routes
|
|
39
|
+
`bedrock/anthropic.claude-sonnet-5`. The model part must be an id that provider
|
|
40
|
+
understands.
|
|
41
|
+
|
|
42
|
+
:::
|
|
43
|
+
|
|
44
|
+
The gateway routes every request using `providerName/model`. The provider prefix
|
|
45
|
+
picks which of your providers handles the request — a gateway can contain
|
|
46
|
+
several providers that serve Anthropic models.
|
|
44
47
|
|
|
45
48
|
### Using settings.json
|
|
46
49
|
|
|
50
|
+
You can configure Claude Code either globally or per project by editing the
|
|
51
|
+
settings file:
|
|
52
|
+
|
|
53
|
+
- **Global:** `~/.claude/settings.json`
|
|
54
|
+
- **Project-specific:** `.claude/settings.json` in your project directory
|
|
55
|
+
|
|
56
|
+
Add the following environment configuration to the settings file:
|
|
57
|
+
|
|
47
58
|
```json
|
|
48
59
|
{
|
|
49
60
|
"env": {
|
|
@@ -53,7 +64,8 @@ ANTHROPIC_DEFAULT_HAIKU_MODEL=anthropic/claude-haiku-4-5
|
|
|
53
64
|
"ANTHROPIC_SMALL_FAST_MODEL": "anthropic/claude-haiku-4-5",
|
|
54
65
|
"ANTHROPIC_DEFAULT_OPUS_MODEL": "anthropic/claude-opus-5",
|
|
55
66
|
"ANTHROPIC_DEFAULT_SONNET_MODEL": "anthropic/claude-sonnet-5",
|
|
56
|
-
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-haiku-4-5"
|
|
67
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-haiku-4-5",
|
|
68
|
+
"ANTHROPIC_DEFAULT_FABLE_MODEL": "anthropic/claude-fable-5"
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
```
|
|
@@ -68,20 +80,7 @@ Claude Code appends `/v1/messages` to the base URL itself, so
|
|
|
68
80
|
Restart Claude and it will switch to using your new AI Gateway configuration and
|
|
69
81
|
all your Claude Code LLM requests will route through the AI Gateway.
|
|
70
82
|
|
|
71
|
-
###
|
|
72
|
-
|
|
73
|
-
The gateway routes every request by a model reference of the form
|
|
74
|
-
`providerName/model`, where `providerName` is the name of the provider **you
|
|
75
|
-
configured** in your gateway — not a fixed vendor id. A single gateway can
|
|
76
|
-
contain several providers that serve Anthropic models — Anthropic itself, Google
|
|
77
|
-
Vertex AI, AWS Bedrock, or multiple keyed instances of the same vendor — so the
|
|
78
|
-
gateway never guesses a provider for a bare model name like `claude-sonnet-5`.
|
|
79
|
-
|
|
80
|
-
The examples on this page assume the provider is named `anthropic`. Use the name
|
|
81
|
-
of your own provider: a provider named `my-anthropic` routes
|
|
82
|
-
`my-anthropic/claude-sonnet-5`, and a Bedrock provider named `bedrock` routes
|
|
83
|
-
`bedrock/anthropic.claude-sonnet-5` (the model part is always the id the
|
|
84
|
-
provider itself understands).
|
|
83
|
+
### Configure every Claude Code model variable
|
|
85
84
|
|
|
86
85
|
The model ids in these examples reflect what was current when this page was
|
|
87
86
|
written, and ids differ across providers — a Bedrock provider serves different
|
|
@@ -96,8 +95,10 @@ the model variables above must be set to a prefixed reference:
|
|
|
96
95
|
built-in default model unprefixed and the first request fails.
|
|
97
96
|
- `ANTHROPIC_SMALL_FAST_MODEL` — the model for background tasks.
|
|
98
97
|
- `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`,
|
|
99
|
-
`ANTHROPIC_DEFAULT_HAIKU_MODEL` — what the
|
|
100
|
-
resolve to, so `claude --model opus`
|
|
98
|
+
`ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_FABLE_MODEL` — what the
|
|
99
|
+
`opus`/`sonnet`/`haiku`/`fable` aliases resolve to, so `claude --model opus`
|
|
100
|
+
and `/model sonnet` keep working. In these examples,
|
|
101
|
+
`ANTHROPIC_DEFAULT_FABLE_MODEL` maps `fable` to `anthropic/claude-fable-5`.
|
|
101
102
|
|
|
102
103
|
:::caution{title='HTTP 400: model must use "providerName/model"'}
|
|
103
104
|
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Claude Desktop
|
|
3
|
+
sidebar_label: Claude Desktop
|
|
4
|
+
description:
|
|
5
|
+
Point Claude Desktop at an AI Gateway app so every Chat, Cowork, and Code
|
|
6
|
+
session is authenticated, metered, and routed by the gateway.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
[Claude Desktop](https://claude.com/download) can use the Zuplo AI Gateway as
|
|
10
|
+
its inference provider, so the gateway authenticates, meters, and routes every
|
|
11
|
+
Chat, Cowork, and Code session started from the desktop app.
|
|
12
|
+
|
|
13
|
+
This page covers routing Claude Desktop's model requests through the AI Gateway.
|
|
14
|
+
To give Claude Desktop tools from a Zuplo MCP route instead, see
|
|
15
|
+
[Connect Claude Desktop and Claude.ai](../../mcp-gateway/connect-clients/claude-desktop.mdx).
|
|
16
|
+
|
|
17
|
+
## Claude Desktop Setup
|
|
18
|
+
|
|
19
|
+
<Stepper>
|
|
20
|
+
|
|
21
|
+
1. Create a [new provider](../managing-providers.mdx) in the AI Gateway for
|
|
22
|
+
Anthropic
|
|
23
|
+
|
|
24
|
+
2. [Set up a new team](../managing-teams.mdx)
|
|
25
|
+
|
|
26
|
+
3. Create a [new app](../managing-apps.mdx) to use with Claude Desktop and
|
|
27
|
+
assign it to the team you created
|
|
28
|
+
|
|
29
|
+
4. Copy the **API URL** and **API Key** shown at the top of the app page
|
|
30
|
+
|
|
31
|
+
5. Enter the API URL, API key, and model list in Claude Desktop's third-party
|
|
32
|
+
inference settings
|
|
33
|
+
|
|
34
|
+
</Stepper>
|
|
35
|
+
|
|
36
|
+
### Before copying: replace the provider name
|
|
37
|
+
|
|
38
|
+
:::warning
|
|
39
|
+
|
|
40
|
+
The examples below assume your provider is named `anthropic`. Replace that
|
|
41
|
+
prefix with the name of **your** provider before copying the configuration. For
|
|
42
|
+
example, a provider named `my-anthropic` routes `my-anthropic/claude-sonnet-5`,
|
|
43
|
+
while a Bedrock provider named `bedrock` routes
|
|
44
|
+
`bedrock/anthropic.claude-sonnet-5`. The model part must be an id that provider
|
|
45
|
+
understands.
|
|
46
|
+
|
|
47
|
+
:::
|
|
48
|
+
|
|
49
|
+
The gateway routes every request using `providerName/model`. The provider prefix
|
|
50
|
+
picks which of your providers handles the request — a gateway can contain
|
|
51
|
+
several providers that serve Anthropic models.
|
|
52
|
+
|
|
53
|
+
### Configure third-party inference
|
|
54
|
+
|
|
55
|
+
Configure Claude Desktop's inference provider in its in-app configuration
|
|
56
|
+
window, available on macOS and Windows:
|
|
57
|
+
|
|
58
|
+
<Stepper>
|
|
59
|
+
|
|
60
|
+
1. From the menu bar (macOS) or the application menu (Windows), select **Help →
|
|
61
|
+
Troubleshooting → Enable Developer Mode**.
|
|
62
|
+
|
|
63
|
+
2. Open **Developer → Configure Third-Party Inference**.
|
|
64
|
+
|
|
65
|
+
3. In the **Connection** section, set **Inference provider** to **Gateway**.
|
|
66
|
+
|
|
67
|
+
4. In the **Gateway credentials** card, set **Gateway base URL** to the app's
|
|
68
|
+
API URL, for example
|
|
69
|
+
`https://my-gateway-main-2e18f50.zuplo.app/config_fe0a04972d2848e0a94ae4b8bcd1497e`,
|
|
70
|
+
and **Gateway API key** to the app's API key.
|
|
71
|
+
|
|
72
|
+
5. Leave **Credential kind** set to **Static API key** and **Gateway auth
|
|
73
|
+
scheme** set to **Bearer**.
|
|
74
|
+
|
|
75
|
+
6. In the **Models** section, add the models the app may use to the **Model
|
|
76
|
+
list**. See [Add models to the Model list](#add-models-to-the-model-list).
|
|
77
|
+
|
|
78
|
+
7. Click **Apply locally**. Claude Desktop writes the configuration and
|
|
79
|
+
relaunches into it.
|
|
80
|
+
|
|
81
|
+
</Stepper>
|
|
82
|
+
|
|
83
|
+
:::note
|
|
84
|
+
|
|
85
|
+
Claude Desktop appends `/v1/messages` to the base URL itself, so **Gateway base
|
|
86
|
+
URL** is the app's URL _without_ the `/v1` suffix.
|
|
87
|
+
|
|
88
|
+
:::
|
|
89
|
+
|
|
90
|
+
:::caution{title="Keep the auth scheme set to Bearer"}
|
|
91
|
+
|
|
92
|
+
The gateway reads the API key from the `Authorization: Bearer` header, so keep
|
|
93
|
+
**Gateway auth scheme** set to **Bearer**. Likewise, keep **Credential kind**
|
|
94
|
+
set to **Static API key** — AI Gateway apps authenticate with their own API
|
|
95
|
+
keys, not identity-provider tokens.
|
|
96
|
+
|
|
97
|
+
:::
|
|
98
|
+
|
|
99
|
+
### Add models to the Model list
|
|
100
|
+
|
|
101
|
+
The **Model list** in the **Models** section overrides the model list Claude
|
|
102
|
+
Desktop discovers on its own. Click **Add** once per model the app may use, and
|
|
103
|
+
fill in each entry:
|
|
104
|
+
|
|
105
|
+
- **Model ID** — the full `providerName/model` reference, for example
|
|
106
|
+
`anthropic/claude-sonnet-5`. A bare id such as `claude-sonnet-5` fails to
|
|
107
|
+
route through the gateway.
|
|
108
|
+
- **Display name** — the name shown in the model picker, for example
|
|
109
|
+
`Claude Sonnet 5`. Leave it blank and Claude Desktop formats a name from the
|
|
110
|
+
id.
|
|
111
|
+
- **Offer 1M-context variant** — leave this off unless your provider's
|
|
112
|
+
deployment accepts 1M-token context for the model.
|
|
113
|
+
- **Tier alias** — the Claude tier (Opus, Sonnet, Haiku, or Fable) this model
|
|
114
|
+
stands in for. Setting it pins what the bare alias (for example `opus`)
|
|
115
|
+
resolves to, so tier names route to your prefixed model reference.
|
|
116
|
+
|
|
117
|
+
The first entry is the default selection in the model picker. Include a
|
|
118
|
+
Haiku-tier model — Claude Desktop runs background and sub-agent tasks on a
|
|
119
|
+
small, fast model.
|
|
120
|
+
|
|
121
|
+
The model ids in these examples reflect what was current when this page was
|
|
122
|
+
written, and ids differ across providers — a Bedrock provider serves different
|
|
123
|
+
ids than Anthropic directly, and availability can vary by region. Check
|
|
124
|
+
[your provider's page](../managing-providers.mdx) in the portal for the models
|
|
125
|
+
it currently serves, and use those ids.
|
|
126
|
+
|
|
127
|
+
The app's
|
|
128
|
+
[Model Filtering](../../policies/ai-gateway-model-filtering-v2-inbound.mdx)
|
|
129
|
+
policy controls which models the app may use.
|
|
130
|
+
|
|
131
|
+
### Verify the configuration
|
|
132
|
+
|
|
133
|
+
After Claude Desktop relaunches, send a message in a Chat conversation and start
|
|
134
|
+
a Cowork session. Both requests route through the gateway and count against the
|
|
135
|
+
[app](../managing-apps.mdx) in the Zuplo Portal, as do Code sessions started
|
|
136
|
+
from the desktop app. Terminal Claude Code sessions outside the desktop app use
|
|
137
|
+
a separate configuration — see [Claude Code](./claude-code.mdx).
|
|
138
|
+
|
|
139
|
+
:::caution{title='HTTP 400: model must use "providerName/model"'}
|
|
140
|
+
|
|
141
|
+
If a request fails with `The request body model must use "providerName/model"`,
|
|
142
|
+
the selected model reference is missing its provider prefix. Give every entry in
|
|
143
|
+
the model list a full `providerName/model` reference.
|
|
144
|
+
|
|
145
|
+
:::
|
|
146
|
+
|
|
147
|
+
### Deploy to a fleet
|
|
148
|
+
|
|
149
|
+
To roll the configuration out to many devices, use the configuration window's
|
|
150
|
+
**Export** menu instead of **Apply locally**. It generates a `.mobileconfig`
|
|
151
|
+
profile for macOS MDM tools such as Jamf, a `.reg` policy file for Intune or
|
|
152
|
+
Group Policy, and related deployment artifacts. Managed configuration takes
|
|
153
|
+
precedence over local settings, so users can't point the app at a different
|
|
154
|
+
endpoint. For the deployment workflow and the full configuration key reference,
|
|
155
|
+
see Anthropic's
|
|
156
|
+
[Deploy Claude Desktop with an LLM gateway](https://claude.com/docs/third-party/claude-desktop/gateway)
|
|
157
|
+
and [Deploy with MDM](https://claude.com/docs/third-party/claude-desktop/mdm).
|
|
@@ -153,6 +153,8 @@ file-based configuration.
|
|
|
153
153
|
## Related
|
|
154
154
|
|
|
155
155
|
- [Connect MCP clients overview](./overview.mdx)
|
|
156
|
+
- To route Claude Desktop's model requests through Zuplo instead, see the
|
|
157
|
+
[Claude Desktop AI Gateway integration](../../ai-gateway/integrations/claude-desktop.mdx)
|
|
156
158
|
- Anthropic's official guide:
|
|
157
159
|
[Connect to remote MCP servers](https://modelcontextprotocol.io/docs/develop/connect-remote-servers)
|
|
158
160
|
- Anthropic's setup article:
|
|
@@ -121,5 +121,10 @@ When configured, this enables OAuth clients to find metadata information about
|
|
|
121
121
|
how to interact with your OAuth 2.0 protected resources according to
|
|
122
122
|
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
123
123
|
|
|
124
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
125
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
126
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
127
|
+
scope the authorization server advertises.
|
|
128
|
+
|
|
124
129
|
See [this document](/docs/articles/oauth-authentication) for more information
|
|
125
130
|
about OAuth authorization in Zuplo.
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"type": "boolean",
|
|
57
57
|
"default": false,
|
|
58
58
|
"x-advanced": true,
|
|
59
|
-
"description": "
|
|
59
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -81,5 +81,10 @@ When configured, this enables OAuth clients to find metadata information about
|
|
|
81
81
|
how to interact with your OAuth 2.0 protected resources according to
|
|
82
82
|
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
83
83
|
|
|
84
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
85
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
86
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
87
|
+
scope the authorization server advertises.
|
|
88
|
+
|
|
84
89
|
See [this document](/docs/articles/oauth-authentication) for more information
|
|
85
90
|
about OAuth authorization in Zuplo.
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"type": "boolean",
|
|
52
52
|
"default": false,
|
|
53
53
|
"x-advanced": true,
|
|
54
|
-
"description": "
|
|
54
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## OAuth 2.0 Protected Resource Metadata
|
|
2
|
+
|
|
3
|
+
The Cognito JWT Auth policy supports OAuth protected resource metadata
|
|
4
|
+
discovery. To enable this feature, set the `oAuthResourceMetadataEnabled` option
|
|
5
|
+
to `true` and add the
|
|
6
|
+
[`OAuthProtectedResourcePlugin` to `modules/zuplo.runtime.ts`](/docs/programmable-api/oauth-protected-resource-plugin).
|
|
7
|
+
When configured, this enables OAuth clients to find metadata information about
|
|
8
|
+
how to interact with your OAuth 2.0 protected resources according to
|
|
9
|
+
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
10
|
+
|
|
11
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
12
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
13
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
14
|
+
scope the authorization server advertises.
|
|
15
|
+
|
|
16
|
+
See [this document](/docs/articles/oauth-authentication) for more information
|
|
17
|
+
about OAuth authorization in Zuplo.
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"type": "boolean",
|
|
57
57
|
"default": false,
|
|
58
58
|
"x-advanced": true,
|
|
59
|
-
"description": "
|
|
59
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## OAuth 2.0 Protected Resource Metadata
|
|
2
|
+
|
|
3
|
+
The Firebase JWT Auth policy supports OAuth protected resource metadata
|
|
4
|
+
discovery. To enable this feature, set the `oAuthResourceMetadataEnabled` option
|
|
5
|
+
to `true` and add the
|
|
6
|
+
[`OAuthProtectedResourcePlugin` to `modules/zuplo.runtime.ts`](/docs/programmable-api/oauth-protected-resource-plugin).
|
|
7
|
+
When configured, this enables OAuth clients to find metadata information about
|
|
8
|
+
how to interact with your OAuth 2.0 protected resources according to
|
|
9
|
+
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
10
|
+
|
|
11
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
12
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
13
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
14
|
+
scope the authorization server advertises.
|
|
15
|
+
|
|
16
|
+
See [this document](/docs/articles/oauth-authentication) for more information
|
|
17
|
+
about OAuth authorization in Zuplo.
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"type": "boolean",
|
|
52
52
|
"default": false,
|
|
53
53
|
"x-advanced": true,
|
|
54
|
-
"description": "
|
|
54
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## OAuth 2.0 Protected Resource Metadata
|
|
2
|
+
|
|
3
|
+
The Okta JWT Auth policy supports OAuth protected resource metadata discovery.
|
|
4
|
+
To enable this feature, set the `oAuthResourceMetadataEnabled` option to `true`
|
|
5
|
+
and add the
|
|
6
|
+
[`OAuthProtectedResourcePlugin` to `modules/zuplo.runtime.ts`](/docs/programmable-api/oauth-protected-resource-plugin).
|
|
7
|
+
When configured, this enables OAuth clients to find metadata information about
|
|
8
|
+
how to interact with your OAuth 2.0 protected resources according to
|
|
9
|
+
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
10
|
+
|
|
11
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
12
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
13
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
14
|
+
scope the authorization server advertises.
|
|
15
|
+
|
|
16
|
+
Okta custom authorization servers always advertise the `device_sso` and
|
|
17
|
+
`interclient_access` scopes in their own metadata and reject authorization
|
|
18
|
+
requests that combine them with your scopes (`illegal_scope_combination`). Set
|
|
19
|
+
`scopesSupported` on the plugin when this policy protects an MCP server, so
|
|
20
|
+
clients never fall back to that list.
|
|
21
|
+
|
|
22
|
+
See [this document](/docs/articles/oauth-authentication) for more information
|
|
23
|
+
about OAuth authorization in Zuplo.
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"type": "boolean",
|
|
57
57
|
"default": false,
|
|
58
58
|
"x-advanced": true,
|
|
59
|
-
"description": "
|
|
59
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -56,3 +56,21 @@ export async function myHandler(request: ZuploRequest, context: ZuploContext) {
|
|
|
56
56
|
For a complete example of using the user object in a
|
|
57
57
|
[RequestHandler](../handlers/custom-handler.md), see
|
|
58
58
|
[Setting up JWT auth with Auth0](../policies/auth0-jwt-auth-inbound.md).
|
|
59
|
+
|
|
60
|
+
## OAuth 2.0 Protected Resource Metadata
|
|
61
|
+
|
|
62
|
+
The OpenID JWT Auth policy supports OAuth protected resource metadata discovery.
|
|
63
|
+
To enable this feature, set the `oAuthResourceMetadataEnabled` option to `true`
|
|
64
|
+
and add the
|
|
65
|
+
[`OAuthProtectedResourcePlugin` to `modules/zuplo.runtime.ts`](/docs/programmable-api/oauth-protected-resource-plugin).
|
|
66
|
+
When configured, this enables OAuth clients to find metadata information about
|
|
67
|
+
how to interact with your OAuth 2.0 protected resources according to
|
|
68
|
+
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
69
|
+
|
|
70
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
71
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
72
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
73
|
+
scope the authorization server advertises.
|
|
74
|
+
|
|
75
|
+
See [this document](/docs/articles/oauth-authentication) for more information
|
|
76
|
+
about OAuth authorization in Zuplo.
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"type": "boolean",
|
|
90
90
|
"default": false,
|
|
91
91
|
"x-advanced": true,
|
|
92
|
-
"description": "
|
|
92
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"examples": [
|
|
@@ -84,5 +84,10 @@ When configured, this enables OAuth clients to find metadata information about
|
|
|
84
84
|
how to interact with your OAuth 2.0 protected resources according to
|
|
85
85
|
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
86
86
|
|
|
87
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
88
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
89
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
90
|
+
scope the authorization server advertises.
|
|
91
|
+
|
|
87
92
|
See [this document](/docs/articles/oauth-authentication) for more information
|
|
88
93
|
about OAuth authorization in Zuplo.
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"type": "boolean",
|
|
57
57
|
"default": false,
|
|
58
58
|
"x-advanced": true,
|
|
59
|
-
"description": "
|
|
59
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -27,3 +27,8 @@ to `true` and add the
|
|
|
27
27
|
When configured, this enables OAuth clients to find metadata information about
|
|
28
28
|
how to interact with your OAuth 2.0 protected resources according to
|
|
29
29
|
[`RFC 9728`](https://datatracker.ietf.org/doc/html/rfc9728).
|
|
30
|
+
|
|
31
|
+
When the plugin is configured with `scopesSupported`, the 401 response also
|
|
32
|
+
lists those scopes in the `scope` parameter of its `WWW-Authenticate` header, so
|
|
33
|
+
MCP clients request exactly the scopes your resource expects instead of every
|
|
34
|
+
scope the authorization server advertises.
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"type": "boolean",
|
|
67
67
|
"default": false,
|
|
68
68
|
"x-advanced": true,
|
|
69
|
-
"description": "
|
|
69
|
+
"description": "Enables OAuth 2.0 Protected Resource Metadata discovery (RFC 9728). When `true`, requests without a bearer token receive a 401 whose `WWW-Authenticate` header points `resource_metadata` at the `/.well-known/oauth-protected-resource` document for the request path and, when the `OAuthProtectedResourcePlugin` declares `scopesSupported`, lists those scopes in `scope`. Requires the `OAuthProtectedResourcePlugin` in `zuplo.runtime.ts` or a user-defined route at that path."
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The official Zuplo CLI for local development and platform management",
|
|
6
6
|
"homepage": "https://zuplo.com/docs/cli/overview",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"zuplo": "zuplo.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@zuplo/cli": "7.6.
|
|
36
|
-
"@zuplo/core": "7.6.
|
|
37
|
-
"@zuplo/runtime": "7.6.
|
|
38
|
-
"@zuplo/test": "7.6.
|
|
35
|
+
"@zuplo/cli": "7.6.10",
|
|
36
|
+
"@zuplo/core": "7.6.10",
|
|
37
|
+
"@zuplo/runtime": "7.6.10",
|
|
38
|
+
"@zuplo/test": "7.6.10"
|
|
39
39
|
}
|
|
40
40
|
}
|