zuplo 6.67.32 → 6.68.0
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/README.md +9 -0
- package/docs/_index.md +44 -0
- package/docs/ai-gateway/apps.mdx +28 -0
- package/docs/ai-gateway/custom-providers.mdx +54 -0
- package/docs/ai-gateway/getting-started.mdx +224 -0
- package/docs/ai-gateway/guardrails.mdx +65 -0
- package/docs/ai-gateway/integrations/ai-sdk.mdx +109 -0
- package/docs/ai-gateway/integrations/claude-code.mdx +49 -0
- package/docs/ai-gateway/integrations/codex.mdx +78 -0
- package/docs/ai-gateway/integrations/goose.mdx +104 -0
- package/docs/ai-gateway/integrations/langchain.mdx +66 -0
- package/docs/ai-gateway/integrations/openai.mdx +99 -0
- package/docs/ai-gateway/introduction.mdx +85 -0
- package/docs/ai-gateway/managing-apps.mdx +46 -0
- package/docs/ai-gateway/managing-providers.mdx +66 -0
- package/docs/ai-gateway/managing-teams.mdx +63 -0
- package/docs/ai-gateway/policies/akamai-ai-firewall.mdx +125 -0
- package/docs/ai-gateway/policies/comet-opik-tracing.mdx +139 -0
- package/docs/ai-gateway/policies/galileo-tracing.mdx +147 -0
- package/docs/ai-gateway/providers.mdx +32 -0
- package/docs/ai-gateway/teams.mdx +38 -0
- package/docs/ai-gateway/universal-api.mdx +43 -0
- package/docs/ai-gateway/usage-limits.mdx +89 -0
- package/docs/api-management/introduction.md +127 -0
- package/docs/articles/accounts/audit-logs.mdx +227 -0
- package/docs/articles/accounts/billing.mdx +25 -0
- package/docs/articles/accounts/default-api-key.mdx +30 -0
- package/docs/articles/accounts/delete-account.mdx +36 -0
- package/docs/articles/accounts/enterprise-sso.mdx +116 -0
- package/docs/articles/accounts/managing-account-members.mdx +45 -0
- package/docs/articles/accounts/managing-project-members.mdx +37 -0
- package/docs/articles/accounts/members-and-roles.mdx +21 -0
- package/docs/articles/accounts/roles-and-permissions.mdx +115 -0
- package/docs/articles/accounts/zuplo-api-keys.mdx +94 -0
- package/docs/articles/add-api-to-backstage.mdx +216 -0
- package/docs/articles/advanced-path-matching.mdx +139 -0
- package/docs/articles/api-key-administration.mdx +47 -0
- package/docs/articles/api-key-api.mdx +220 -0
- package/docs/articles/api-key-authentication.mdx +195 -0
- package/docs/articles/api-key-buckets.mdx +61 -0
- package/docs/articles/api-key-end-users.mdx +52 -0
- package/docs/articles/api-key-leak-detection.mdx +75 -0
- package/docs/articles/api-key-management.mdx +100 -0
- package/docs/articles/api-key-react-component.mdx +90 -0
- package/docs/articles/api-key-service-limits.mdx +14 -0
- package/docs/articles/archiving-requests-to-storage.mdx +119 -0
- package/docs/articles/branch-based-deployments.mdx +184 -0
- package/docs/articles/bypass-policy-for-testing.mdx +117 -0
- package/docs/articles/check-ip-address.mdx +17 -0
- package/docs/articles/ci-cd-azure/basic-deployment.mdx +49 -0
- package/docs/articles/ci-cd-azure/deploy-and-test.mdx +47 -0
- package/docs/articles/ci-cd-azure/local-testing.mdx +59 -0
- package/docs/articles/ci-cd-azure/multi-stage-deployment.mdx +88 -0
- package/docs/articles/ci-cd-azure/pr-preview-environments.mdx +50 -0
- package/docs/articles/ci-cd-azure/tag-based-releases.mdx +37 -0
- package/docs/articles/ci-cd-bitbucket/basic-deployment.mdx +27 -0
- package/docs/articles/ci-cd-bitbucket/deploy-and-test.mdx +41 -0
- package/docs/articles/ci-cd-bitbucket/local-testing.mdx +34 -0
- package/docs/articles/ci-cd-bitbucket/multi-stage-deployment.mdx +52 -0
- package/docs/articles/ci-cd-bitbucket/pr-preview-environments.mdx +46 -0
- package/docs/articles/ci-cd-bitbucket/tag-based-releases.mdx +27 -0
- package/docs/articles/ci-cd-circleci/basic-deployment.mdx +34 -0
- package/docs/articles/ci-cd-circleci/deploy-and-test.mdx +44 -0
- package/docs/articles/ci-cd-circleci/local-testing.mdx +50 -0
- package/docs/articles/ci-cd-circleci/multi-stage-deployment.mdx +82 -0
- package/docs/articles/ci-cd-circleci/pr-preview-environments.mdx +47 -0
- package/docs/articles/ci-cd-circleci/tag-based-releases.mdx +38 -0
- package/docs/articles/ci-cd-github/basic-deployment.mdx +48 -0
- package/docs/articles/ci-cd-github/cleanup-on-branch-delete.mdx +123 -0
- package/docs/articles/ci-cd-github/deploy-and-test.mdx +82 -0
- package/docs/articles/ci-cd-github/local-testing.mdx +102 -0
- package/docs/articles/ci-cd-github/multi-stage-deployment.mdx +136 -0
- package/docs/articles/ci-cd-github/pr-preview-environments.mdx +106 -0
- package/docs/articles/ci-cd-github/tag-based-releases.mdx +99 -0
- package/docs/articles/ci-cd-gitlab/basic-deployment.mdx +28 -0
- package/docs/articles/ci-cd-gitlab/deploy-and-test.mdx +44 -0
- package/docs/articles/ci-cd-gitlab/local-testing.mdx +39 -0
- package/docs/articles/ci-cd-gitlab/mr-preview-environments.mdx +52 -0
- package/docs/articles/ci-cd-gitlab/multi-stage-deployment.mdx +64 -0
- package/docs/articles/ci-cd-gitlab/tag-based-releases.mdx +28 -0
- package/docs/articles/composite-policy-reference.mdx +284 -0
- package/docs/articles/configuring-auth0-for-mcp-auth.mdx +186 -0
- package/docs/articles/configuring-okta-for-mcp-auth.mdx +208 -0
- package/docs/articles/convert-urls-to-openapi.mdx +62 -0
- package/docs/articles/cors.mdx +447 -0
- package/docs/articles/custom-audit-log-policy.mdx +95 -0
- package/docs/articles/custom-ci-cd-azure.mdx +81 -0
- package/docs/articles/custom-ci-cd-bitbucket.mdx +80 -0
- package/docs/articles/custom-ci-cd-circleci.mdx +78 -0
- package/docs/articles/custom-ci-cd-github.mdx +99 -0
- package/docs/articles/custom-ci-cd-gitlab.mdx +79 -0
- package/docs/articles/custom-ci-cd.mdx +82 -0
- package/docs/articles/custom-code-patterns.md +418 -0
- package/docs/articles/custom-domains.mdx +258 -0
- package/docs/articles/custom-logging-example.mdx +139 -0
- package/docs/articles/ddos-protection.mdx +138 -0
- package/docs/articles/development-options.mdx +49 -0
- package/docs/articles/environment-variables.mdx +134 -0
- package/docs/articles/environments.mdx +143 -0
- package/docs/articles/fastly-zuplo-host-setup.mdx +41 -0
- package/docs/articles/github-deployment-testing.mdx +101 -0
- package/docs/articles/gke-with-upstream-auth-policy.mdx +192 -0
- package/docs/articles/graphql-security.mdx +180 -0
- package/docs/articles/handling-form-data.mdx +61 -0
- package/docs/articles/health-checks.mdx +109 -0
- package/docs/articles/hosting-options.mdx +70 -0
- package/docs/articles/lazy-load-configuration-into-cache.mdx +92 -0
- package/docs/articles/limits.mdx +98 -0
- package/docs/articles/local-development-debugging.mdx +44 -0
- package/docs/articles/local-development-env-variables.mdx +23 -0
- package/docs/articles/local-development-installing-packages.mdx +23 -0
- package/docs/articles/local-development-routes-designer.mdx +27 -0
- package/docs/articles/local-development-services.mdx +40 -0
- package/docs/articles/local-development-troubleshooting.mdx +56 -0
- package/docs/articles/local-development.mdx +81 -0
- package/docs/articles/log-plugin-aws-cloudwatch.mdx +83 -0
- package/docs/articles/log-plugin-datadog.mdx +84 -0
- package/docs/articles/log-plugin-dynatrace.mdx +75 -0
- package/docs/articles/log-plugin-gcp.mdx +75 -0
- package/docs/articles/log-plugin-loki.mdx +136 -0
- package/docs/articles/log-plugin-new-relic.mdx +84 -0
- package/docs/articles/log-plugin-splunk.mdx +104 -0
- package/docs/articles/log-plugin-sumo.mdx +73 -0
- package/docs/articles/log-plugin-vmware-log-insight.mdx +154 -0
- package/docs/articles/log-request-response-data.mdx +398 -0
- package/docs/articles/logging.mdx +115 -0
- package/docs/articles/manual-mcp-oauth-testing.mdx +193 -0
- package/docs/articles/mcp-quickstart.mdx +135 -0
- package/docs/articles/metrics-plugins.mdx +371 -0
- package/docs/articles/migrate-from-apigee.md +408 -0
- package/docs/articles/migrate-from-aws-api-gateway.md +248 -0
- package/docs/articles/migrate-from-azure-apim.md +292 -0
- package/docs/articles/migrate-from-kong.md +300 -0
- package/docs/articles/migration-overview.md +81 -0
- package/docs/articles/monetization/api-access.mdx +69 -0
- package/docs/articles/monetization/billing-models.md +520 -0
- package/docs/articles/monetization/developer-portal.md +167 -0
- package/docs/articles/monetization/features.mdx +98 -0
- package/docs/articles/monetization/index.mdx +113 -0
- package/docs/articles/monetization/meters.mdx +135 -0
- package/docs/articles/monetization/monetization-policy.md +314 -0
- package/docs/articles/monetization/plan-examples.mdx +366 -0
- package/docs/articles/monetization/plans.mdx +266 -0
- package/docs/articles/monetization/pricing-models.mdx +225 -0
- package/docs/articles/monetization/private-plans.md +154 -0
- package/docs/articles/monetization/quickstart.md +355 -0
- package/docs/articles/monetization/rate-cards.mdx +171 -0
- package/docs/articles/monetization/stripe-integration.md +195 -0
- package/docs/articles/monetization/subscription-lifecycle.md +298 -0
- package/docs/articles/monetization/tax-collection.md +166 -0
- package/docs/articles/monetization/troubleshooting.md +272 -0
- package/docs/articles/monetization-custom.mdx +71 -0
- package/docs/articles/monetization-integrations.mdx +104 -0
- package/docs/articles/monitoring-your-gateway.mdx +53 -0
- package/docs/articles/monorepo-deployment.mdx +350 -0
- package/docs/articles/multiple-auth-policies.mdx +81 -0
- package/docs/articles/non-standard-ports.mdx +30 -0
- package/docs/articles/oauth-authentication.mdx +54 -0
- package/docs/articles/openapi-server-urls.mdx +60 -0
- package/docs/articles/openapi.mdx +130 -0
- package/docs/articles/opentelemetry.mdx +250 -0
- package/docs/articles/per-user-rate-limits-using-db.mdx +112 -0
- package/docs/articles/performance-testing.mdx +304 -0
- package/docs/articles/plugin-akamai-api-security.mdx +76 -0
- package/docs/articles/plugin-azure-blob.mdx +73 -0
- package/docs/articles/plugin-azure-event-hubs.mdx +64 -0
- package/docs/articles/plugin-hydrolix-traffic-peak.mdx +147 -0
- package/docs/articles/policies.mdx +33 -0
- package/docs/articles/rename-or-move-project.mdx +39 -0
- package/docs/articles/rick-and-morty-api-developer-portal-example.mdx +23 -0
- package/docs/articles/routing.mdx +193 -0
- package/docs/articles/s3-signed-url-uploads.mdx +521 -0
- package/docs/articles/secure-tunnel.mdx +84 -0
- package/docs/articles/securing-backend-mtls.mdx +268 -0
- package/docs/articles/securing-your-backend.mdx +148 -0
- package/docs/articles/security.mdx +105 -0
- package/docs/articles/sharing-code-across-projects.mdx +412 -0
- package/docs/articles/source-control-setup-azure.mdx +13 -0
- package/docs/articles/source-control-setup-bitbucket.mdx +43 -0
- package/docs/articles/source-control-setup-github.mdx +172 -0
- package/docs/articles/source-control-setup-gitlab.mdx +12 -0
- package/docs/articles/source-control.mdx +80 -0
- package/docs/articles/step-1-setup-basic-gateway-local.mdx +136 -0
- package/docs/articles/step-1-setup-basic-gateway.mdx +118 -0
- package/docs/articles/step-2-add-rate-limiting-local.mdx +126 -0
- package/docs/articles/step-2-add-rate-limiting.mdx +82 -0
- package/docs/articles/step-3-add-api-key-auth-local.mdx +199 -0
- package/docs/articles/step-3-add-api-key-auth.mdx +166 -0
- package/docs/articles/step-4-deploying-to-the-edge.mdx +220 -0
- package/docs/articles/step-5-dynamic-rate-limiting.mdx +167 -0
- package/docs/articles/support.mdx +144 -0
- package/docs/articles/terraform.mdx +114 -0
- package/docs/articles/testing-graphql.mdx +34 -0
- package/docs/articles/testing.mdx +522 -0
- package/docs/articles/troubleshooting-slow-responses.mdx +301 -0
- package/docs/articles/troubleshooting.md +302 -0
- package/docs/articles/tsconfig.mdx +105 -0
- package/docs/articles/tunnel-setup.mdx +195 -0
- package/docs/articles/tunnel-troubleshooting.mdx +50 -0
- package/docs/articles/update-zup-in-github-action.mdx +110 -0
- package/docs/articles/use-openapi-extension-data.mdx +79 -0
- package/docs/articles/users/multifactor-authentication.mdx +64 -0
- package/docs/articles/users/profile.mdx +13 -0
- package/docs/articles/versioning-on-zuplo.mdx +89 -0
- package/docs/articles/waf-ddos-akamai.md +133 -0
- package/docs/articles/waf-ddos-aws-waf-shield.mdx +85 -0
- package/docs/articles/waf-ddos-fastly.mdx +251 -0
- package/docs/articles/waf-ddos.mdx +140 -0
- package/docs/articles/zuplo-waf.mdx +156 -0
- package/docs/ask.mdx +3 -0
- package/docs/cli/authentication.mdx +56 -0
- package/docs/cli/connectivity.mdx +38 -0
- package/docs/cli/create-zuplo-api.mdx +80 -0
- package/docs/cli/delete.mdx +79 -0
- package/docs/cli/deploy.mdx +156 -0
- package/docs/cli/deploy.partial.mdx +46 -0
- package/docs/cli/dev.mdx +115 -0
- package/docs/cli/docs.mdx +66 -0
- package/docs/cli/editor.mdx +50 -0
- package/docs/cli/global-options.mdx +19 -0
- package/docs/cli/init.mdx +74 -0
- package/docs/cli/link.mdx +74 -0
- package/docs/cli/list.mdx +55 -0
- package/docs/cli/mtls-certificate-create.mdx +94 -0
- package/docs/cli/mtls-certificate-delete.mdx +55 -0
- package/docs/cli/mtls-certificate-describe.mdx +55 -0
- package/docs/cli/mtls-certificate-disable.mdx +55 -0
- package/docs/cli/mtls-certificate-list.mdx +47 -0
- package/docs/cli/mtls-certificate-update.mdx +72 -0
- package/docs/cli/openapi-convert.mdx +111 -0
- package/docs/cli/openapi-merge.mdx +138 -0
- package/docs/cli/openapi-merge.partial.mdx +29 -0
- package/docs/cli/openapi-overlay.mdx +123 -0
- package/docs/cli/overview.mdx +78 -0
- package/docs/cli/project-create.mdx +43 -0
- package/docs/cli/source-migrate.mdx +18 -0
- package/docs/cli/source-upgrade.mdx +41 -0
- package/docs/cli/test.mdx +70 -0
- package/docs/cli/test.partial.mdx +7 -0
- package/docs/cli/tunnel-create.mdx +53 -0
- package/docs/cli/tunnel-create.partial.mdx +9 -0
- package/docs/cli/tunnel-delete.mdx +35 -0
- package/docs/cli/tunnel-delete.partial.mdx +9 -0
- package/docs/cli/tunnel-describe.mdx +45 -0
- package/docs/cli/tunnel-describe.partial.mdx +5 -0
- package/docs/cli/tunnel-list.mdx +35 -0
- package/docs/cli/tunnel-list.partial.mdx +9 -0
- package/docs/cli/tunnel-rate-token.partial.mdx +9 -0
- package/docs/cli/tunnel-rotate-token.mdx +39 -0
- package/docs/cli/tunnel-services-describe.mdx +45 -0
- package/docs/cli/tunnel-services-describe.partial.mdx +9 -0
- package/docs/cli/tunnel-services-update.mdx +48 -0
- package/docs/cli/variable-create.mdx +91 -0
- package/docs/cli/variable-create.partial.mdx +5 -0
- package/docs/cli/variable-update.mdx +75 -0
- package/docs/cli/variable-update.partial.mdx +5 -0
- package/docs/concepts/api-keys.md +146 -0
- package/docs/concepts/authentication.mdx +109 -0
- package/docs/concepts/how-zuplo-works.mdx +120 -0
- package/docs/concepts/project-structure.mdx +174 -0
- package/docs/concepts/rate-limiting.md +246 -0
- package/docs/concepts/request-lifecycle.mdx +56 -0
- package/docs/concepts/source-control-and-deployment.mdx +229 -0
- package/docs/conferences/conference-prize-terms.mdx +80 -0
- package/docs/dedicated/akamai/ai-powered-applications.mdx +223 -0
- package/docs/dedicated/akamai/architecture.mdx +280 -0
- package/docs/dedicated/akamai/caching.mdx +212 -0
- package/docs/dedicated/akamai/cdn.mdx +156 -0
- package/docs/dedicated/architecture.mdx +208 -0
- package/docs/dedicated/custom-domains.mdx +31 -0
- package/docs/dedicated/federated-gateways.mdx +80 -0
- package/docs/dedicated/networking.mdx +69 -0
- package/docs/dedicated/overview.mdx +80 -0
- package/docs/dedicated/source-control.mdx +63 -0
- package/docs/dev-portal/dev-portal-create-consumer-on-auth.mdx +134 -0
- package/docs/dev-portal/introduction.mdx +65 -0
- package/docs/dev-portal/local-development.mdx +72 -0
- package/docs/dev-portal/migration.mdx +526 -0
- package/docs/dev-portal/node-modules.mdx +45 -0
- package/docs/dev-portal/updating.mdx +28 -0
- package/docs/dev-portal/zudoku/components/alert.mdx +130 -0
- package/docs/dev-portal/zudoku/components/badge.mdx +70 -0
- package/docs/dev-portal/zudoku/components/button.mdx +132 -0
- package/docs/dev-portal/zudoku/components/callout.mdx +112 -0
- package/docs/dev-portal/zudoku/components/card.mdx +104 -0
- package/docs/dev-portal/zudoku/components/checkbox.mdx +72 -0
- package/docs/dev-portal/zudoku/components/client-only.mdx +79 -0
- package/docs/dev-portal/zudoku/components/code-tabs.mdx +179 -0
- package/docs/dev-portal/zudoku/components/dialog.mdx +167 -0
- package/docs/dev-portal/zudoku/components/head.mdx +199 -0
- package/docs/dev-portal/zudoku/components/icons.mdx +27 -0
- package/docs/dev-portal/zudoku/components/input.mdx +96 -0
- package/docs/dev-portal/zudoku/components/label.mdx +86 -0
- package/docs/dev-portal/zudoku/components/link.mdx +242 -0
- package/docs/dev-portal/zudoku/components/markdown.mdx +151 -0
- package/docs/dev-portal/zudoku/components/mermaid.mdx +81 -0
- package/docs/dev-portal/zudoku/components/playground.mdx +87 -0
- package/docs/dev-portal/zudoku/components/secret.mdx +78 -0
- package/docs/dev-portal/zudoku/components/select.mdx +176 -0
- package/docs/dev-portal/zudoku/components/shadcn.mdx +73 -0
- package/docs/dev-portal/zudoku/components/slider.mdx +108 -0
- package/docs/dev-portal/zudoku/components/slot.mdx +119 -0
- package/docs/dev-portal/zudoku/components/stepper.mdx +138 -0
- package/docs/dev-portal/zudoku/components/switch.mdx +96 -0
- package/docs/dev-portal/zudoku/components/syntax-highlight.mdx +602 -0
- package/docs/dev-portal/zudoku/components/textarea.mdx +78 -0
- package/docs/dev-portal/zudoku/components/tooltip.mdx +195 -0
- package/docs/dev-portal/zudoku/components/typography.mdx +61 -0
- package/docs/dev-portal/zudoku/configuration/ai-assistants.md +64 -0
- package/docs/dev-portal/zudoku/configuration/api-catalog.md +108 -0
- package/docs/dev-portal/zudoku/configuration/api-reference.md +397 -0
- package/docs/dev-portal/zudoku/configuration/authentication-auth0.md +173 -0
- package/docs/dev-portal/zudoku/configuration/authentication-azure-ad.md +238 -0
- package/docs/dev-portal/zudoku/configuration/authentication-clerk.md +110 -0
- package/docs/dev-portal/zudoku/configuration/authentication-firebase.md +61 -0
- package/docs/dev-portal/zudoku/configuration/authentication-pingfederate.md +136 -0
- package/docs/dev-portal/zudoku/configuration/authentication-supabase.md +225 -0
- package/docs/dev-portal/zudoku/configuration/authentication.md +199 -0
- package/docs/dev-portal/zudoku/configuration/build-configuration.mdx +147 -0
- package/docs/dev-portal/zudoku/configuration/docs.md +282 -0
- package/docs/dev-portal/zudoku/configuration/footer.mdx +214 -0
- package/docs/dev-portal/zudoku/configuration/llms.md +89 -0
- package/docs/dev-portal/zudoku/configuration/navigation.mdx +408 -0
- package/docs/dev-portal/zudoku/configuration/overview.md +380 -0
- package/docs/dev-portal/zudoku/configuration/protected-routes.md +149 -0
- package/docs/dev-portal/zudoku/configuration/search.md +169 -0
- package/docs/dev-portal/zudoku/configuration/sentry.mdx +44 -0
- package/docs/dev-portal/zudoku/configuration/site.md +124 -0
- package/docs/dev-portal/zudoku/configuration/slots.mdx +124 -0
- package/docs/dev-portal/zudoku/configuration/vite-config.md +18 -0
- package/docs/dev-portal/zudoku/custom-plugins.md +287 -0
- package/docs/dev-portal/zudoku/customization/colors-theme.mdx +275 -0
- package/docs/dev-portal/zudoku/customization/fonts.md +110 -0
- package/docs/dev-portal/zudoku/extending/events.md +124 -0
- package/docs/dev-portal/zudoku/guides/custom-pages.md +106 -0
- package/docs/dev-portal/zudoku/guides/environment-variables.md +99 -0
- package/docs/dev-portal/zudoku/guides/mermaid.mdx +70 -0
- package/docs/dev-portal/zudoku/guides/navigation-migration.md +87 -0
- package/docs/dev-portal/zudoku/guides/navigation-rules.mdx +197 -0
- package/docs/dev-portal/zudoku/guides/processors.mdx +234 -0
- package/docs/dev-portal/zudoku/guides/static-files.md +55 -0
- package/docs/dev-portal/zudoku/guides/transforming-examples.md +156 -0
- package/docs/dev-portal/zudoku/guides/using-multiple-apis.md +87 -0
- package/docs/dev-portal/zudoku/markdown/admonitions.md +128 -0
- package/docs/dev-portal/zudoku/markdown/code-blocks.md +196 -0
- package/docs/dev-portal/zudoku/markdown/frontmatter.md +172 -0
- package/docs/dev-portal/zudoku/markdown/mdx.md +68 -0
- package/docs/dev-portal/zudoku/markdown/overview.md +275 -0
- package/docs/dev-portal/zudoku/plugins.md +5 -0
- package/docs/dev-portal/zudoku/writing.mdx +72 -0
- package/docs/errors/bad-request.mdx +39 -0
- package/docs/errors/build-error.mdx +45 -0
- package/docs/errors/fatal-project-error.mdx +39 -0
- package/docs/errors/gateway-timeout.mdx +33 -0
- package/docs/errors/get-head-body-error.mdx +41 -0
- package/docs/errors/main-mod-error.mdx +40 -0
- package/docs/errors/no-project-set.mdx +41 -0
- package/docs/errors/not-found.mdx +43 -0
- package/docs/errors/rate-limit-exceeded.mdx +31 -0
- package/docs/errors/schema-validation-failed.mdx +51 -0
- package/docs/errors/system-configuration-error.mdx +44 -0
- package/docs/errors/unauthorized.mdx +50 -0
- package/docs/errors/unknown-error.mdx +42 -0
- package/docs/errors.mdx +14 -0
- package/docs/guides/canary-routing-for-employees.mdx +385 -0
- package/docs/guides/geolocation-backend-routing.mdx +404 -0
- package/docs/guides/modify-openapi-paths.mdx +371 -0
- package/docs/guides/openapi-overlays.mdx +492 -0
- package/docs/guides/overview.mdx +12 -0
- package/docs/guides/user-based-backend-routing.mdx +437 -0
- package/docs/handlers/aws-lambda.mdx +201 -0
- package/docs/handlers/custom-handler.mdx +112 -0
- package/docs/handlers/legacy-dev-portal-handler.mdx +135 -0
- package/docs/handlers/mcp-server.mdx +730 -0
- package/docs/handlers/openapi.mdx +78 -0
- package/docs/handlers/redirect.mdx +115 -0
- package/docs/handlers/system-handlers.mdx +41 -0
- package/docs/handlers/url-forward.mdx +204 -0
- package/docs/handlers/url-rewrite.mdx +224 -0
- package/docs/handlers/websocket-handler.mdx +154 -0
- package/docs/home.mdx +6 -0
- package/docs/managed-edge/overview.md +78 -0
- package/docs/mcp-server/configuration-migration-guide.mdx +344 -0
- package/docs/mcp-server/custom-tools.mdx +487 -0
- package/docs/mcp-server/graphql.mdx +241 -0
- package/docs/mcp-server/introduction.mdx +122 -0
- package/docs/mcp-server/openai-apps-sdk.mdx +160 -0
- package/docs/mcp-server/prompts.mdx +283 -0
- package/docs/mcp-server/resources.mdx +288 -0
- package/docs/mcp-server/testing.mdx +53 -0
- package/docs/mcp-server/tools.mdx +306 -0
- package/docs/policies/_index.md +92 -0
- package/docs/policies/ab-test-inbound/intro.md +8 -0
- package/docs/policies/ab-test-inbound/policy.ts +14 -0
- package/docs/policies/ab-test-inbound/schema.json +27 -0
- package/docs/policies/ab-test-outbound/intro.md +8 -0
- package/docs/policies/ab-test-outbound/policy.ts +26 -0
- package/docs/policies/ab-test-outbound/schema.json +27 -0
- package/docs/policies/acl-policy-inbound/intro.md +5 -0
- package/docs/policies/acl-policy-inbound/policy.ts +32 -0
- package/docs/policies/acl-policy-inbound/schema.json +52 -0
- package/docs/policies/akamai-ai-firewall/schema.json +98 -0
- package/docs/policies/amberflo-metering-inbound/doc.md +183 -0
- package/docs/policies/amberflo-metering-inbound/intro.md +20 -0
- package/docs/policies/amberflo-metering-inbound/schema.json +108 -0
- package/docs/policies/api-key-inbound/doc.md +77 -0
- package/docs/policies/api-key-inbound/intro.md +30 -0
- package/docs/policies/api-key-inbound/schema.json +84 -0
- package/docs/policies/archive-request-aws-s3-inbound/intro.md +4 -0
- package/docs/policies/archive-request-aws-s3-inbound/policy.ts +58 -0
- package/docs/policies/archive-request-aws-s3-inbound/schema.json +68 -0
- package/docs/policies/archive-request-azure-storage-inbound/doc.md +31 -0
- package/docs/policies/archive-request-azure-storage-inbound/intro.md +4 -0
- package/docs/policies/archive-request-azure-storage-inbound/policy.ts +54 -0
- package/docs/policies/archive-request-azure-storage-inbound/schema.json +53 -0
- package/docs/policies/archive-request-gcp-storage-inbound/doc.md +63 -0
- package/docs/policies/archive-request-gcp-storage-inbound/intro.md +4 -0
- package/docs/policies/archive-request-gcp-storage-inbound/policy.ts +68 -0
- package/docs/policies/archive-request-gcp-storage-inbound/schema.json +47 -0
- package/docs/policies/archive-response-aws-s3-outbound/intro.md +2 -0
- package/docs/policies/archive-response-aws-s3-outbound/policy.ts +59 -0
- package/docs/policies/archive-response-aws-s3-outbound/schema.json +68 -0
- package/docs/policies/archive-response-azure-storage-outbound/doc.md +31 -0
- package/docs/policies/archive-response-azure-storage-outbound/intro.md +3 -0
- package/docs/policies/archive-response-azure-storage-outbound/policy.ts +54 -0
- package/docs/policies/archive-response-azure-storage-outbound/schema.json +53 -0
- package/docs/policies/audit-log-inbound/doc.md +78 -0
- package/docs/policies/audit-log-inbound/intro.md +10 -0
- package/docs/policies/audit-log-inbound/schema.json +81 -0
- package/docs/policies/auth0-jwt-auth-inbound/doc.md +125 -0
- package/docs/policies/auth0-jwt-auth-inbound/intro.md +17 -0
- package/docs/policies/auth0-jwt-auth-inbound/schema.json +74 -0
- package/docs/policies/authzen-inbound/doc.md +24 -0
- package/docs/policies/authzen-inbound/intro.md +31 -0
- package/docs/policies/authzen-inbound/schema.json +126 -0
- package/docs/policies/axiomatics-authz-inbound/doc.md +144 -0
- package/docs/policies/axiomatics-authz-inbound/intro.md +11 -0
- package/docs/policies/axiomatics-authz-inbound/schema.json +161 -0
- package/docs/policies/basic-auth-inbound/intro.md +9 -0
- package/docs/policies/basic-auth-inbound/schema.json +99 -0
- package/docs/policies/bot-detection-inbound/intro.md +4 -0
- package/docs/policies/bot-detection-inbound/schema.json +56 -0
- package/docs/policies/brownout-inbound/doc.md +55 -0
- package/docs/policies/brownout-inbound/intro.md +12 -0
- package/docs/policies/brownout-inbound/schema.json +115 -0
- package/docs/policies/caching-inbound/doc.md +209 -0
- package/docs/policies/caching-inbound/intro.md +23 -0
- package/docs/policies/caching-inbound/schema.json +98 -0
- package/docs/policies/change-method-inbound/schema.json +56 -0
- package/docs/policies/clear-headers-inbound/schema.json +59 -0
- package/docs/policies/clear-headers-outbound/schema.json +59 -0
- package/docs/policies/clerk-jwt-auth-inbound/doc.md +85 -0
- package/docs/policies/clerk-jwt-auth-inbound/intro.md +4 -0
- package/docs/policies/clerk-jwt-auth-inbound/schema.json +68 -0
- package/docs/policies/cognito-jwt-auth-inbound/intro.md +7 -0
- package/docs/policies/cognito-jwt-auth-inbound/schema.json +74 -0
- package/docs/policies/comet-opik-tracing-inbound/schema.json +65 -0
- package/docs/policies/complex-rate-limit-inbound/doc.md +20 -0
- package/docs/policies/complex-rate-limit-inbound/intro.md +23 -0
- package/docs/policies/complex-rate-limit-inbound/schema.json +142 -0
- package/docs/policies/composite-inbound/doc.md +69 -0
- package/docs/policies/composite-inbound/intro.md +15 -0
- package/docs/policies/composite-inbound/schema.json +59 -0
- package/docs/policies/composite-outbound/intro.md +6 -0
- package/docs/policies/composite-outbound/schema.json +59 -0
- package/docs/policies/curity-phantom-token-inbound/doc.md +109 -0
- package/docs/policies/curity-phantom-token-inbound/intro.md +3 -0
- package/docs/policies/curity-phantom-token-inbound/schema.json +68 -0
- package/docs/policies/custom-code-inbound/doc.md +267 -0
- package/docs/policies/custom-code-inbound/intro.md +2 -0
- package/docs/policies/custom-code-inbound/schema.json +48 -0
- package/docs/policies/custom-code-outbound/doc.md +235 -0
- package/docs/policies/custom-code-outbound/intro.md +2 -0
- package/docs/policies/custom-code-outbound/schema.json +43 -0
- package/docs/policies/firebase-jwt-inbound/intro.md +6 -0
- package/docs/policies/firebase-jwt-inbound/schema.json +68 -0
- package/docs/policies/formdata-to-json-inbound/schema.json +60 -0
- package/docs/policies/galileo-tracing-inbound/schema.json +65 -0
- package/docs/policies/geo-filter-inbound/doc.md +33 -0
- package/docs/policies/geo-filter-inbound/schema.json +108 -0
- package/docs/policies/graphql-complexity-limit-inbound/doc.md +48 -0
- package/docs/policies/graphql-complexity-limit-inbound/intro.md +2 -0
- package/docs/policies/graphql-complexity-limit-inbound/schema.json +90 -0
- package/docs/policies/graphql-disable-introspection-inbound/doc.md +66 -0
- package/docs/policies/graphql-disable-introspection-inbound/intro.md +15 -0
- package/docs/policies/graphql-disable-introspection-inbound/schema.json +48 -0
- package/docs/policies/graphql-introspection-filter-outbound/doc.md +148 -0
- package/docs/policies/graphql-introspection-filter-outbound/schema.json +79 -0
- package/docs/policies/hmac-auth-inbound/doc.md +30 -0
- package/docs/policies/hmac-auth-inbound/intro.md +10 -0
- package/docs/policies/hmac-auth-inbound/policy.ts +70 -0
- package/docs/policies/hmac-auth-inbound/schema.json +53 -0
- package/docs/policies/http-deprecation-outbound/doc.md +73 -0
- package/docs/policies/http-deprecation-outbound/schema.json +83 -0
- package/docs/policies/ip-restriction-inbound/intro.md +8 -0
- package/docs/policies/ip-restriction-inbound/policy.ts +40 -0
- package/docs/policies/ip-restriction-inbound/schema.json +58 -0
- package/docs/policies/jwt-scopes-inbound/schema.json +59 -0
- package/docs/policies/ldap-auth-inbound/schema.json +56 -0
- package/docs/policies/mock-api-inbound/schema.json +72 -0
- package/docs/policies/moesif-inbound/doc.md +44 -0
- package/docs/policies/moesif-inbound/intro.md +6 -0
- package/docs/policies/moesif-inbound/schema.json +68 -0
- package/docs/policies/monetization-inbound/doc.md +87 -0
- package/docs/policies/monetization-inbound/intro.md +6 -0
- package/docs/policies/monetization-inbound/schema.json +102 -0
- package/docs/policies/mtls-auth-inbound/intro.md +6 -0
- package/docs/policies/mtls-auth-inbound/schema.json +68 -0
- package/docs/policies/okta-fga-authz-inbound/doc.md +181 -0
- package/docs/policies/okta-fga-authz-inbound/intro.md +20 -0
- package/docs/policies/okta-fga-authz-inbound/schema.json +104 -0
- package/docs/policies/okta-jwt-auth-inbound/intro.md +7 -0
- package/docs/policies/okta-jwt-auth-inbound/schema.json +74 -0
- package/docs/policies/open-id-jwt-auth-inbound/doc.md +58 -0
- package/docs/policies/open-id-jwt-auth-inbound/intro.md +30 -0
- package/docs/policies/open-id-jwt-auth-inbound/schema.json +128 -0
- package/docs/policies/openfga-authz-inbound/doc.md +207 -0
- package/docs/policies/openfga-authz-inbound/intro.md +17 -0
- package/docs/policies/openfga-authz-inbound/schema.json +191 -0
- package/docs/policies/openmeter-inbound/doc.md +163 -0
- package/docs/policies/openmeter-inbound/intro.md +18 -0
- package/docs/policies/openmeter-inbound/schema.json +183 -0
- package/docs/policies/prompt-injection-outbound/doc.md +106 -0
- package/docs/policies/prompt-injection-outbound/intro.md +4 -0
- package/docs/policies/prompt-injection-outbound/schema.json +74 -0
- package/docs/policies/propel-auth-jwt-inbound/doc.md +88 -0
- package/docs/policies/propel-auth-jwt-inbound/intro.md +4 -0
- package/docs/policies/propel-auth-jwt-inbound/schema.json +74 -0
- package/docs/policies/query-param-to-header-inbound/doc.md +70 -0
- package/docs/policies/query-param-to-header-inbound/intro.md +5 -0
- package/docs/policies/query-param-to-header-inbound/schema.json +74 -0
- package/docs/policies/quota-inbound/doc.md +235 -0
- package/docs/policies/quota-inbound/intro.md +7 -0
- package/docs/policies/quota-inbound/schema.json +133 -0
- package/docs/policies/rate-limit-inbound/doc.md +78 -0
- package/docs/policies/rate-limit-inbound/intro.md +30 -0
- package/docs/policies/rate-limit-inbound/schema.json +134 -0
- package/docs/policies/rbac-policy-inbound/intro.md +3 -0
- package/docs/policies/rbac-policy-inbound/policy.ts +42 -0
- package/docs/policies/rbac-policy-inbound/schema.json +52 -0
- package/docs/policies/readme-metrics-inbound/doc.md +1 -0
- package/docs/policies/readme-metrics-inbound/intro.md +3 -0
- package/docs/policies/readme-metrics-inbound/schema.json +84 -0
- package/docs/policies/remove-headers-inbound/schema.json +59 -0
- package/docs/policies/remove-headers-outbound/schema.json +59 -0
- package/docs/policies/remove-query-params-inbound/schema.json +59 -0
- package/docs/policies/replace-string-outbound/schema.json +69 -0
- package/docs/policies/request-size-limit-inbound/schema.json +60 -0
- package/docs/policies/request-validation-inbound/doc.md +72 -0
- package/docs/policies/request-validation-inbound/intro.md +24 -0
- package/docs/policies/request-validation-inbound/schema.json +98 -0
- package/docs/policies/require-origin-inbound/intro.md +12 -0
- package/docs/policies/require-origin-inbound/schema.json +65 -0
- package/docs/policies/secret-masking-outbound/doc.md +41 -0
- package/docs/policies/secret-masking-outbound/intro.md +13 -0
- package/docs/policies/secret-masking-outbound/schema.json +65 -0
- package/docs/policies/semantic-cache-inbound/doc.md +63 -0
- package/docs/policies/semantic-cache-inbound/intro.md +4 -0
- package/docs/policies/semantic-cache-inbound/schema.json +179 -0
- package/docs/policies/set-body-inbound/intro.md +7 -0
- package/docs/policies/set-body-inbound/schema.json +56 -0
- package/docs/policies/set-headers-inbound/doc.md +41 -0
- package/docs/policies/set-headers-inbound/intro.md +2 -0
- package/docs/policies/set-headers-inbound/schema.json +83 -0
- package/docs/policies/set-headers-outbound/schema.json +83 -0
- package/docs/policies/set-query-params-inbound/schema.json +83 -0
- package/docs/policies/set-status-outbound/schema.json +62 -0
- package/docs/policies/sleep-inbound/schema.json +56 -0
- package/docs/policies/stripe-webhook-verification-inbound/intro.md +2 -0
- package/docs/policies/stripe-webhook-verification-inbound/schema.json +60 -0
- package/docs/policies/supabase-jwt-auth-inbound/doc.md +29 -0
- package/docs/policies/supabase-jwt-auth-inbound/intro.md +12 -0
- package/docs/policies/supabase-jwt-auth-inbound/schema.json +86 -0
- package/docs/policies/transform-body-inbound/intro.md +8 -0
- package/docs/policies/transform-body-inbound/policy.ts +16 -0
- package/docs/policies/transform-body-inbound/schema.json +27 -0
- package/docs/policies/transform-body-outbound/intro.md +8 -0
- package/docs/policies/transform-body-outbound/policy.ts +19 -0
- package/docs/policies/transform-body-outbound/schema.json +27 -0
- package/docs/policies/upstream-azure-ad-service-auth-inbound/doc.md +82 -0
- package/docs/policies/upstream-azure-ad-service-auth-inbound/intro.md +20 -0
- package/docs/policies/upstream-azure-ad-service-auth-inbound/schema.json +84 -0
- package/docs/policies/upstream-firebase-admin-auth-inbound/intro.md +10 -0
- package/docs/policies/upstream-firebase-admin-auth-inbound/schema.json +68 -0
- package/docs/policies/upstream-firebase-user-auth-inbound/intro.md +2 -0
- package/docs/policies/upstream-firebase-user-auth-inbound/schema.json +113 -0
- package/docs/policies/upstream-gcp-federated-auth-inbound/doc.md +139 -0
- package/docs/policies/upstream-gcp-federated-auth-inbound/intro.md +21 -0
- package/docs/policies/upstream-gcp-federated-auth-inbound/schema.json +96 -0
- package/docs/policies/upstream-gcp-jwt-inbound/intro.md +10 -0
- package/docs/policies/upstream-gcp-jwt-inbound/schema.json +62 -0
- package/docs/policies/upstream-gcp-service-auth-inbound/doc.md +132 -0
- package/docs/policies/upstream-gcp-service-auth-inbound/intro.md +25 -0
- package/docs/policies/upstream-gcp-service-auth-inbound/schema.json +95 -0
- package/docs/policies/upstream-zuplo-jwt-auth-inbound/doc.md +213 -0
- package/docs/policies/upstream-zuplo-jwt-auth-inbound/intro.md +16 -0
- package/docs/policies/upstream-zuplo-jwt-auth-inbound/schema.json +101 -0
- package/docs/policies/validate-json-schema-inbound/doc.md +129 -0
- package/docs/policies/validate-json-schema-inbound/intro.md +7 -0
- package/docs/policies/validate-json-schema-inbound/schema.json +56 -0
- package/docs/policies/web-bot-auth-inbound/doc.md +104 -0
- package/docs/policies/web-bot-auth-inbound/intro.md +16 -0
- package/docs/policies/web-bot-auth-inbound/schema.json +76 -0
- package/docs/policies/xml-to-json-outbound/doc.md +71 -0
- package/docs/policies/xml-to-json-outbound/intro.md +4 -0
- package/docs/policies/xml-to-json-outbound/schema.json +117 -0
- package/docs/programmable-api/audit-log.mdx +74 -0
- package/docs/programmable-api/background-dispatcher.mdx +124 -0
- package/docs/programmable-api/background-loader.mdx +104 -0
- package/docs/programmable-api/cache.mdx +186 -0
- package/docs/programmable-api/compatibility-dates.mdx +201 -0
- package/docs/programmable-api/console-logging.mdx +48 -0
- package/docs/programmable-api/context-data.mdx +127 -0
- package/docs/programmable-api/custom-cors-policy.mdx +64 -0
- package/docs/programmable-api/environment.mdx +328 -0
- package/docs/programmable-api/hooks.mdx +569 -0
- package/docs/programmable-api/http-problems.mdx +385 -0
- package/docs/programmable-api/jwt-service-plugin.mdx +420 -0
- package/docs/programmable-api/logger.mdx +223 -0
- package/docs/programmable-api/memory-zone-read-through-cache.mdx +96 -0
- package/docs/programmable-api/node-modules.mdx +67 -0
- package/docs/programmable-api/not-found-handler.mdx +47 -0
- package/docs/programmable-api/oauth-protected-resource-plugin.mdx +46 -0
- package/docs/programmable-api/overview.mdx +213 -0
- package/docs/programmable-api/problem-response-formatter.mdx +183 -0
- package/docs/programmable-api/request-user.mdx +289 -0
- package/docs/programmable-api/reusing-code.mdx +26 -0
- package/docs/programmable-api/route-raw.mdx +55 -0
- package/docs/programmable-api/runtime-behaviors.mdx +25 -0
- package/docs/programmable-api/runtime-errors.mdx +246 -0
- package/docs/programmable-api/runtime-extensions.mdx +340 -0
- package/docs/programmable-api/safely-clone-a-request-or-response.mdx +57 -0
- package/docs/programmable-api/streaming-zone-cache.mdx +155 -0
- package/docs/programmable-api/web-crypto-apis.mdx +219 -0
- package/docs/programmable-api/web-standard-apis.mdx +109 -0
- package/docs/programmable-api/zone-cache.mdx +131 -0
- package/docs/programmable-api/zp-body-removed.mdx +32 -0
- package/docs/programmable-api/zuplo-context.mdx +414 -0
- package/docs/programmable-api/zuplo-id-token.mdx +90 -0
- package/docs/programmable-api/zuplo-json.mdx +91 -0
- package/docs/programmable-api/zuplo-request.mdx +200 -0
- package/docs/sample-apis.mdx +78 -0
- package/docs/self-hosted/overview.md +60 -0
- package/package.json +6 -5
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MCP Server Tools
|
|
3
|
+
sidebar_label: Tools
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The MCP (Model Context Protocol) Server handler supports tools, enabling you to
|
|
7
|
+
expose your API routes as executable functions that AI clients can call to
|
|
8
|
+
perform actions or retrieve data.
|
|
9
|
+
|
|
10
|
+
Tools are the core building block of MCP servers, allowing AI systems to
|
|
11
|
+
interact with your services and discover capabilities through your Zuplo
|
|
12
|
+
gateway.
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Zuplo's MCP tools work by automatically transforming your API routes into MCP
|
|
17
|
+
tool definitions. When an AI client calls a tool, the MCP server invokes the
|
|
18
|
+
corresponding route handler in your gateway.
|
|
19
|
+
|
|
20
|
+
This means any existing API route can be instantly turned into an MCP tool with
|
|
21
|
+
minimal configuration.
|
|
22
|
+
|
|
23
|
+
## Configuration
|
|
24
|
+
|
|
25
|
+
### Route Configuration
|
|
26
|
+
|
|
27
|
+
Configure a route in your OpenAPI doc:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"/weather/current": {
|
|
32
|
+
"get": {
|
|
33
|
+
"operationId": "getCurrentWeather",
|
|
34
|
+
"summary": "Get current weather",
|
|
35
|
+
"description": "Retrieve current weather conditions for a specified location",
|
|
36
|
+
"parameters": [
|
|
37
|
+
{
|
|
38
|
+
"name": "location",
|
|
39
|
+
"in": "query",
|
|
40
|
+
"required": true,
|
|
41
|
+
"schema": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"x-zuplo-route": {
|
|
47
|
+
"corsPolicy": "none",
|
|
48
|
+
"handler": {
|
|
49
|
+
"export": "default",
|
|
50
|
+
"module": "$import(./modules/weather)"
|
|
51
|
+
},
|
|
52
|
+
"mcp": {
|
|
53
|
+
"type": "tool",
|
|
54
|
+
"name": "get_current_weather",
|
|
55
|
+
"description": "Retrieve current weather conditions for a specified location"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
To provide MCP specific metadata for the tool, use the `mcp` property within
|
|
64
|
+
`x-zuplo-route`:
|
|
65
|
+
|
|
66
|
+
The `x-zuplo-route.mcp` configuration for tools supports:
|
|
67
|
+
|
|
68
|
+
- `type` (`string`: optional, defaults to `tool`) - Set to `"tool"` to denote
|
|
69
|
+
this operation is an MCP tool.
|
|
70
|
+
- `name` (`string`: optional) - The identifier for the MCP tool. Defaults to the
|
|
71
|
+
operation's `operationId`. If the `operationId` is not set, falls back to an
|
|
72
|
+
auto-generated name.
|
|
73
|
+
- `description` (`string`: optional) - Description of what the tool does. Falls
|
|
74
|
+
back to the operation's `description` or `summary`. If the route's
|
|
75
|
+
`description` or `summary` fields are not set, falls back to an auto-generated
|
|
76
|
+
description.
|
|
77
|
+
- `enabled` (`boolean`: optional) - Whether this tool is enabled. Defaults to
|
|
78
|
+
`true`.
|
|
79
|
+
- `annotations` (`object`: optional) - An object containing tool annotations:
|
|
80
|
+
- `title` (`string`: optional) - A human-readable title for the tool, often
|
|
81
|
+
used by clients.
|
|
82
|
+
- `readOnlyHint` (`boolean`: optional) - Hint that the tool is read-only.
|
|
83
|
+
- `destructiveHint` (`boolean`: optional) - Hint that the tool has mutating
|
|
84
|
+
side effects.
|
|
85
|
+
- `idempotentHint` (`boolean`: optional) - Hint that the tool is idempotent.
|
|
86
|
+
- `openWorldHint` (`boolean`: optional) - Hint that the tool operates in an
|
|
87
|
+
open-world context of external entities (like web-search).
|
|
88
|
+
- `_meta` (`object`: optional) - An object containing any arbitrary metadata.
|
|
89
|
+
|
|
90
|
+
The route handler for your tool can be any standard Zuplo request handler like
|
|
91
|
+
[the URL Forwarder](../handlers/url-forward.mdx) or
|
|
92
|
+
[the Redirect handler](../handlers/redirect.mdx) or a
|
|
93
|
+
[custom function module](../handlers/custom-handler.mdx). The route receives the
|
|
94
|
+
request triggered by the MCP tool call within the gateway and returns a response
|
|
95
|
+
that will be passed back through the MCP server to the AI client.
|
|
96
|
+
|
|
97
|
+
:::tip
|
|
98
|
+
|
|
99
|
+
`POST` routes with a `requestBody` and a defined `schema` are translated into an
|
|
100
|
+
MCP tool's parameters. When invoked, these are validated by the MCP server to
|
|
101
|
+
ensure the tool is being correctly used by the LLM.
|
|
102
|
+
|
|
103
|
+
Other methods like `GET`, `DELETE`, etc. work in a similar fashion in order to
|
|
104
|
+
support complex tools in the shape of your APIs.
|
|
105
|
+
|
|
106
|
+
:::
|
|
107
|
+
|
|
108
|
+
### MCP Server Handler Configuration
|
|
109
|
+
|
|
110
|
+
Add tool configuration to your MCP Server handler options using the `operations`
|
|
111
|
+
array:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"paths": {
|
|
116
|
+
"/mcp": {
|
|
117
|
+
"post": {
|
|
118
|
+
"x-zuplo-route": {
|
|
119
|
+
"handler": {
|
|
120
|
+
"export": "mcpServerHandler",
|
|
121
|
+
"module": "$import(@zuplo/runtime)",
|
|
122
|
+
"options": {
|
|
123
|
+
"name": "example-mcp-server",
|
|
124
|
+
"version": "1.0.0",
|
|
125
|
+
"operations": [
|
|
126
|
+
{
|
|
127
|
+
"file": "./config/routes.oas.json",
|
|
128
|
+
"id": "getCurrentWeather"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
See further details in the
|
|
141
|
+
[MCP Server Handler documentation](../handlers/mcp-server.mdx).
|
|
142
|
+
|
|
143
|
+
## Testing MCP Tools
|
|
144
|
+
|
|
145
|
+
### List Available Tools
|
|
146
|
+
|
|
147
|
+
Use the MCP `tools/list` method to see available tools:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
curl https://my-gateway.zuplo.dev/mcp \
|
|
151
|
+
-X POST \
|
|
152
|
+
-H 'accept: application/json, text/event-stream' \
|
|
153
|
+
-d '{
|
|
154
|
+
"jsonrpc": "2.0",
|
|
155
|
+
"id": "1",
|
|
156
|
+
"method": "tools/list"
|
|
157
|
+
}'
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Response:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"jsonrpc": "2.0",
|
|
165
|
+
"id": "1",
|
|
166
|
+
"result": {
|
|
167
|
+
"tools": [
|
|
168
|
+
{
|
|
169
|
+
"name": "get_current_weather",
|
|
170
|
+
"description": "Retrieve current weather conditions for a specified location",
|
|
171
|
+
"inputSchema": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"properties": {
|
|
174
|
+
"location": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": ["location"]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Call a Tool
|
|
187
|
+
|
|
188
|
+
Use the MCP `tools/call` method to execute a tool:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
curl https://my-gateway.zuplo.dev/mcp \
|
|
192
|
+
-X POST \
|
|
193
|
+
-H 'accept: application/json, text/event-stream' \
|
|
194
|
+
-d '{
|
|
195
|
+
"jsonrpc": "2.0",
|
|
196
|
+
"id": "1",
|
|
197
|
+
"method": "tools/call",
|
|
198
|
+
"params": {
|
|
199
|
+
"name": "get_current_weather",
|
|
200
|
+
"arguments": {
|
|
201
|
+
"location": "San Francisco"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Response:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"jsonrpc": "2.0",
|
|
212
|
+
"id": "1",
|
|
213
|
+
"result": {
|
|
214
|
+
"content": [
|
|
215
|
+
{
|
|
216
|
+
"type": "text",
|
|
217
|
+
"text": "{\"location\":\"San Francisco\",\"temperature\":72,\"condition\":\"Sunny\"}"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Best Practices
|
|
225
|
+
|
|
226
|
+
### Meaningful Names and Descriptions
|
|
227
|
+
|
|
228
|
+
Always set meaningful `operationId`s (like `get_users`, `create_new_deployment`,
|
|
229
|
+
or `update_shopping_cart`) and descriptions as these help LLMs understand
|
|
230
|
+
exactly _what_ each tool does.
|
|
231
|
+
|
|
232
|
+
When you need to provide more meaningful descriptions or names that don't align
|
|
233
|
+
well with the `operationId`, set the metadata in `x-zuplo-route.mcp`.
|
|
234
|
+
|
|
235
|
+
:::tip
|
|
236
|
+
|
|
237
|
+
Read more about authoring usable tools and good prompt engineering practices
|
|
238
|
+
with
|
|
239
|
+
[Anthropic's Prompt engineering overview](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview).
|
|
240
|
+
|
|
241
|
+
:::
|
|
242
|
+
|
|
243
|
+
AI models rely heavily on tool descriptions to understand when and how to use a
|
|
244
|
+
tool.
|
|
245
|
+
|
|
246
|
+
- **Be Descriptive**: Explain exactly what the tool does and what inputs it
|
|
247
|
+
expects.
|
|
248
|
+
- **Use Meaningful Names**: Operation IDs like `create_user` or
|
|
249
|
+
`search_products` are much better than `op1` or `endpoint`.
|
|
250
|
+
|
|
251
|
+
### Schema Design
|
|
252
|
+
|
|
253
|
+
Use descriptive and well-structured JSON schemas for your tools (in your OpenAPI
|
|
254
|
+
`requestBody` and `response`). This is used by the server to validate MCP client
|
|
255
|
+
inputs (that is, JSON generated by an LLM). Providing descriptive schemas
|
|
256
|
+
ensures an MCP Client's LLM always has the appropriate context on exactly what
|
|
257
|
+
arguments to provide to tools and can dramatically reduce invalid tool usage.
|
|
258
|
+
This validation is done automatically.
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
// Good! Uses descriptive names and specific types with limiters and formats.
|
|
262
|
+
{
|
|
263
|
+
"type": "object",
|
|
264
|
+
"required": ["userId"],
|
|
265
|
+
"properties": {
|
|
266
|
+
"userId": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"format": "uuid",
|
|
269
|
+
"description": "Valid UUID for user ID"
|
|
270
|
+
},
|
|
271
|
+
"amount": {
|
|
272
|
+
"type": "number",
|
|
273
|
+
"minimum": 0,
|
|
274
|
+
"maximum": 10000,
|
|
275
|
+
"description": "Amount in cents"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
```json
|
|
282
|
+
// Bad! Confusing. What's "a"? What's "b"? An LLM won't understand this.
|
|
283
|
+
{
|
|
284
|
+
"type": "object",
|
|
285
|
+
"required": ["userId"],
|
|
286
|
+
"properties": {
|
|
287
|
+
"a": {
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"b": {
|
|
291
|
+
"type": "number"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Defining clear schemas in your OpenAPI document ensures your handler always
|
|
298
|
+
receives valid data. The MCP server uses these schemas to validate arguments
|
|
299
|
+
provided by the AI client _before_ your handler is ever called. Input validation
|
|
300
|
+
is an important part of MCP, so ensure you have strong validation in your
|
|
301
|
+
OpenAPI JSON schemas!
|
|
302
|
+
|
|
303
|
+
### Custom Tools
|
|
304
|
+
|
|
305
|
+
For complex workflows that don't map 1:1 to a single API route, or require
|
|
306
|
+
advanced logic, consider using [Custom MCP Tools](./custom-tools.mdx).
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Zuplo Policies
|
|
2
|
+
|
|
3
|
+
| Policy ID | Name | Description | Products |
|
|
4
|
+
| --- | --- | --- | --- |
|
|
5
|
+
| ab-test-inbound | A/B Test Inbound | An A/B test policy is used to handle requests differently based on parameters such as user, ip, etc. | api-gateway |
|
|
6
|
+
| ab-test-outbound | A/B Test Outbound | An A/B test policy is used to handle responses differently based on parameters such as user, ip, etc. | api-gateway |
|
|
7
|
+
| acl-policy-inbound | Access Control List | The access control list inbound policy limits access to resources based on parameters on the authenticated user. | api-gateway |
|
|
8
|
+
| set-query-params-inbound | Add or Set Query Parameters | Adds or sets query parameters on the incoming request. | api-gateway |
|
|
9
|
+
| set-headers-inbound | Add or Set Request Headers | Adds or sets headers on the incoming request. | api-gateway |
|
|
10
|
+
| akamai-ai-firewall | Akamai AI Firewall | Akamai AI Firewall Inbound Policy | ai-gateway |
|
|
11
|
+
| amberflo-metering-inbound | Amberflo Metering / Billing | Amberflo is a usage metering and billing service. This policy allows you to send metering calls for each API to their meter ingest endpoint. | api-gateway |
|
|
12
|
+
| api-key-inbound | API Key Authentication | Authenticates requests based on API Keys using Zuplo's built-in API key management. This policy validates API keys against Zuplo's key storage, caches results for performance, and automatically adds user information to authenticated requests. | api-gateway |
|
|
13
|
+
| archive-request-aws-s3-inbound | Archive Request to AWS S3 | Archive the incoming request body to AWS S3 storage | api-gateway |
|
|
14
|
+
| archive-request-azure-storage-inbound | Archive Request to Azure Storage | Archive the incoming request to Azure blob storage. | api-gateway |
|
|
15
|
+
| archive-request-gcp-storage-inbound | Archive Request to GCP Storage | Archive the incoming request to Google Cloud Storage. | api-gateway |
|
|
16
|
+
| archive-response-aws-s3-outbound | Archive Response to AWS S3 | Archive the outgoing response body to AWS S3 storage | api-gateway |
|
|
17
|
+
| archive-response-azure-storage-outbound | Archive Response to Azure Storage | Archive the outgoing response to Azure blob storage. | api-gateway |
|
|
18
|
+
| audit-log-inbound | Audit Logs | Capture detailed logs of requests for auditing purposes. | api-gateway |
|
|
19
|
+
| auth0-jwt-auth-inbound | Auth0 JWT Auth | Authenticate users using Auth0 issued JWT tokens. | api-gateway |
|
|
20
|
+
| authzen-inbound | AuthZEN Authorization | Authorize requests using an AuthZEN compatible PDP | api-gateway |
|
|
21
|
+
| cognito-jwt-auth-inbound | AWS Cognito JWT Auth | Authenticate requests with JWT tokens issued by AWS Cognito. | api-gateway |
|
|
22
|
+
| axiomatics-authz-inbound | Axiomatics Authorization | Authorize requests using Axiomatics Policy Server. | api-gateway |
|
|
23
|
+
| basic-auth-inbound | Basic Auth | Authenticate requests using basic auth (i.e. username and password) | api-gateway |
|
|
24
|
+
| bot-detection-inbound | Bot Detection | Detect known and suspected bots based on sophisticated traffic analysis. | api-gateway |
|
|
25
|
+
| brownout-inbound | Brown Out | The brownout policy allows performing scheduled downtime on your API | api-gateway |
|
|
26
|
+
| caching-inbound | Caching | Respond to matched incoming requests with cached content | api-gateway |
|
|
27
|
+
| change-method-inbound | Change Method | Changes the HTTP method of the incoming request. | api-gateway |
|
|
28
|
+
| clear-headers-inbound | Clear Request Headers | Removes all headers from the incoming request except for those in the exclude list. | api-gateway |
|
|
29
|
+
| clear-headers-outbound | Clear Response Headers | Removes all headers from the response except for those in the exclude list. | api-gateway |
|
|
30
|
+
| clerk-jwt-auth-inbound | Clerk JWT Auth | Authenticate users using Clerk issued JWT tokens. | api-gateway |
|
|
31
|
+
| comet-opik-tracing-inbound | Comet Opik Tracing | Comet Opik Tracing Inbound Policy | ai-gateway |
|
|
32
|
+
| complex-rate-limit-inbound | Complex Rate Limiting | The Complex Rate Limiting policy is an advanced rate limiting policy that let's you set rate limits based on custom counters (not just requests) | api-gateway |
|
|
33
|
+
| composite-inbound | Composite Inbound (Group Policies) | Creates a composite, or group policy - composed of other inbound policies. For reuse across routes. | api-gateway |
|
|
34
|
+
| composite-outbound | Composite Outbound (Group Policies) | Creates a composite, or group policy - composed of other outbound policies. For reuse across routes. | api-gateway |
|
|
35
|
+
| curity-phantom-token-inbound | Curity Phantom Token Auth | Authenticate users using the Curity Phantom Token Pattern. | api-gateway |
|
|
36
|
+
| custom-code-inbound | Custom Code Inbound | Enables a custom code policy written in TypeScript. Change YOUR_MODULE to the name of your module (without .ts extension) | api-gateway |
|
|
37
|
+
| custom-code-outbound | Custom Code Outbound | A custom outbound response policy. | api-gateway |
|
|
38
|
+
| firebase-jwt-inbound | Firebase JWT Auth | Authenticate users using Firebase issued JWT tokens. | api-gateway |
|
|
39
|
+
| formdata-to-json-inbound | Form Data to JSON | Converts form data in the incoming request to JSON. | api-gateway |
|
|
40
|
+
| galileo-tracing-inbound | Galileo Tracing | Galileo Tracing Inbound Policy | ai-gateway |
|
|
41
|
+
| geo-filter-inbound | Geo-location filtering | Block requests based on geo-location parameters: country, region code, and ASN | api-gateway |
|
|
42
|
+
| graphql-complexity-limit-inbound | GraphQL Complexity Limit | Policy that limits the complexity and depth of GraphQL queries to prevent abuse. Protects your GraphQL API from expensive queries that could cause performance issues or denial of service attacks. | api-gateway |
|
|
43
|
+
| graphql-disable-introspection-inbound | GraphQL Disable Introspection | Policy that disables GraphQL introspection queries in production. Introspection allows clients to discover the schema, which can be a security risk as it exposes your entire API structure. | api-gateway |
|
|
44
|
+
| graphql-introspection-filter-outbound | GraphQL Introspection Filter | Filters GraphQL introspection responses to exclude specific types and fields. This policy intercepts GraphQL introspection query responses and removes configured types and fields from the schema. Useful for hiding internal types or sensitive fields from the public schema. | api-gateway |
|
|
45
|
+
| hmac-auth-inbound | HMAC Auth | Authenticate requests using the HMAC-SHA256 authentication scheme. | api-gateway |
|
|
46
|
+
| http-deprecation-outbound | HTTP Deprecation | Sets HTTP deprecation headers on the outgoing response following the IETF HTTP Deprecation Header standard. Supports the Deprecation, Sunset, and Link headers. | api-gateway |
|
|
47
|
+
| ip-restriction-inbound | IP Restriction | Block or allow requests based on their IP address. | api-gateway |
|
|
48
|
+
| validate-json-schema-inbound | JSON Body Validation (deprecated) | Validates the body of an incoming request based on a JSON schema. | api-gateway |
|
|
49
|
+
| open-id-jwt-auth-inbound | JWT Auth | The Open ID JWT Authentication policy allows you to authenticate incoming requests using an Open ID compliant bearer token. | api-gateway |
|
|
50
|
+
| jwt-scopes-inbound | JWT Scope Validation | Validates that the JWT token includes specific scopes | api-gateway |
|
|
51
|
+
| ldap-auth-inbound | LDAP Auth | Authenticate requests using an LDAP server. | api-gateway |
|
|
52
|
+
| mock-api-inbound | Mock API Response | Returns example responses from the OpenAPI document associated with this route. | api-gateway |
|
|
53
|
+
| moesif-inbound | Moesif Analytics & Billing | Moesif is an API analytics and billing service. This policy allows you to send metering calls for each API to their events batch endpoint. | api-gateway |
|
|
54
|
+
| monetization-inbound | Monetization | Monetization inbound policy for API key validation and usage metering. | api-gateway |
|
|
55
|
+
| mtls-auth-inbound | mTLS Auth | Authenticate requests based on the mTLS protocol. | api-gateway |
|
|
56
|
+
| okta-fga-authz-inbound | Okta FGA Authorization | Authorize requests using Okta FGA. | api-gateway |
|
|
57
|
+
| okta-jwt-auth-inbound | Okta JWT Auth | Authenticate users using Okta issued JWT tokens. | api-gateway |
|
|
58
|
+
| openfga-authz-inbound | OpenFGA Authorization | Authorize requests using OpenFGA. | api-gateway |
|
|
59
|
+
| openmeter-inbound | OpenMeter | OpenMeter is a usage metering service. This policy allows you to send metering calls for each API to their event ingest endpoint. It also supports entitlement checking to verify if a subject has access to a feature. | api-gateway |
|
|
60
|
+
| prompt-injection-outbound | Prompt Injection Detection | Uses an LLM agent to detect prompt injection attempts in user provided content or potentially poisoned response bodies. This is primarily intended to be used with downstream LLM agents who are at risk of having prompt injection attacks executed against them. | api-gateway |
|
|
61
|
+
| propel-auth-jwt-inbound | PropelAuth JWT Auth | Authenticate users using PropelAuth issued JWT tokens. | api-gateway |
|
|
62
|
+
| query-param-to-header-inbound | Query Parameter to Header | Extracts a query parameter and sets it as a header in the request. | api-gateway |
|
|
63
|
+
| quota-inbound | Quota | The Quota policy enables you to set monthly, weekly, daily or hourly quotas on your API. | api-gateway |
|
|
64
|
+
| rate-limit-inbound | Rate Limiting | Rate limiting policy to control the number of requests to your API. Supports multiple identification strategies (by user, IP, header, etc.) and can operate in strict or async mode for different performance characteristics. | api-gateway |
|
|
65
|
+
| rbac-policy-inbound | RBAC Authorization | The RBAC authorization inbound policy limits access to resources based on the roles of the authenticated user. | api-gateway |
|
|
66
|
+
| readme-metrics-inbound | Readme Metrics | Readme is a developer documentation and API metrics company. This policy pushes logs to their API calls dashboard. | api-gateway |
|
|
67
|
+
| remove-query-params-inbound | Remove Query Parameters | Remove query parameters from the incoming request | api-gateway |
|
|
68
|
+
| remove-headers-inbound | Remove Request Headers | Remove headers from the incoming request. | api-gateway |
|
|
69
|
+
| remove-headers-outbound | Remove Response Headers | Remove configured headers from the outgoing response. | api-gateway |
|
|
70
|
+
| replace-string-outbound | Replace String in Response Body | Replace a string in the incoming request body | api-gateway |
|
|
71
|
+
| request-size-limit-inbound | Request Size Limit | Enforces a maximum size in bytes of the incoming request. | api-gateway |
|
|
72
|
+
| request-validation-inbound | Request Validation | Validates incoming requests against your OpenAPI specification. Checks query parameters, path parameters, headers, and request body to ensure they match the defined schema before processing. | api-gateway |
|
|
73
|
+
| require-origin-inbound | Require Origin | Sets an allow-list for an origin header | api-gateway |
|
|
74
|
+
| secret-masking-outbound | Secret Masking | Masks common secrets like Zuplo API keys, GitHub tokens, or SSH private key in the response body. | api-gateway |
|
|
75
|
+
| semantic-cache-inbound | Semantic Cache | Respond to matched incoming requests with semantically cached content The Semantic Cache Inbound policy caches responses based on semantic similarity of cache keys rather than exact matches. This allows for more flexible caching where similar requests can return cached responses even if the cache key is not exactly the same. The policy uses Large Language Model (LLM) embeddings to determine semantic similarity between cache keys based on a configurable similarity tolerance. Options: - semanticTolerance: The semantic similarity threshold for semantic cache matches (0-1, default: 0.2). Values closer to 0 require higher similarity. Can be overridden by custom functions. - expirationSecondsTtl: The timeout of the cache in seconds (default: 3600, 1 hour). Can be overridden by custom functions. - namespace: Optional namespace to isolate cache entries (default: "default"). Useful for multi-tenant scenarios or different cache contexts. - cacheBy: Determines how cache keys are generated: 'function' for custom logic or 'propertyPath' to extract from JSON body. | api-gateway |
|
|
76
|
+
| set-body-inbound | Set Body | Sets the body of the request in the inbound pipeline - make sure to convert a GET/HEAD request to another method when using this policy. | api-gateway |
|
|
77
|
+
| set-headers-outbound | Set Headers | Adds or sets headers on the on the outgoing response. | api-gateway |
|
|
78
|
+
| set-status-outbound | Set Status Code | Sets the status code on the on the outgoing response. | api-gateway |
|
|
79
|
+
| sleep-inbound | Sleep / Delay | Add a delay to the incoming request. Useful for testing. | api-gateway |
|
|
80
|
+
| stripe-webhook-verification-inbound | Stripe Webhook Auth | The Stripe Webhook policy validates the authenticity of an incoming Stripe webhook. | api-gateway |
|
|
81
|
+
| supabase-jwt-auth-inbound | Supabase JWT Auth | The Supabase JWT Authentication policy supports user JWT tokens created by Supabase. | api-gateway |
|
|
82
|
+
| transform-body-inbound | Transform Request Body | Transform the body of an incoming request. | api-gateway |
|
|
83
|
+
| transform-body-outbound | Transform Response Body | Transform the body of an outgoing response. | api-gateway |
|
|
84
|
+
| upstream-azure-ad-service-auth-inbound | Upstream Azure AD Service Auth | Uses Azure Active Directory to add an Authorization header to the request in order to authenticate requests using Azure identity. | api-gateway |
|
|
85
|
+
| upstream-firebase-admin-auth-inbound | Upstream Firebase Admin Auth | Creates a Firebase Admin token and attaches it to the outgoing request. Useful when calling Firebase services as an administrator. | api-gateway |
|
|
86
|
+
| upstream-firebase-user-auth-inbound | Upstream Firebase User Auth | Creates a Firebase custom user token and attaches it to the outgoing request. Useful when calling Firebase services as user. | api-gateway |
|
|
87
|
+
| upstream-gcp-federated-auth-inbound | Upstream GCP Federated Auth | Authenticates with GCP resources or Google services using Workload Identity Federation allowing secure access to these resources without requiring the use of a service account private key. | api-gateway |
|
|
88
|
+
| upstream-gcp-jwt-inbound | Upstream GCP Self-Signed JWT | Creates a self-signed JWT token (generated using a Google Service Account JSON) and attaches it to the outgoing request. Useful when calling GCP services like Cloud Endpoints / ESPv2 | api-gateway |
|
|
89
|
+
| upstream-gcp-service-auth-inbound | Upstream GCP Service Auth | Creates an ID Token from Google's OAuth service and attaches it to the outgoing request. Useful when calling GCP services or Google APIs that are secured with GCP IAM. | api-gateway |
|
|
90
|
+
| upstream-zuplo-jwt-auth-inbound | Upstream Zuplo JWT | Generates a Zuplo JWT token and attaches it to the outgoing request. This policy creates a self-signed JWT using the Zuplo JWT plugin and adds it to the specified header for upstream authentication. | api-gateway |
|
|
91
|
+
| web-bot-auth-inbound | Web Bot Auth | Authenticate bots using web-bot-auth HTTP Message Signatures. | api-gateway |
|
|
92
|
+
| xml-to-json-outbound | XML to JSON Outbound | Parses XML and converts it to JSON. | api-gateway |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
This example shows how to perform an action on incoming requests based on the
|
|
2
|
+
result of a randomly generated number. A/B tests could also be performed on
|
|
3
|
+
properties such as the `request.user`.
|
|
4
|
+
|
|
5
|
+
A/B tests can also be combined with other policies by passing data to downstream
|
|
6
|
+
policies. For example, you could save a value in `ContextData` based on the
|
|
7
|
+
results of the A/B test and use that value in a later policy to modify the
|
|
8
|
+
request.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
|
|
2
|
+
|
|
3
|
+
export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
4
|
+
// Generate a random number to segment the test groups
|
|
5
|
+
const score = Math.random();
|
|
6
|
+
|
|
7
|
+
if (score < 0.5) {
|
|
8
|
+
// Do something for half the requests
|
|
9
|
+
} else {
|
|
10
|
+
// Do something else for the other half
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return request;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "http://zuplo.com/schemas/policies/ab-test-inbound.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "A/B Test Inbound",
|
|
6
|
+
"isCustom": true,
|
|
7
|
+
"products": ["api-gateway"],
|
|
8
|
+
"description": "An A/B test policy is used to handle requests differently based on parameters such as user, ip, etc.",
|
|
9
|
+
"required": ["handler"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"handler": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"default": {},
|
|
14
|
+
"required": ["export", "module"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"export": {
|
|
17
|
+
"const": "default",
|
|
18
|
+
"description": "The export from the custom policy"
|
|
19
|
+
},
|
|
20
|
+
"module": {
|
|
21
|
+
"const": "$import(./modules/YOUR_MODULE)",
|
|
22
|
+
"description": "The module containing the policy"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
This example shows how to perform an action on incoming requests based on the
|
|
2
|
+
result of a randomly generated number. A/B tests could also be performed on
|
|
3
|
+
properties such as the `request.user`.
|
|
4
|
+
|
|
5
|
+
A/B tests can also be combined with other policies by passing data to downstream
|
|
6
|
+
policies. For example, you could save a value in `ContextData` based on the
|
|
7
|
+
results of the A/B test and use that value in a later policy to modify the
|
|
8
|
+
request.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
|
|
2
|
+
|
|
3
|
+
export default async function (
|
|
4
|
+
response: Response,
|
|
5
|
+
request: ZuploRequest,
|
|
6
|
+
context: ZuploContext,
|
|
7
|
+
) {
|
|
8
|
+
// Generate a random number to segment the test groups
|
|
9
|
+
const score = Math.random();
|
|
10
|
+
|
|
11
|
+
// Get the outgoing response body
|
|
12
|
+
const data = await response.json();
|
|
13
|
+
|
|
14
|
+
// Modify the body based on the random value
|
|
15
|
+
if (score < 0.5) {
|
|
16
|
+
data.testEnabled = true;
|
|
17
|
+
} else {
|
|
18
|
+
data.testEnabled = false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Stringify the data object
|
|
22
|
+
const body = JSON.stringify(data);
|
|
23
|
+
|
|
24
|
+
// Return a new response with the updated body
|
|
25
|
+
return new Response(body, response);
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "http://zuplo.com/schemas/policies/ab-test-outbound.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "A/B Test Outbound",
|
|
6
|
+
"isCustom": true,
|
|
7
|
+
"products": ["api-gateway"],
|
|
8
|
+
"description": "An A/B test policy is used to handle responses differently based on parameters such as user, ip, etc.",
|
|
9
|
+
"required": ["handler"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"handler": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"default": {},
|
|
14
|
+
"required": ["export", "module"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"export": {
|
|
17
|
+
"const": "default",
|
|
18
|
+
"description": "The export from the custom policy"
|
|
19
|
+
},
|
|
20
|
+
"module": {
|
|
21
|
+
"const": "$import(./modules/YOUR_MODULE)",
|
|
22
|
+
"description": "The module containing the policy"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
ACL policies can be built many ways depending on your requirements. This example
|
|
2
|
+
shows how to perform an authorization check on a hard-coded list of users.
|
|
3
|
+
|
|
4
|
+
This policy could be extended to fetch data from external sources or even use an
|
|
5
|
+
authorization service such as [OpenFGA](https://openfga.dev/).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HttpProblems, ZuploContext, ZuploRequest } from "@zuplo/runtime";
|
|
2
|
+
|
|
3
|
+
interface PolicyOptions {
|
|
4
|
+
users: string[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default async function (
|
|
8
|
+
request: ZuploRequest,
|
|
9
|
+
context: ZuploContext,
|
|
10
|
+
options: PolicyOptions,
|
|
11
|
+
policyName: string,
|
|
12
|
+
) {
|
|
13
|
+
// Check that an authenticated user is set
|
|
14
|
+
// NOTE: This policy requires an authentication policy to run before
|
|
15
|
+
if (!request.user) {
|
|
16
|
+
context.log.error(
|
|
17
|
+
"User isn't authenticated. A authorization policy must come before the ACL policy.",
|
|
18
|
+
);
|
|
19
|
+
return HttpProblems.unauthorized(request, context);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Check that the user has one of the allowed roles
|
|
23
|
+
if (!options.users.includes(request.user.sub)) {
|
|
24
|
+
context.log.error(
|
|
25
|
+
`The user '${request.user.sub}' isn't authorized to perform this action.`,
|
|
26
|
+
);
|
|
27
|
+
return HttpProblems.forbidden(request, context);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// If they made it here, they are authorized
|
|
31
|
+
return request;
|
|
32
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "http://zuplo.com/schemas/policies/acl-policy-inbound.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "Access Control List",
|
|
6
|
+
"isCustom": true,
|
|
7
|
+
"products": ["api-gateway"],
|
|
8
|
+
"description": "The access control list inbound policy limits access to resources based on parameters on the authenticated user.",
|
|
9
|
+
"required": ["handler"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"handler": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"default": {},
|
|
14
|
+
"required": ["export", "module", "options"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"export": {
|
|
17
|
+
"const": "default",
|
|
18
|
+
"description": "The name of the exported type"
|
|
19
|
+
},
|
|
20
|
+
"module": {
|
|
21
|
+
"const": "$import(./modules/YOUR_MODULE)",
|
|
22
|
+
"description": "The module containing the policy"
|
|
23
|
+
},
|
|
24
|
+
"options": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"description": "The options for this policy",
|
|
27
|
+
"required": ["users"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"users": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"description": "The list of users authorized to access the resource",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The user's sub"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"examples": [
|
|
41
|
+
{
|
|
42
|
+
"_name": "basic",
|
|
43
|
+
"export": "default",
|
|
44
|
+
"module": "$import(./modules/YOUR_MODULE)",
|
|
45
|
+
"options": {
|
|
46
|
+
"users": ["google|12345", "google|23456"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|