zuplo 7.2.3 → 7.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ai-gateway/integrations/ai-sdk.mdx +3 -2
- package/docs/ai-gateway/integrations/claude-code.mdx +3 -2
- package/docs/ai-gateway/integrations/codex.mdx +7 -5
- package/docs/ai-gateway/integrations/goose.mdx +4 -3
- package/docs/ai-gateway/integrations/langchain.mdx +3 -3
- package/docs/ai-gateway/integrations/openai.mdx +3 -3
- package/docs/ai-gateway/policies/overview.mdx +3 -17
- package/docs/ai-gateway/universal-api.mdx +4 -3
- package/docs/caching/custom-caching-policy.mdx +1 -1
- package/docs/caching/gateway-caching.mdx +3 -3
- package/docs/caching/overview.mdx +10 -10
- package/docs/dedicated/akamai/ai-powered-applications.mdx +2 -2
- package/docs/dev-portal/zudoku/configuration/search.md +5 -0
- package/docs/dev-portal/zudoku/openapi-extensions/x-mcp-server.md +30 -0
- package/docs/policies/_index.md +12 -7
- package/docs/policies/ai-gateway-auth-v2-inbound/doc.md +168 -0
- package/docs/policies/ai-gateway-auth-v2-inbound/intro.md +10 -0
- package/docs/policies/ai-gateway-auth-v2-inbound/schema.json +74 -0
- package/docs/policies/ai-gateway-configuration-executor-v2-inbound/doc.md +442 -0
- package/docs/policies/ai-gateway-configuration-executor-v2-inbound/intro.md +14 -0
- package/docs/policies/ai-gateway-configuration-executor-v2-inbound/schema.json +60 -0
- package/docs/policies/ai-gateway-configuration-loader-v2-inbound/doc.md +105 -0
- package/docs/policies/ai-gateway-configuration-loader-v2-inbound/intro.md +6 -0
- package/docs/policies/ai-gateway-configuration-loader-v2-inbound/schema.json +60 -0
- package/docs/policies/ai-gateway-dlp-inbound/doc.md +127 -0
- package/docs/policies/ai-gateway-dlp-inbound/intro.md +5 -0
- package/docs/policies/ai-gateway-dlp-inbound/schema.json +4050 -0
- package/docs/policies/ai-gateway-fallback-model-v2-inbound/doc.md +10 -2
- package/docs/policies/ai-gateway-fallback-model-v2-inbound/intro.md +2 -2
- package/docs/policies/ai-gateway-fallback-model-v2-inbound/schema.json +22 -8
- package/docs/policies/ai-gateway-metering-v2-inbound/doc.md +19 -16
- package/docs/policies/ai-gateway-metering-v2-inbound/intro.md +9 -0
- package/docs/policies/ai-gateway-metering-v2-inbound/schema.json +20 -24
- package/docs/policies/ai-gateway-model-filtering-v2-inbound/doc.md +6 -5
- package/docs/policies/ai-gateway-model-filtering-v2-inbound/intro.md +2 -2
- package/docs/policies/ai-gateway-model-filtering-v2-inbound/schema.json +17 -3
- package/docs/policies/ai-gateway-semantic-cache-v2-inbound/doc.md +72 -0
- package/docs/policies/ai-gateway-semantic-cache-v2-inbound/intro.md +9 -0
- package/docs/policies/ai-gateway-semantic-cache-v2-inbound/schema.json +120 -0
- package/docs/policies/akamai-ai-firewall-v2-inbound/doc.md +87 -0
- package/docs/policies/akamai-ai-firewall-v2-inbound/intro.md +10 -0
- package/docs/policies/{akamai-ai-firewall → akamai-ai-firewall-v2-inbound}/schema.json +36 -9
- package/docs/policies/akamai-firewall-for-ai-inbound/schema.json +1 -0
- package/docs/policies/akamai-firewall-for-ai-outbound/schema.json +1 -0
- package/docs/policies/amberflo-metering-inbound/schema.json +1 -0
- package/docs/policies/api-key-inbound/schema.json +1 -0
- package/docs/policies/audit-log-inbound/schema.json +1 -0
- package/docs/policies/auth0-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/authzen-inbound/schema.json +1 -0
- package/docs/policies/axiomatics-authz-inbound/schema.json +1 -0
- package/docs/policies/basic-auth-inbound/schema.json +1 -0
- package/docs/policies/bot-detection-inbound/schema.json +1 -0
- package/docs/policies/brownout-inbound/schema.json +1 -0
- package/docs/policies/caching-inbound/schema.json +1 -0
- package/docs/policies/cdn-cache-control-outbound/schema.json +1 -0
- package/docs/policies/change-method-inbound/schema.json +1 -0
- package/docs/policies/clear-headers-inbound/schema.json +1 -0
- package/docs/policies/clear-headers-outbound/schema.json +1 -0
- package/docs/policies/clerk-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/cognito-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/comet-opik-tracing-v2-inbound/doc.md +78 -0
- package/docs/policies/comet-opik-tracing-v2-inbound/intro.md +10 -0
- package/docs/policies/{comet-opik-tracing-inbound → comet-opik-tracing-v2-inbound}/schema.json +40 -5
- package/docs/policies/complex-rate-limit-inbound/schema.json +1 -0
- package/docs/policies/composite-inbound/schema.json +1 -0
- package/docs/policies/composite-outbound/schema.json +1 -0
- package/docs/policies/curity-phantom-token-inbound/schema.json +1 -0
- package/docs/policies/data-loss-prevention-inbound/doc.md +22 -6
- package/docs/policies/data-loss-prevention-inbound/schema.json +10 -1
- package/docs/policies/data-loss-prevention-outbound/doc.md +23 -6
- package/docs/policies/data-loss-prevention-outbound/schema.json +10 -1
- package/docs/policies/firebase-jwt-inbound/schema.json +1 -0
- package/docs/policies/formdata-to-json-inbound/schema.json +1 -0
- package/docs/policies/galileo-tracing-v2-inbound/doc.md +72 -0
- package/docs/policies/galileo-tracing-v2-inbound/intro.md +8 -0
- package/docs/policies/{galileo-tracing-inbound → galileo-tracing-v2-inbound}/schema.json +40 -5
- package/docs/policies/geo-filter-inbound/schema.json +1 -0
- package/docs/policies/graphql-analytics-outbound/schema.json +1 -0
- package/docs/policies/graphql-cache-inbound/schema.json +1 -0
- package/docs/policies/graphql-complexity-limit-inbound/schema.json +1 -0
- package/docs/policies/graphql-disable-introspection-inbound/schema.json +1 -0
- package/docs/policies/graphql-introspection-filter-outbound/schema.json +1 -0
- package/docs/policies/http-deprecation-outbound/schema.json +1 -0
- package/docs/policies/ip-address-restriction-inbound/schema.json +1 -0
- package/docs/policies/jwt-scopes-inbound/schema.json +1 -0
- package/docs/policies/ldap-auth-inbound/schema.json +1 -0
- package/docs/policies/mcp-auth0-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-capability-filter-inbound/schema.json +1 -0
- package/docs/policies/mcp-clerk-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-cognito-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-entra-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-google-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-keycloak-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-logto-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-okta-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-onelogin-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-ping-oauth-inbound/schema.json +1 -0
- package/docs/policies/mcp-token-exchange-inbound/schema.json +1 -0
- package/docs/policies/mcp-workos-oauth-inbound/schema.json +1 -0
- package/docs/policies/mock-api-inbound/schema.json +1 -0
- package/docs/policies/moesif-inbound/schema.json +1 -0
- package/docs/policies/monetization-inbound/schema.json +1 -0
- package/docs/policies/mtls-auth-inbound/schema.json +1 -0
- package/docs/policies/okta-fga-authz-inbound/schema.json +1 -0
- package/docs/policies/okta-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/open-id-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/openfga-authz-inbound/schema.json +1 -0
- package/docs/policies/openmeter-inbound/schema.json +1 -0
- package/docs/policies/prompt-injection-outbound/schema.json +1 -0
- package/docs/policies/propel-auth-jwt-inbound/schema.json +1 -0
- package/docs/policies/query-param-to-header-inbound/schema.json +1 -0
- package/docs/policies/quota-inbound/schema.json +1 -0
- package/docs/policies/rate-limit-inbound/schema.json +1 -0
- package/docs/policies/readme-metrics-inbound/schema.json +1 -0
- package/docs/policies/remove-headers-inbound/schema.json +1 -0
- package/docs/policies/remove-headers-outbound/schema.json +1 -0
- package/docs/policies/remove-query-params-inbound/schema.json +1 -0
- package/docs/policies/replace-string-outbound/schema.json +1 -0
- package/docs/policies/request-size-limit-inbound/schema.json +1 -0
- package/docs/policies/request-validation-inbound/schema.json +1 -0
- package/docs/policies/require-origin-inbound/schema.json +1 -0
- package/docs/policies/require-user-claims-inbound/schema.json +1 -0
- package/docs/policies/secret-masking-outbound/schema.json +1 -0
- package/docs/policies/semantic-cache-inbound/schema.json +3 -2
- package/docs/policies/set-body-inbound/schema.json +1 -0
- package/docs/policies/set-headers-inbound/schema.json +1 -0
- package/docs/policies/set-headers-outbound/schema.json +1 -0
- package/docs/policies/set-query-params-inbound/schema.json +1 -0
- package/docs/policies/set-status-outbound/schema.json +1 -0
- package/docs/policies/set-upstream-api-key-inbound/schema.json +1 -0
- package/docs/policies/sleep-inbound/schema.json +1 -0
- package/docs/policies/stripe-webhook-verification-inbound/schema.json +1 -0
- package/docs/policies/supabase-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/traffic-splitting-inbound/schema.json +1 -0
- package/docs/policies/upstream-aws-federated-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-aws-service-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-azure-ad-service-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-firebase-admin-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-firebase-user-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-gcp-federated-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-gcp-jwt-inbound/schema.json +1 -0
- package/docs/policies/upstream-gcp-service-auth-inbound/schema.json +1 -0
- package/docs/policies/upstream-oauth-client-credentials-inbound/schema.json +1 -0
- package/docs/policies/upstream-zuplo-jwt-auth-inbound/schema.json +1 -0
- package/docs/policies/validate-json-schema-inbound/schema.json +1 -0
- package/docs/policies/web-bot-auth-inbound/schema.json +1 -0
- package/docs/policies/xml-to-json-outbound/schema.json +1 -0
- package/package.json +5 -5
- package/docs/ai-gateway/policies/akamai-ai-firewall.mdx +0 -122
- package/docs/ai-gateway/policies/authentication.mdx +0 -43
- package/docs/ai-gateway/policies/comet-opik-tracing.mdx +0 -177
- package/docs/ai-gateway/policies/fallback-model.mdx +0 -40
- package/docs/ai-gateway/policies/galileo-tracing.mdx +0 -161
- package/docs/ai-gateway/policies/metering.mdx +0 -47
- package/docs/ai-gateway/policies/model-filtering.mdx +0 -49
- package/docs/ai-gateway/policies/semantic-cache.mdx +0 -48
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "query-param-to-header-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Extracts a query parameter and sets it as a header in the request.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "quota-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "The Quota policy enables you to set monthly, weekly, daily or hourly quotas on your API.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "rate-limit-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "readme-metrics-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Readme is a developer documentation and API metrics company. This policy pushes logs to their API calls dashboard.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "request-validation-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "require-user-claims-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Authorizes requests by validating claims on the authenticated user (`request.user`) against a configurable rule of `and`/`or` combinators and per-claim `eq`, `in`, and `startsWith` checks. Run it after any authentication policy that populates `request.user` — a JWT auth policy, API key auth, mTLS, and so on — to allow only specific callers (service accounts, OAuth clients, tenants, groups) without writing custom code.\n\nEvery check fails closed: a missing or non-primitive claim never matches, comparisons are strict and type-sensitive, and requests without an authenticated user receive a 401 response. Denied requests receive a 403 response that does not echo claim values or expected values; the failing checks are written to the request log instead.\n\nValidation of the options runs lazily inside the policy constructor, which the runtime caches per policy name. Misconfigured options therefore fail on first use with a customer-facing `ConfigurationError` instead of failing at module load.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "secret-masking-outbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Masks common secrets like Zuplo API keys, GitHub tokens, or SSH private key in the response body.",
|
|
15
16
|
"deprecatedMessage": "Use the [Data Loss Prevention](https://zuplo.com/docs/policies/data-loss-prevention-outbound) policy instead. It detects the same Zuplo API keys, GitHub tokens, and private key blocks via its `secret-zuplo`, `secret-github`, and `secret-private-key` recognizers, plus 60+ more built-in entities, and can block or log a response rather than only masking it. This policy will continue to work but will be removed in a future version of Zuplo.",
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
"$id": "https://cdn.zuplo.com/policies/runtime/schemas/semantic-cache-inbound.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"title": "Semantic Cache",
|
|
6
|
-
"isDeprecated":
|
|
6
|
+
"isDeprecated": true,
|
|
7
7
|
"isPaidAddOn": false,
|
|
8
8
|
"isEnterprise": true,
|
|
9
9
|
"isInternal": false,
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": true,
|
|
13
|
+
"policyType": "semantic-cache",
|
|
13
14
|
"products": ["ai-gateway"],
|
|
14
15
|
"description": "Respond to matched incoming requests with semantically cached content\n\nThe 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.\n\nThe policy uses Large Language Model (LLM) embeddings to determine semantic similarity between cache keys based on a configurable similarity tolerance.\n\nOptions: - 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.",
|
|
15
|
-
"deprecatedMessage": "",
|
|
16
|
+
"deprecatedMessage": "Use [AI Gateway Semantic Cache](https://zuplo.com/docs/policies/ai-gateway-semantic-cache-v2-inbound) instead.",
|
|
16
17
|
"required": ["handler"],
|
|
17
18
|
"properties": {
|
|
18
19
|
"handler": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "set-body-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "set-upstream-api-key-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Sets a single header on the incoming request, typically used to attach an API key for the upstream service. A more directed version of the `SetHeadersInboundPolicy` that defaults the header name to `Authorization` and is intended to be used with an `$env()` reference for the value.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "stripe-webhook-verification-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "The Stripe Webhook policy validates the authenticity of an incoming Stripe webhook.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "supabase-jwt-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "The Supabase JWT Authentication policy supports user JWT tokens created by Supabase.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "traffic-splitting-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Splits traffic randomly across a set of weighted base paths. On each request one base path is selected (weighted by `weight`) and written to the request custom context at `customOutputProperty`. Reference it from a later URL Rewrite `rewritePattern` or URL Forward `baseUrl`, e.g. `${context.custom.trafficSplitting.basePath}`.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": true,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-aws-federated-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Resolves AWS credentials with STS AssumeRoleWithWebIdentity using Zuplo's ambient OIDC identity — no AWS keys are stored anywhere. The role's trust policy must trust the Zuplo OIDC identity provider. Resolved credentials are registered on the request context for the AWS Lambda handler and custom code to sign upstream requests with `AwsClient.fromContext`. This policy does not itself sign or forward the request.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": true,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-aws-service-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Resolves AWS credentials from static access keys (optionally exchanged for an IAM role's temporary credentials via STS AssumeRole) and registers them on the request context. The AWS Lambda handler and custom code read them with `AwsClient.fromContext` to sign upstream requests. This policy does not itself sign or forward the request.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-azure-ad-service-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Uses Azure Active Directory to add an Authorization header to the request in order to authenticate requests using Azure identity.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-firebase-admin-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Creates a Firebase Admin token and attaches it to the outgoing request. Useful when calling Firebase services as an administrator.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-firebase-user-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Creates a Firebase custom user token and attaches it to the outgoing request. Useful when calling Firebase services as user.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-gcp-federated-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-gcp-jwt-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-gcp-service-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-oauth-client-credentials-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Fetches an access token from any OAuth 2.0 token endpoint using the client credentials grant and adds it to a header (`Authorization` by default) on the upstream request. Tokens are cached until shortly before they expire.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "upstream-zuplo-jwt-auth-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "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.",
|
|
15
16
|
"deprecatedMessage": "",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"isBeta": false,
|
|
11
11
|
"isHidden": false,
|
|
12
12
|
"requiresAI": false,
|
|
13
|
+
"policyType": "validate-json-schema-inbound",
|
|
13
14
|
"products": ["api-gateway"],
|
|
14
15
|
"description": "Validates the body of an incoming request based on a JSON schema.",
|
|
15
16
|
"deprecatedMessage": "Use the new [Request Validation Policy](https://zuplo.com/docs/policies/request-validation-inbound). The new policy validates JSON bodies like this policy, but also supports validation of parameters, query strings, etc.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The programmable API Gateway",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"zuplo": "zuplo.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@zuplo/cli": "7.2.
|
|
23
|
-
"@zuplo/core": "7.2.
|
|
24
|
-
"@zuplo/runtime": "7.2.
|
|
25
|
-
"@zuplo/test": "7.2.
|
|
22
|
+
"@zuplo/cli": "7.2.4",
|
|
23
|
+
"@zuplo/core": "7.2.4",
|
|
24
|
+
"@zuplo/runtime": "7.2.4",
|
|
25
|
+
"@zuplo/test": "7.2.4"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Akamai AI Firewall
|
|
3
|
-
sidebar_label: Akamai AI Firewall
|
|
4
|
-
description:
|
|
5
|
-
Scan prompts and completions with Akamai Firewall for AI and block what your
|
|
6
|
-
Akamai configuration denies.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
`akamai-ai-firewall-v2-inbound`
|
|
10
|
-
|
|
11
|
-
The Akamai AI Firewall policy sends an app's prompts and completions to
|
|
12
|
-
[Akamai Firewall for AI](https://www.akamai.com/products/firewall-for-ai) and
|
|
13
|
-
blocks a request or response that your Akamai configuration denies. It's the
|
|
14
|
-
gateway's guardrail policy: it can answer a request itself instead of letting it
|
|
15
|
-
reach the provider.
|
|
16
|
-
|
|
17
|
-
One entry covers both directions. The policy scans the prompt before the
|
|
18
|
-
provider call and the completion afterward, including streaming
|
|
19
|
-
responses—there's no separate outbound policy to add.
|
|
20
|
-
|
|
21
|
-
Detection rules and their categories live in Akamai Control Center, not in
|
|
22
|
-
Zuplo. The policy forwards text and enforces the decision that comes back,
|
|
23
|
-
acting only on rules that deny. Rules set to alert are ignored.
|
|
24
|
-
|
|
25
|
-
## Adding the policy to an app
|
|
26
|
-
|
|
27
|
-
<Stepper>
|
|
28
|
-
|
|
29
|
-
1. In your gateway's repository, set the policy's credentials and push:
|
|
30
|
-
|
|
31
|
-
```json title="config/policies.json"
|
|
32
|
-
{
|
|
33
|
-
"name": "akamai-ai-firewall-v2-inbound",
|
|
34
|
-
"policyType": "akamai-ai-firewall-v2-inbound",
|
|
35
|
-
"handler": {
|
|
36
|
-
"export": "AkamaiAIFirewallV2InboundPolicy",
|
|
37
|
-
"module": "$import(@zuplo/runtime)",
|
|
38
|
-
"options": {
|
|
39
|
-
"configurationId": "your-configuration-id",
|
|
40
|
-
"api-key": "your-akamai-api-key"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
2. Open the app's **Policies** tab, click **Add Policy**, and add **Akamai AI
|
|
47
|
-
Firewall**. Leave the entry's options alone so it inherits the declaration's
|
|
48
|
-
configuration.
|
|
49
|
-
|
|
50
|
-
</Stepper>
|
|
51
|
-
|
|
52
|
-
To protect every new app in a team, add the policy to the team's
|
|
53
|
-
[policy template](../policy-templates.mdx).
|
|
54
|
-
|
|
55
|
-
## Options
|
|
56
|
-
|
|
57
|
-
| Option | Default | What it does |
|
|
58
|
-
| --------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
-
| `configurationId` | — | Required. Your Akamai configuration |
|
|
60
|
-
| `api-key` | — | Required. Note the hyphen—`apiKey` is rejected |
|
|
61
|
-
| `applicationId` | — | Optional Akamai application identifier |
|
|
62
|
-
| `endpoints` | All shapes | Which API shapes to inspect |
|
|
63
|
-
| `onUnknownShape` | `deny` | What to do with a request shape the policy can't read |
|
|
64
|
-
| `onError` | `block` | What to do when the Akamai detect call itself fails—`block` answers `502`; `allow` lets the request through uninspected |
|
|
65
|
-
| `streamingAccumulation.enabled` | `true` | Scan streaming completions. `false` stops scanning responses for streaming requests |
|
|
66
|
-
| `streamingAccumulation.eventsInterval` | `5` | How many streamed events to buffer between checks |
|
|
67
|
-
| `streamingAccumulation.checkIntervalMs` | none | Also check on a timer. Off unless set |
|
|
68
|
-
|
|
69
|
-
Unknown option keys are rejected.
|
|
70
|
-
|
|
71
|
-
## What a blocked caller sees
|
|
72
|
-
|
|
73
|
-
A block returns `400` in the provider's own error format—not problem
|
|
74
|
-
details—with the Akamai rule ID in `code`:
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"error": {
|
|
79
|
-
"message": "Request blocked by AI Firewall during completion request. <rule message> (Rule: <ruleId>)",
|
|
80
|
-
"code": "<ruleId>"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
For a streaming response, the gateway withholds output until each check passes,
|
|
86
|
-
so blocked content never reaches the client. The stream then ends with a
|
|
87
|
-
content-filter stop rather than an HTTP error, so clients see a content-filter
|
|
88
|
-
finish reason. Holding events until a check returns adds to time to first token.
|
|
89
|
-
|
|
90
|
-
Blocked requests are counted against the app and appear in its Dashboard—see
|
|
91
|
-
[Monitoring usage](../usage-limits.mdx#monitoring-usage).
|
|
92
|
-
|
|
93
|
-
## Failure modes
|
|
94
|
-
|
|
95
|
-
| Situation | Result |
|
|
96
|
-
| -------------------------------------------------------------- | ------------------------------------------------ |
|
|
97
|
-
| Options are invalid or incomplete | Fails closed—request rejected |
|
|
98
|
-
| The request body can't be read | Fails closed—request rejected |
|
|
99
|
-
| An endpoint shape the policy can't inspect, such as embeddings | `400`, code `guardrail_uninspectable` |
|
|
100
|
-
| Akamai is unreachable, or returns an error | Fails closed—`502`, code `guardrail_unavailable` |
|
|
101
|
-
|
|
102
|
-
:::caution
|
|
103
|
-
|
|
104
|
-
With `onError: "allow"` the policy fails open instead: an expired Akamai key
|
|
105
|
-
silently disables the firewall while the gateway keeps returning `200`s. Monitor
|
|
106
|
-
blocked counts so a sudden drop to zero doesn't go unnoticed.
|
|
107
|
-
|
|
108
|
-
:::
|
|
109
|
-
|
|
110
|
-
An endpoint the policy can't inspect is denied by default. That's different from
|
|
111
|
-
an endpoint you exclude with `endpoints`, which passes through silently. A
|
|
112
|
-
provider error response is never scanned.
|
|
113
|
-
|
|
114
|
-
If a request is rejected with a configuration error, the usual cause is a chain
|
|
115
|
-
entry that overrode `options` and dropped the credential—entry options replace
|
|
116
|
-
the declared ones wholesale rather than merging. Omit them to inherit. See
|
|
117
|
-
[Options and secrets](../policy-chains.mdx#options-and-secrets).
|
|
118
|
-
|
|
119
|
-
## Additional resources
|
|
120
|
-
|
|
121
|
-
- [Akamai Firewall for AI](https://www.akamai.com/products/firewall-for-ai)
|
|
122
|
-
- [Akamai AI security solutions](https://www.akamai.com/solutions/security/ai-security)
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: API key authentication
|
|
3
|
-
sidebar_label: API key authentication
|
|
4
|
-
description:
|
|
5
|
-
Require an app's API key on every request and resolve the calling app from it.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
`ai-gateway-auth-v2`
|
|
9
|
-
|
|
10
|
-
Clients send the app's API key as a bearer token, and the gateway resolves the
|
|
11
|
-
calling app from the key. A missing or invalid key returns `401`. A valid key
|
|
12
|
-
whose app doesn't match the `{app_id}` in the URL returns `403`.
|
|
13
|
-
|
|
14
|
-
The policy applies per app: in an app's chain, it requires a key for that app
|
|
15
|
-
alone. A new top-level team's [policy template](../policy-templates.mdx)
|
|
16
|
-
includes it as a locked entry—and sub-teams inherit that template by default—so
|
|
17
|
-
apps created in the team require keys from the start.
|
|
18
|
-
|
|
19
|
-
## Options
|
|
20
|
-
|
|
21
|
-
| Option | Default | What it does |
|
|
22
|
-
| ----------------- | --------------- | ----------------------------------------------------------------- |
|
|
23
|
-
| `cacheTtlSeconds` | `10` | How long the gateway caches a key check. `10` is also the minimum |
|
|
24
|
-
| `authHeader` | `Authorization` | The header to read the key from |
|
|
25
|
-
| `authScheme` | `Bearer` | The scheme prefix. Set it to `""` to use the raw header value |
|
|
26
|
-
|
|
27
|
-
For clients that send `x-api-key` instead of a bearer token, use
|
|
28
|
-
`{ "authHeader": "x-api-key", "authScheme": "" }`.
|
|
29
|
-
|
|
30
|
-
Because key checks are cached, a revoked key can keep working until the cache
|
|
31
|
-
expires.
|
|
32
|
-
|
|
33
|
-
:::caution{title="A gateway without this policy is open"}
|
|
34
|
-
|
|
35
|
-
When an app's chain doesn't include the policy, the gateway resolves the app
|
|
36
|
-
from the `{app_id}` segment of the URL and serves the request with no key at
|
|
37
|
-
all. Anyone who knows the URL can spend against the app's providers and budget.
|
|
38
|
-
Only run an open gateway when something else, such as network isolation,
|
|
39
|
-
controls who can reach it.
|
|
40
|
-
|
|
41
|
-
:::
|
|
42
|
-
|
|
43
|
-
Each app's key appears on its **API Key** tab—see [Apps](../apps.mdx).
|