zuplo 7.8.7 → 7.8.9
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/custom-policies.mdx +2 -1
- package/docs/ai-gateway/integrations/claude-code.mdx +82 -180
- package/docs/ai-gateway/integrations/claude-desktop.mdx +61 -99
- package/docs/ai-gateway/integrations/codex.mdx +63 -57
- package/docs/ai-gateway/usage-limits.mdx +2 -2
- package/docs/api-management/overview.md +2 -2
- package/docs/articles/add-api-to-backstage.mdx +4 -3
- package/docs/articles/api-key-consumer-bucket-portal-ui.mdx +1 -1
- package/docs/articles/api-key-management.mdx +1 -1
- package/docs/articles/custom-domains.mdx +3 -2
- package/docs/articles/migrate-from-apigee.md +3 -3
- package/docs/articles/migrate-from-aws-api-gateway.md +3 -3
- package/docs/articles/migrate-from-azure-apim.md +3 -3
- package/docs/articles/migrate-from-kong.md +3 -3
- package/docs/articles/source-control-setup-github.mdx +2 -2
- package/docs/articles/source-control.mdx +4 -3
- package/docs/articles/testing.mdx +5 -5
- package/docs/articles/upstream-iam-auth.mdx +2 -2
- package/docs/cli/create-zuplo-api.mdx +4 -4
- package/docs/cli/openapi-merge.mdx +1 -1
- package/docs/cli/openapi-merge.partial.mdx +1 -1
- package/docs/concepts/ai-gateway.mdx +1 -1
- package/docs/concepts/how-zuplo-works.mdx +2 -1
- package/docs/concepts/mcp.mdx +4 -4
- package/docs/dedicated/architecture.mdx +1 -1
- package/docs/dev-portal/migration.mdx +2 -2
- package/docs/errors/not-found.mdx +1 -1
- package/docs/getting-started/ai-gateway/portal.mdx +181 -0
- package/docs/getting-started/dev-portal/agent.mdx +148 -0
- package/docs/getting-started/dev-portal/index.mdx +26 -0
- package/docs/getting-started/dev-portal/local.mdx +213 -0
- package/docs/getting-started/dev-portal/portal.mdx +146 -0
- package/docs/{articles/step-3-add-api-key-auth.mdx → getting-started/gateway/add-api-key-auth/index.mdx} +32 -23
- package/docs/{articles/step-3-add-api-key-auth-local.mdx → getting-started/gateway/add-api-key-auth/local.mdx} +28 -20
- package/docs/{articles/step-2-add-rate-limiting.mdx → getting-started/gateway/add-rate-limiting/index.mdx} +22 -13
- package/docs/{articles/step-2-add-rate-limiting-local.mdx → getting-started/gateway/add-rate-limiting/local.mdx} +24 -14
- package/docs/getting-started/gateway/agent.mdx +199 -0
- package/docs/{articles/step-4-deploying-to-the-edge.mdx → getting-started/gateway/deploy-to-the-edge/index.mdx} +39 -27
- package/docs/{articles/step-4-deploying-to-the-edge-local.mdx → getting-started/gateway/deploy-to-the-edge/local.mdx} +48 -17
- package/docs/{articles/step-5-dynamic-rate-limiting.mdx → getting-started/gateway/dynamic-rate-limiting/index.mdx} +24 -12
- package/docs/{articles/step-5-dynamic-rate-limiting-local.mdx → getting-started/gateway/dynamic-rate-limiting/local.mdx} +24 -12
- package/docs/getting-started/gateway/index.mdx +24 -0
- package/docs/{articles/step-1-setup-basic-gateway.mdx → getting-started/gateway/setup-a-basic-gateway/index.mdx} +33 -21
- package/docs/{articles/step-1-setup-basic-gateway-local.mdx → getting-started/gateway/setup-a-basic-gateway/local.mdx} +24 -15
- package/docs/getting-started/index.mdx +25 -0
- package/docs/getting-started/mcp-gateway/agent.mdx +161 -0
- package/docs/getting-started/mcp-gateway/index.mdx +25 -0
- package/docs/{mcp-gateway/quickstart-local.mdx → getting-started/mcp-gateway/local.mdx} +64 -38
- package/docs/{mcp-gateway/quickstart.mdx → getting-started/mcp-gateway/portal.mdx} +71 -54
- package/docs/getting-started/mcp-server/agent.mdx +152 -0
- package/docs/getting-started/mcp-server/index.mdx +25 -0
- package/docs/{articles/mcp-quickstart-local.mdx → getting-started/mcp-server/local.mdx} +24 -13
- package/docs/{articles/mcp-quickstart.mdx → getting-started/mcp-server/portal.mdx} +35 -15
- package/docs/getting-started/migrate/agent.mdx +129 -0
- package/docs/getting-started/migrate/index.mdx +25 -0
- package/docs/getting-started/migrate/local.mdx +141 -0
- package/docs/getting-started/migrate/portal.mdx +129 -0
- package/docs/home.mdx +6 -0
- package/docs/mcp-gateway/connect-clients/chatgpt.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/claude-code.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/claude-desktop.mdx +23 -20
- package/docs/mcp-gateway/connect-clients/cursor.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/overview.mdx +2 -1
- package/docs/mcp-gateway/connect-clients/vs-code.mdx +2 -1
- package/docs/mcp-gateway/how-it-works.mdx +2 -2
- package/docs/mcp-gateway/how-to/connect-upstream-api-key.mdx +4 -3
- package/docs/mcp-gateway/how-to/curate-tools.mdx +3 -2
- package/docs/mcp-gateway/overview.mdx +3 -3
- package/docs/policies/ai-gateway-smart-router-inbound/doc.md +14 -0
- package/docs/policies/akamai-ai-firewall-v2-inbound/doc.md +7 -0
- package/package.json +5 -5
- package/docs/ai-gateway/getting-started.mdx +0 -307
- package/docs/dev-portal/local-development.mdx +0 -72
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
category: Developer Portal
|
|
3
|
+
showLastModified: false
|
|
4
|
+
suggestEdit: false
|
|
5
|
+
sidebar_label: Portal
|
|
6
|
+
title: Getting Started with Developer Portal - Portal
|
|
7
|
+
description:
|
|
8
|
+
Publish a developer portal in the Zuplo Portal, customize API documentation,
|
|
9
|
+
assign a consumer key, and test an authenticated request.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<WizardSteps build="dev-portal" method="portal" />
|
|
13
|
+
|
|
14
|
+
<MethodTabs build="dev-portal" method="portal" />
|
|
15
|
+
|
|
16
|
+
Publish API documentation and let developers manage their assigned API keys.
|
|
17
|
+
You'll create a Todo API, customize its developer portal, and make an
|
|
18
|
+
authenticated request from the portal's playground.
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
- A [Zuplo account](https://portal.zuplo.com).
|
|
23
|
+
- An email address you can use to sign in to the developer portal.
|
|
24
|
+
|
|
25
|
+
## Build and test your developer portal
|
|
26
|
+
|
|
27
|
+
<Stepper>
|
|
28
|
+
|
|
29
|
+
1. **Create a project and sample API**
|
|
30
|
+
|
|
31
|
+
Open [**Projects**](https://portal.zuplo.com/+/account/projects), click **New
|
|
32
|
+
Project**, and select **API & MCP Gateway**. Name it `my-dev-portal` and
|
|
33
|
+
click **Create Project**.
|
|
34
|
+
|
|
35
|
+
In **Code → config/routes.oas.json**, select **Start with Example API**, then
|
|
36
|
+
**Complete Import**. The Route Designer now lists the Todo API routes. Your
|
|
37
|
+
project also includes a `docs` directory for the developer portal.
|
|
38
|
+
|
|
39
|
+
2. **Customize the portal**
|
|
40
|
+
|
|
41
|
+
In the **Code** file tree, open `docs/zudoku.config.tsx`. Set `site.title`
|
|
42
|
+
and `metadata.title` to `Todo Developer Portal`, and set
|
|
43
|
+
`metadata.description` to `Explore the Todo API and manage your API keys.`
|
|
44
|
+
Keep the other settings, including `apis`, `authentication`, and `apiKeys`.
|
|
45
|
+
|
|
46
|
+
The `apis` configuration reads `../config/routes.oas.json` and displays it at
|
|
47
|
+
`/api`. Editing your routes updates the API reference.
|
|
48
|
+
|
|
49
|
+
Open `docs/pages/introduction.mdx` and replace its contents with:
|
|
50
|
+
|
|
51
|
+
```mdx title="docs/pages/introduction.mdx"
|
|
52
|
+
---
|
|
53
|
+
title: Welcome to the Todo API
|
|
54
|
+
description: Sign in, find your API key, and make your first request.
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
Use the Todo API to retrieve tasks for your application.
|
|
58
|
+
|
|
59
|
+
1. Sign in using the email address registered as a key manager.
|
|
60
|
+
2. Open **API Keys** from your profile menu to find your assigned key.
|
|
61
|
+
3. Open **API Reference** and try **List todos** with that key.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Save the changes. The introduction already has a navigation entry. See
|
|
65
|
+
[Writing content](../../dev-portal/zudoku/writing.mdx) for more options.
|
|
66
|
+
|
|
67
|
+
3. **Protect the sample route**
|
|
68
|
+
|
|
69
|
+
Open `config/routes.oas.json` in the **Route Designer** and select **List
|
|
70
|
+
todos** (`GET /todos`). Open **Policies → Add Policy**, search for **API Key
|
|
71
|
+
Authentication**, and accept its default configuration.
|
|
72
|
+
|
|
73
|
+
<ModalScreenshot>
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
</ModalScreenshot>
|
|
78
|
+
|
|
79
|
+
Keep this policy first in the inbound policy chain. On the same route, open
|
|
80
|
+
**Deny All Origins (CORS)** and select **Allow All Origins** so the developer
|
|
81
|
+
portal can call it from the browser. Save your changes.
|
|
82
|
+
|
|
83
|
+
In the code view, add `info.description` to the OpenAPI file and set it to
|
|
84
|
+
`GET /todos requires a bearer API key.` Save again.
|
|
85
|
+
|
|
86
|
+
Click **Test** next to the route's path and send a request without a key.
|
|
87
|
+
Expect `401 Unauthorized`. This step protects `GET /todos`; apply
|
|
88
|
+
authentication to other routes before using them for private data.
|
|
89
|
+
|
|
90
|
+
4. **Assign a key to a developer**
|
|
91
|
+
|
|
92
|
+
Open
|
|
93
|
+
[**Services → API Keys → Consumers**](https://portal.zuplo.com/+/account/project/services).
|
|
94
|
+
Select **Dev** and click **Create Consumer**. Set **Subject** to
|
|
95
|
+
`tutorial-consumer`, enter your email under **Key managers**, and leave
|
|
96
|
+
**Metadata** as `{}`. Click **Save consumer**.
|
|
97
|
+
|
|
98
|
+
<ModalScreenshot>
|
|
99
|
+
|
|
100
|
+

|
|
101
|
+
|
|
102
|
+
</ModalScreenshot>
|
|
103
|
+
|
|
104
|
+
A key manager can manage the consumer's keys after signing in. Signing in
|
|
105
|
+
doesn't create a consumer automatically. See
|
|
106
|
+
[API key management](../../articles/api-key-management.mdx).
|
|
107
|
+
|
|
108
|
+
5. **Open and test the developer portal**
|
|
109
|
+
|
|
110
|
+
Open **Deployment URLs** and copy the **Dev Portal** URL for your working
|
|
111
|
+
copy. Open it in a new tab. Visit `/introduction` to check your new page.
|
|
112
|
+
|
|
113
|
+
Sign in using the same email address you entered under **Key managers**. The
|
|
114
|
+
template includes a demo sign-in provider for this tutorial. Open **API
|
|
115
|
+
Keys** from your profile menu and confirm your consumer's key appears.
|
|
116
|
+
|
|
117
|
+
Open **API Reference → List todos → Test**. Expand **Authentication**, select
|
|
118
|
+
`tutorial-consumer`, and click **Send**. Expect `200 OK` and todos in the
|
|
119
|
+
response. Select **None** under Authentication and send again: expect
|
|
120
|
+
`401 Unauthorized`.
|
|
121
|
+
|
|
122
|
+
If the key isn't listed, check the key manager email and that the consumer is
|
|
123
|
+
in the **Dev** bucket. If the browser reports a CORS error, check that this
|
|
124
|
+
route allows requests from the portal.
|
|
125
|
+
|
|
126
|
+
6. **Deploy for other developers**
|
|
127
|
+
|
|
128
|
+
Follow [Deploy to the edge](../gateway/deploy-to-the-edge/index.mdx) to
|
|
129
|
+
connect your Git repository and deploy. Open **Deployment URLs** for the
|
|
130
|
+
production deployment and copy its **Dev Portal** URL.
|
|
131
|
+
|
|
132
|
+
Create a consumer in the **Prod** API key bucket and repeat the signed-in
|
|
133
|
+
request there. Dev and Production keys are separate.
|
|
134
|
+
|
|
135
|
+
Before inviting users, replace the demo login with your own
|
|
136
|
+
[authentication provider](../../dev-portal/zudoku/configuration/authentication.md)
|
|
137
|
+
and configure [CORS](../../articles/cors.mdx) to allow your portal's origin.
|
|
138
|
+
|
|
139
|
+
</Stepper>
|
|
140
|
+
|
|
141
|
+
## Next steps
|
|
142
|
+
|
|
143
|
+
- [Customize the theme](../../dev-portal/zudoku/customization/colors-theme.mdx).
|
|
144
|
+
- [Create consumers on login](../../dev-portal/dev-portal-create-consumer-on-auth.mdx)
|
|
145
|
+
if every signed-in user should receive a key automatically.
|
|
146
|
+
- [Develop locally](./local.mdx) with live updates in your editor.
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
disablePager: true
|
|
4
|
+
showLastModified: false
|
|
5
|
+
suggestEdit: false
|
|
6
|
+
title: Add API key authentication - Portal
|
|
7
|
+
description:
|
|
8
|
+
Put API key authentication in front of your routes, issue a key to a consumer,
|
|
9
|
+
and reject calls that arrive without one in the Zuplo Portal.
|
|
4
10
|
---
|
|
5
11
|
|
|
12
|
+
<WizardSteps build="gateway" method="portal" step="add-api-key-auth" />
|
|
13
|
+
|
|
14
|
+
<MethodTabs build="gateway" method="portal" step="add-api-key-auth" />
|
|
15
|
+
|
|
6
16
|
In this guide we'll add API Key authentication to a route. You can do this for
|
|
7
17
|
any Zuplo project but will need a route, consider completing
|
|
8
|
-
[Step 1](
|
|
18
|
+
[Step 1](../setup-a-basic-gateway/index.mdx) first.
|
|
9
19
|
|
|
10
20
|
API Key authentication is one of our most popular **policies** as implementing
|
|
11
21
|
this authentication method is considered one of the easiest to use by developers
|
|
@@ -14,10 +24,10 @@ other authentication methods.
|
|
|
14
24
|
|
|
15
25
|
:::info{title="What's a Policy?"}
|
|
16
26
|
|
|
17
|
-
[Policies](
|
|
18
|
-
incoming request or outgoing response. Zuplo offers a wide range of
|
|
19
|
-
built-in (including API key authentication) to save you time. You can
|
|
20
|
-
[the full list](
|
|
27
|
+
[Policies](../../../articles/policies.mdx) are modules that can intercept and
|
|
28
|
+
transform an incoming request or outgoing response. Zuplo offers a wide range of
|
|
29
|
+
policies built-in (including API key authentication) to save you time. You can
|
|
30
|
+
check out [the full list](../../../articles/policies.mdx).
|
|
21
31
|
|
|
22
32
|
:::
|
|
23
33
|
|
|
@@ -31,26 +41,26 @@ Let's get started.
|
|
|
31
41
|
`routes.oas.json`) and open the **Policies** section. Then click **Add
|
|
32
42
|
Policy**.
|
|
33
43
|
|
|
34
|
-

|
|
35
45
|
|
|
36
46
|
Search for the API key authentication policy, click on it, and then click OK
|
|
37
47
|
to accept the default policy JSON.
|
|
38
48
|
|
|
39
49
|
<ModalScreenshot>
|
|
40
50
|
|
|
41
|
-

|
|
42
52
|
|
|
43
53
|
</ModalScreenshot>
|
|
44
54
|
|
|
45
55
|
:::tip
|
|
46
56
|
|
|
47
57
|
The API key authentication policy should usually be one of the first policies
|
|
48
|
-
executed. If you came here from [Step 2](
|
|
58
|
+
executed. If you came here from [Step 2](../add-rate-limiting/index.mdx) then
|
|
49
59
|
you will want to drag it above the rate limiting policy.
|
|
50
60
|
|
|
51
61
|
:::
|
|
52
62
|
|
|
53
|
-

|
|
54
64
|
|
|
55
65
|
If you test your route, you should get a 401 Unauthorized response
|
|
56
66
|
|
|
@@ -68,11 +78,11 @@ Let's get started.
|
|
|
68
78
|
[**Services**](https://portal.zuplo.com/+/account/project/services) tab in
|
|
69
79
|
your project, then select **API Keys → Consumers** in the sidebar.
|
|
70
80
|
|
|
71
|
-

|
|
72
82
|
|
|
73
83
|
Then click **Create Consumer**.
|
|
74
84
|
|
|
75
|
-

|
|
76
86
|
|
|
77
87
|
Let's break down the configuration needed.
|
|
78
88
|
- Subject: Also known as `sub`. This is a unique identifier of the API
|
|
@@ -90,7 +100,7 @@ Let's get started.
|
|
|
90
100
|
|
|
91
101
|
<ModalScreenshot>
|
|
92
102
|
|
|
93
|
-

|
|
94
104
|
|
|
95
105
|
</ModalScreenshot>
|
|
96
106
|
|
|
@@ -99,7 +109,7 @@ Let's get started.
|
|
|
99
109
|
After your API Key consumer is created, copy your new API Key by clicking the
|
|
100
110
|
copy button (next to the eye icon).
|
|
101
111
|
|
|
102
|
-

|
|
103
113
|
|
|
104
114
|
4. Test out your API Key
|
|
105
115
|
|
|
@@ -108,7 +118,7 @@ Let's get started.
|
|
|
108
118
|
|
|
109
119
|
<ModalScreenshot>
|
|
110
120
|
|
|
111
|
-

|
|
112
122
|
|
|
113
123
|
</ModalScreenshot>
|
|
114
124
|
|
|
@@ -121,7 +131,7 @@ Let's get started.
|
|
|
121
131
|
|
|
122
132
|
<ModalScreenshot>
|
|
123
133
|
|
|
124
|
-

|
|
125
135
|
|
|
126
136
|
</ModalScreenshot>
|
|
127
137
|
|
|
@@ -130,7 +140,7 @@ Let's get started.
|
|
|
130
140
|
We also offer an API for our API key service that allows you to
|
|
131
141
|
programmatically create consumers and even create your own developer portal
|
|
132
142
|
or integrate key management into your existing dashboard. See
|
|
133
|
-
[this document for details](
|
|
143
|
+
[this document for details](../../../articles/api-key-api.mdx).
|
|
134
144
|
|
|
135
145
|
:::
|
|
136
146
|
|
|
@@ -138,17 +148,17 @@ Let's get started.
|
|
|
138
148
|
|
|
139
149
|
Whenever you deploy a new endpoint on Zuplo, it will automatically be added
|
|
140
150
|
to your
|
|
141
|
-
[autogenerated developer documentation portal](
|
|
151
|
+
[autogenerated developer documentation portal](../../../dev-portal/overview.mdx).
|
|
142
152
|
|
|
143
153
|
To access your API's developer portal, click the **Gateway deployed** button
|
|
144
154
|
in your toolbar and click the link under Developer Portal.
|
|
145
|
-

|
|
146
156
|
|
|
147
157
|
When you use certain policies like API keys, Zuplo will document properties
|
|
148
158
|
like headers associated with that policy. As you can see on the right, the
|
|
149
159
|
API key policy's `Authorization` header has been documented for you.
|
|
150
160
|
|
|
151
|
-

|
|
152
162
|
|
|
153
163
|
Additionally, a new Authentication section has been added to your developer
|
|
154
164
|
portal. Users of your API can sign in, view & manage their API keys, test
|
|
@@ -158,5 +168,4 @@ Let's get started.
|
|
|
158
168
|
|
|
159
169
|
</Stepper>
|
|
160
170
|
|
|
161
|
-
|
|
162
|
-
[Step 4 - Connect Source Control and Deploy to the Edge](./step-4-deploying-to-the-edge.mdx).
|
|
171
|
+
<TutorialPager build="gateway" method="portal" step="add-api-key-auth" />
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
disablePager: true
|
|
4
|
+
showLastModified: false
|
|
5
|
+
suggestEdit: false
|
|
6
|
+
title: Add API key authentication - Editor
|
|
7
|
+
description:
|
|
8
|
+
Put API key authentication in front of your routes, issue a key to a consumer,
|
|
9
|
+
and reject calls that arrive without one with the Zuplo CLI and your editor.
|
|
4
10
|
---
|
|
5
11
|
|
|
12
|
+
<WizardSteps build="gateway" method="local" step="add-api-key-auth" />
|
|
13
|
+
|
|
14
|
+
<MethodTabs build="gateway" method="local" step="add-api-key-auth" />
|
|
15
|
+
|
|
6
16
|
In this guide we'll add API Key authentication to a route. You can do this for
|
|
7
17
|
any Zuplo project but will need a route, consider completing
|
|
8
|
-
[Step 1](
|
|
18
|
+
[Step 1](../setup-a-basic-gateway/local.mdx) first.
|
|
9
19
|
|
|
10
20
|
API Key authentication is one of our most popular **policies** as implementing
|
|
11
21
|
this authentication method is considered one of the easiest to use by developers
|
|
@@ -14,10 +24,10 @@ other authentication methods.
|
|
|
14
24
|
|
|
15
25
|
:::info{title="What's a Policy?"}
|
|
16
26
|
|
|
17
|
-
[Policies](
|
|
18
|
-
incoming request or outgoing response. Zuplo offers a wide range of
|
|
19
|
-
built-in (including API key authentication) to save you time. You can
|
|
20
|
-
[the full list](
|
|
27
|
+
[Policies](../../../articles/policies.mdx) are modules that can intercept and
|
|
28
|
+
transform an incoming request or outgoing response. Zuplo offers a wide range of
|
|
29
|
+
policies built-in (including API key authentication) to save you time. You can
|
|
30
|
+
check out [the full list](../../../articles/policies.mdx).
|
|
21
31
|
|
|
22
32
|
:::
|
|
23
33
|
|
|
@@ -36,7 +46,7 @@ Let's get started.
|
|
|
36
46
|
|
|
37
47
|
<BrowserScreenshot url="http://localhost:9100/?path=routes.oas.json">
|
|
38
48
|
|
|
39
|
-

|
|
40
50
|
|
|
41
51
|
</BrowserScreenshot>
|
|
42
52
|
|
|
@@ -45,20 +55,19 @@ Let's get started.
|
|
|
45
55
|
|
|
46
56
|
<ModalScreenshot>
|
|
47
57
|
|
|
48
|
-

|
|
49
59
|
|
|
50
60
|
</ModalScreenshot>
|
|
51
61
|
|
|
52
62
|
:::tip
|
|
53
63
|
|
|
54
64
|
The API key authentication policy should usually be one of the first policies
|
|
55
|
-
executed. If you came here from
|
|
56
|
-
|
|
57
|
-
above the rate limiting policy.
|
|
65
|
+
executed. If you came here from [Step 2](../add-rate-limiting/local.mdx) then
|
|
66
|
+
you will want to drag it above the rate limiting policy.
|
|
58
67
|
|
|
59
68
|
:::
|
|
60
69
|
|
|
61
|
-

|
|
62
71
|
|
|
63
72
|
If you test your route, you should get a 401 Unauthorized response
|
|
64
73
|
|
|
@@ -87,11 +96,11 @@ Let's get started.
|
|
|
87
96
|
|
|
88
97
|
:::
|
|
89
98
|
|
|
90
|
-

|
|
91
100
|
|
|
92
101
|
Then click **Create Consumer**.
|
|
93
102
|
|
|
94
|
-

|
|
95
104
|
|
|
96
105
|
Let's break down the configuration needed.
|
|
97
106
|
- Subject: Also known as `sub`. This is a unique identifier of the API
|
|
@@ -109,7 +118,7 @@ Let's get started.
|
|
|
109
118
|
|
|
110
119
|
<ModalScreenshot>
|
|
111
120
|
|
|
112
|
-

|
|
113
122
|
|
|
114
123
|
</ModalScreenshot>
|
|
115
124
|
|
|
@@ -118,7 +127,7 @@ Let's get started.
|
|
|
118
127
|
After your API Key consumer is created, copy your new API Key by clicking the
|
|
119
128
|
copy button (next to the eye icon).
|
|
120
129
|
|
|
121
|
-

|
|
122
131
|
|
|
123
132
|
1. Test out your API Key
|
|
124
133
|
|
|
@@ -141,11 +150,10 @@ Let's get started.
|
|
|
141
150
|
We also offer an API for our API key service that allows you to
|
|
142
151
|
programmatically create consumers and even create your own developer portal
|
|
143
152
|
or integrate key management into your existing dashboard. See
|
|
144
|
-
[this document for details](
|
|
153
|
+
[this document for details](../../../articles/api-key-api.mdx).
|
|
145
154
|
|
|
146
155
|
:::
|
|
147
156
|
|
|
148
157
|
</Stepper>
|
|
149
158
|
|
|
150
|
-
|
|
151
|
-
[Step 4 - Deploy to the Edge](./step-4-deploying-to-the-edge-local.mdx).
|
|
159
|
+
<TutorialPager build="gateway" method="local" step="add-api-key-auth" />
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
disablePager: true
|
|
4
|
+
showLastModified: false
|
|
5
|
+
suggestEdit: false
|
|
6
|
+
title: Add rate limiting - Portal
|
|
7
|
+
description:
|
|
8
|
+
Protect the gateway you just built by adding a rate limiting policy to a route
|
|
9
|
+
and watching it reject requests over the limit in the Zuplo Portal.
|
|
4
10
|
---
|
|
5
11
|
|
|
12
|
+
<WizardSteps build="gateway" method="portal" step="add-rate-limiting" />
|
|
13
|
+
|
|
14
|
+
<MethodTabs build="gateway" method="portal" step="add-rate-limiting" />
|
|
15
|
+
|
|
6
16
|
In this guide we'll add simple Rate Limiting to a route. If you don't have one
|
|
7
|
-
ready, complete [Step 1](
|
|
17
|
+
ready, complete [Step 1](../setup-a-basic-gateway/index.mdx) first.
|
|
8
18
|
|
|
9
19
|
Rate Limiting is one of our most popular **policies** - you should never ship an
|
|
10
20
|
API without rate limiting because your customers or internal developers **will**
|
|
@@ -12,10 +22,10 @@ accidentally DoS your API; usually with a rogue `useEffect` call in React code.
|
|
|
12
22
|
|
|
13
23
|
:::info{title="What's a Policy?"}
|
|
14
24
|
|
|
15
|
-
[Policies](
|
|
16
|
-
incoming request or outgoing response. Zuplo offers a wide range of
|
|
17
|
-
built-in (including rate limiting) to save you time. You can check out
|
|
18
|
-
[the full list](
|
|
25
|
+
[Policies](../../../articles/policies.mdx) are modules that can intercept and
|
|
26
|
+
transform an incoming request or outgoing response. Zuplo offers a wide range of
|
|
27
|
+
policies built-in (including rate limiting) to save you time. You can check out
|
|
28
|
+
[the full list](../../../policies/overview.mdx).
|
|
19
29
|
|
|
20
30
|
:::
|
|
21
31
|
|
|
@@ -36,7 +46,7 @@ limiter.
|
|
|
36
46
|
|
|
37
47
|
<ModalScreenshot>
|
|
38
48
|
|
|
39
|
-

|
|
40
50
|
|
|
41
51
|
</ModalScreenshot>
|
|
42
52
|
|
|
@@ -44,7 +54,7 @@ limiter.
|
|
|
44
54
|
|
|
45
55
|
<ModalScreenshot>
|
|
46
56
|
|
|
47
|
-

|
|
48
58
|
|
|
49
59
|
</ModalScreenshot>
|
|
50
60
|
|
|
@@ -53,7 +63,7 @@ limiter.
|
|
|
53
63
|
(`requestsAllowed`) every 1 minute (`timeWindowMinutes`). You can explore the
|
|
54
64
|
rest of the policy's documentation and configuration in the right panel.
|
|
55
65
|
|
|
56
|
-

|
|
57
67
|
|
|
58
68
|
To apply the policy, click **OK**. Then, save your changes to redeploy.
|
|
59
69
|
|
|
@@ -64,7 +74,7 @@ limiter.
|
|
|
64
74
|
|
|
65
75
|
<ModalScreenshot>
|
|
66
76
|
|
|
67
|
-

|
|
68
78
|
|
|
69
79
|
</ModalScreenshot>
|
|
70
80
|
|
|
@@ -73,5 +83,4 @@ limiter.
|
|
|
73
83
|
|
|
74
84
|
</Stepper>
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
[Step 3 - Add API Key Authentication](./step-3-add-api-key-auth.mdx).
|
|
86
|
+
<TutorialPager build="gateway" method="portal" step="add-rate-limiting" />
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
category: API Management
|
|
3
|
+
disablePager: true
|
|
4
|
+
showLastModified: false
|
|
5
|
+
suggestEdit: false
|
|
6
|
+
title: Add rate limiting - Editor
|
|
7
|
+
description:
|
|
8
|
+
Protect the gateway you just built by adding a rate limiting policy to a route
|
|
9
|
+
and watching it reject requests over the limit with the Zuplo CLI and your
|
|
10
|
+
editor.
|
|
4
11
|
---
|
|
5
12
|
|
|
13
|
+
<WizardSteps build="gateway" method="local" step="add-rate-limiting" />
|
|
14
|
+
|
|
15
|
+
<MethodTabs build="gateway" method="local" step="add-rate-limiting" />
|
|
16
|
+
|
|
6
17
|
In this guide we'll add simple Rate Limiting to a route. If you don't have one
|
|
7
|
-
ready, complete [Step 1](
|
|
18
|
+
ready, complete [Step 1](../setup-a-basic-gateway/local.mdx) first.
|
|
8
19
|
|
|
9
20
|
Rate Limiting is one of our most popular **policies** - you should never ship an
|
|
10
21
|
API without rate limiting because your customers or internal developers **will**
|
|
@@ -12,10 +23,10 @@ accidentally DoS your API; usually with a rogue `useEffect` call in React code.
|
|
|
12
23
|
|
|
13
24
|
:::info{title="What's a Policy?"}
|
|
14
25
|
|
|
15
|
-
[Policies](
|
|
16
|
-
incoming request or outgoing response. Zuplo offers a wide range of
|
|
17
|
-
built-in (including rate limiting) to save you time. You can check out
|
|
18
|
-
[the full list](
|
|
26
|
+
[Policies](../../../articles/policies.mdx) are modules that can intercept and
|
|
27
|
+
transform an incoming request or outgoing response. Zuplo offers a wide range of
|
|
28
|
+
policies built-in (including rate limiting) to save you time. You can check out
|
|
29
|
+
[the full list](../../../articles/policies.mdx).
|
|
19
30
|
|
|
20
31
|
:::
|
|
21
32
|
|
|
@@ -23,8 +34,8 @@ Zuplo offers a programmable approach to rate limiting that allows you to vary
|
|
|
23
34
|
how rate limiting is applied for each customer or request.
|
|
24
35
|
|
|
25
36
|
In this example, we'll add a simple IP-based rate limiter, but you should also
|
|
26
|
-
explore [dynamic rate limiting](
|
|
27
|
-
|
|
37
|
+
explore [dynamic rate limiting](../dynamic-rate-limiting/local.mdx) to see the
|
|
38
|
+
full power of the world's best rate limiter.
|
|
28
39
|
|
|
29
40
|
<Stepper>
|
|
30
41
|
|
|
@@ -39,7 +50,7 @@ the full power of the world's best rate limiter.
|
|
|
39
50
|
|
|
40
51
|
<BrowserScreenshot url="http://localhost:9100/?path=routes.oas.json">
|
|
41
52
|
|
|
42
|
-

|
|
43
54
|
|
|
44
55
|
</BrowserScreenshot>
|
|
45
56
|
|
|
@@ -47,7 +58,7 @@ the full power of the world's best rate limiter.
|
|
|
47
58
|
|
|
48
59
|
<ModalScreenshot>
|
|
49
60
|
|
|
50
|
-

|
|
51
62
|
|
|
52
63
|
</ModalScreenshot>
|
|
53
64
|
|
|
@@ -56,7 +67,7 @@ the full power of the world's best rate limiter.
|
|
|
56
67
|
(`requestsAllowed`) every 1 minute (`timeWindowMinutes`). You can explore the
|
|
57
68
|
rest of the policy's documentation and configuration in the right panel.
|
|
58
69
|
|
|
59
|
-

|
|
60
71
|
|
|
61
72
|
To apply the policy, click **Create Policy**, then save your changes.
|
|
62
73
|
|
|
@@ -91,5 +102,4 @@ the full power of the world's best rate limiter.
|
|
|
91
102
|
|
|
92
103
|
</Stepper>
|
|
93
104
|
|
|
94
|
-
|
|
95
|
-
[Step 3 - Add API Key Authentication](./step-3-add-api-key-auth-local.mdx).
|
|
105
|
+
<TutorialPager build="gateway" method="local" step="add-rate-limiting" />
|