zuplo 6.72.3 → 6.72.8

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.
Files changed (96) hide show
  1. package/docs/analytics/access-and-entitlements.md +27 -34
  2. package/docs/analytics/overview.md +7 -6
  3. package/docs/analytics/reference/url-parameters.md +2 -10
  4. package/docs/analytics/shared-controls.md +3 -10
  5. package/docs/analytics/tabs/agents.md +3 -3
  6. package/docs/analytics/tabs/requests.md +2 -4
  7. package/docs/articles/connect-to-aws-alb-with-mtls.mdx +89 -13
  8. package/docs/articles/ddos-protection.mdx +2 -2
  9. package/docs/articles/graphql-security.mdx +2 -1
  10. package/docs/articles/graphql.mdx +8 -0
  11. package/docs/articles/limits.mdx +12 -0
  12. package/docs/articles/local-development-troubleshooting.mdx +12 -3
  13. package/docs/articles/opentelemetry.mdx +7 -5
  14. package/docs/articles/securing-backend-mtls.mdx +92 -3
  15. package/docs/articles/troubleshooting-slow-responses.mdx +4 -3
  16. package/docs/articles/troubleshooting.md +3 -1
  17. package/docs/articles/waf-ddos.mdx +1 -24
  18. package/docs/policies/_index.md +2 -0
  19. package/docs/policies/akamai-ai-firewall/schema.json +1 -0
  20. package/docs/policies/akamai-firewall-for-ai-inbound/schema.json +2 -0
  21. package/docs/policies/akamai-firewall-for-ai-outbound/schema.json +2 -0
  22. package/docs/policies/amberflo-metering-inbound/schema.json +5 -2
  23. package/docs/policies/api-key-inbound/schema.json +11 -5
  24. package/docs/policies/audit-log-inbound/schema.json +2 -0
  25. package/docs/policies/auth0-jwt-auth-inbound/schema.json +7 -5
  26. package/docs/policies/authzen-inbound/schema.json +7 -5
  27. package/docs/policies/axiomatics-authz-inbound/schema.json +14 -6
  28. package/docs/policies/basic-auth-inbound/schema.json +2 -1
  29. package/docs/policies/caching-inbound/schema.json +20 -16
  30. package/docs/policies/clerk-jwt-auth-inbound/schema.json +8 -6
  31. package/docs/policies/cognito-jwt-auth-inbound/schema.json +7 -5
  32. package/docs/policies/comet-opik-tracing-inbound/schema.json +1 -0
  33. package/docs/policies/complex-rate-limit-inbound/schema.json +4 -0
  34. package/docs/policies/curity-phantom-token-inbound/schema.json +1 -0
  35. package/docs/policies/data-loss-prevention-inbound/schema.json +15 -12
  36. package/docs/policies/data-loss-prevention-outbound/schema.json +15 -12
  37. package/docs/policies/firebase-jwt-inbound/schema.json +7 -5
  38. package/docs/policies/formdata-to-json-inbound/schema.json +1 -0
  39. package/docs/policies/galileo-tracing-inbound/schema.json +1 -0
  40. package/docs/policies/geo-filter-inbound/schema.json +1 -0
  41. package/docs/policies/graphql-analytics-outbound/schema.json +1 -0
  42. package/docs/policies/mcp-auth0-oauth-inbound/schema.json +11 -5
  43. package/docs/policies/mcp-clerk-oauth-inbound/schema.json +81 -0
  44. package/docs/policies/mcp-cognito-oauth-inbound/schema.json +81 -0
  45. package/docs/policies/mcp-entra-oauth-inbound/schema.json +81 -0
  46. package/docs/policies/mcp-google-oauth-inbound/schema.json +81 -0
  47. package/docs/policies/mcp-keycloak-oauth-inbound/schema.json +81 -0
  48. package/docs/policies/mcp-logto-oauth-inbound/schema.json +81 -0
  49. package/docs/policies/mcp-oauth-inbound/schema.json +10 -5
  50. package/docs/policies/mcp-okta-oauth-inbound/schema.json +81 -0
  51. package/docs/policies/mcp-onelogin-oauth-inbound/schema.json +81 -0
  52. package/docs/policies/mcp-ping-oauth-inbound/schema.json +81 -0
  53. package/docs/policies/mcp-token-exchange-inbound/doc.md +72 -4
  54. package/docs/policies/mcp-token-exchange-inbound/intro.md +5 -4
  55. package/docs/policies/mcp-token-exchange-inbound/schema.json +287 -7
  56. package/docs/policies/mcp-workos-oauth-inbound/schema.json +81 -0
  57. package/docs/policies/monetization-inbound/schema.json +25 -23
  58. package/docs/policies/mtls-auth-inbound/schema.json +6 -5
  59. package/docs/policies/okta-fga-authz-inbound/schema.json +7 -6
  60. package/docs/policies/okta-jwt-auth-inbound/schema.json +7 -5
  61. package/docs/policies/open-id-jwt-auth-inbound/schema.json +14 -9
  62. package/docs/policies/openfga-authz-inbound/schema.json +7 -6
  63. package/docs/policies/openmeter-inbound/schema.json +23 -19
  64. package/docs/policies/prompt-injection-outbound/schema.json +6 -5
  65. package/docs/policies/propel-auth-jwt-inbound/schema.json +10 -8
  66. package/docs/policies/query-param-to-header-inbound/schema.json +1 -0
  67. package/docs/policies/quota-inbound/schema.json +9 -6
  68. package/docs/policies/rate-limit-inbound/schema.json +4 -0
  69. package/docs/policies/readme-metrics-inbound/schema.json +9 -5
  70. package/docs/policies/request-size-limit-inbound/schema.json +1 -0
  71. package/docs/policies/request-validation-inbound/schema.json +8 -6
  72. package/docs/policies/require-origin-inbound/schema.json +1 -0
  73. package/docs/policies/semantic-cache-inbound/schema.json +9 -5
  74. package/docs/policies/set-status-outbound/schema.json +1 -0
  75. package/docs/policies/set-upstream-api-key-inbound/schema.json +7 -5
  76. package/docs/policies/stripe-webhook-verification-inbound/schema.json +2 -1
  77. package/docs/policies/supabase-jwt-auth-inbound/schema.json +7 -5
  78. package/docs/policies/traffic-splitting-inbound/schema.json +1 -0
  79. package/docs/policies/upstream-aws-federated-auth-inbound/doc.md +78 -0
  80. package/docs/policies/upstream-aws-federated-auth-inbound/intro.md +20 -0
  81. package/docs/policies/upstream-aws-federated-auth-inbound/schema.json +104 -0
  82. package/docs/policies/upstream-aws-service-auth-inbound/doc.md +89 -0
  83. package/docs/policies/upstream-aws-service-auth-inbound/intro.md +19 -0
  84. package/docs/policies/upstream-aws-service-auth-inbound/schema.json +121 -0
  85. package/docs/policies/upstream-azure-ad-service-auth-inbound/schema.json +7 -5
  86. package/docs/policies/upstream-firebase-admin-auth-inbound/schema.json +2 -0
  87. package/docs/policies/upstream-firebase-user-auth-inbound/schema.json +8 -5
  88. package/docs/policies/upstream-gcp-federated-auth-inbound/doc.md +2 -2
  89. package/docs/policies/upstream-gcp-federated-auth-inbound/schema.json +8 -4
  90. package/docs/policies/upstream-gcp-service-auth-inbound/doc.md +3 -3
  91. package/docs/policies/upstream-gcp-service-auth-inbound/schema.json +8 -3
  92. package/docs/policies/upstream-zuplo-jwt-auth-inbound/schema.json +39 -15
  93. package/docs/policies/web-bot-auth-inbound/schema.json +2 -0
  94. package/docs/policies/xml-to-json-outbound/schema.json +9 -5
  95. package/package.json +4 -4
  96. package/docs/articles/zuplo-waf.mdx +0 -156
@@ -35,12 +35,6 @@
35
35
  "additionalProperties": false,
36
36
  "required": [],
37
37
  "properties": {
38
- "authHeader": {
39
- "type": "string",
40
- "default": "Authorization",
41
- "x-show-example": false,
42
- "description": "The name of the header with the key."
43
- },
44
38
  "issuer": {
45
39
  "type": "string",
46
40
  "examples": ["$env(AUTH_ISSUER)"],
@@ -54,7 +48,7 @@
54
48
  "jwkUrl": {
55
49
  "type": "string",
56
50
  "examples": [
57
- "https://zuplo-demo.us.auth0.com/.well-known/jwks.json"
51
+ "https://my-tenant.us.auth0.com/.well-known/jwks.json"
58
52
  ],
59
53
  "description": "the url of the JSON Web Key Set (JWKS) - this is used to validate the JWT token signature (either this or `secret` must be set)."
60
54
  },
@@ -63,18 +57,28 @@
63
57
  "examples": ["$env(AUTH_JWT_SIGNING_KEY)"],
64
58
  "description": "The key used to verify the signature of the JWT token (either this or `jwkUrl` must be set)."
65
59
  },
60
+ "authHeader": {
61
+ "type": "string",
62
+ "default": "Authorization",
63
+ "x-show-example": false,
64
+ "x-advanced": true,
65
+ "description": "The name of the header with the key."
66
+ },
66
67
  "allowUnauthenticatedRequests": {
67
68
  "type": "boolean",
68
69
  "default": false,
70
+ "x-advanced": true,
69
71
  "description": "indicates whether the request should continue if authentication fails. Defaults is `false` which means unauthenticated users will automatically receive a 401 response."
70
72
  },
71
73
  "subPropertyName": {
72
74
  "type": "string",
73
75
  "examples": ["sub"],
76
+ "x-advanced": true,
74
77
  "description": "The name of the property in the JWT token that contains the user's unique identifier."
75
78
  },
76
79
  "headers": {
77
80
  "type": "object",
81
+ "x-advanced": true,
78
82
  "description": "Additional headers to send with the JWK request.",
79
83
  "additionalProperties": {
80
84
  "type": "string"
@@ -83,6 +87,7 @@
83
87
  "oAuthResourceMetadataEnabled": {
84
88
  "type": "boolean",
85
89
  "default": false,
90
+ "x-advanced": true,
86
91
  "description": "Flag that determines whether OAuth protected resource metadata is enabled."
87
92
  }
88
93
  },
@@ -90,7 +95,7 @@
90
95
  {
91
96
  "issuer": "$env(AUTH_ISSUER)",
92
97
  "audience": "$env(AUTH_AUDIENCE)",
93
- "jwkUrl": "https://zuplo-demo.us.auth0.com/.well-known/jwks.json"
98
+ "jwkUrl": "https://my-tenant.us.auth0.com/.well-known/jwks.json"
94
99
  },
95
100
  {
96
101
  "issuer": "$env(AUTH_ISSUER)",
@@ -107,7 +112,7 @@
107
112
  "options": {
108
113
  "issuer": "$env(AUTH_ISSUER)",
109
114
  "audience": "$env(AUTH_AUDIENCE)",
110
- "jwkUrl": "https://zuplo-demo.us.auth0.com/.well-known/jwks.json"
115
+ "jwkUrl": "https://my-tenant.us.auth0.com/.well-known/jwks.json"
111
116
  }
112
117
  },
113
118
  {
@@ -55,12 +55,6 @@
55
55
  "description": "The ID of the authorization model.",
56
56
  "examples": ["$env(FGA_MODEL_ID)"]
57
57
  },
58
- "allowUnauthorizedRequests": {
59
- "type": "boolean",
60
- "default": false,
61
- "x-show-example": false,
62
- "description": "Indicates whether the request should continue if authorization fails. Default is `false` which means unauthorized users will automatically receive a 403 response."
63
- },
64
58
  "credentials": {
65
59
  "oneOf": [
66
60
  {
@@ -165,6 +159,13 @@
165
159
  "oauthTokenEndpointUrl": "https://fga.us.auth0.com/oauth/token"
166
160
  }
167
161
  ]
162
+ },
163
+ "allowUnauthorizedRequests": {
164
+ "type": "boolean",
165
+ "default": false,
166
+ "x-show-example": false,
167
+ "x-advanced": true,
168
+ "description": "Indicates whether the request should continue if authorization fails. Default is `false` which means unauthorized users will automatically receive a 403 response."
168
169
  }
169
170
  }
170
171
  }
@@ -33,17 +33,6 @@
33
33
  "description": "Send usage metrics to OpenMeter.",
34
34
  "type": "object",
35
35
  "properties": {
36
- "apiUrl": {
37
- "type": "string",
38
- "x-show-example": false,
39
- "description": "The URL of the OpenMeter API endpoint.",
40
- "examples": [
41
- "https://openmeter.cloud",
42
- "http://localhost:8888",
43
- "http://openmeter.example.com"
44
- ],
45
- "default": "https://openmeter.cloud"
46
- },
47
36
  "apiKey": {
48
37
  "type": "string",
49
38
  "description": "The API key to use when sending metering calls to OpenMeter.",
@@ -119,6 +108,26 @@
119
108
  }
120
109
  ]
121
110
  },
111
+ "requiredEntitlements": {
112
+ "type": "array",
113
+ "description": "A list of entitlements (feature keys) required in order for the call to be allowed.",
114
+ "items": {
115
+ "type": "string"
116
+ },
117
+ "examples": [["api-request"], ["llm_tokens", "api-request"]]
118
+ },
119
+ "apiUrl": {
120
+ "type": "string",
121
+ "x-show-example": false,
122
+ "x-advanced": true,
123
+ "description": "The URL of the OpenMeter API endpoint.",
124
+ "examples": [
125
+ "https://openmeter.cloud",
126
+ "http://localhost:8888",
127
+ "http://openmeter.example.com"
128
+ ],
129
+ "default": "https://openmeter.cloud"
130
+ },
122
131
  "meterOnStatusCodes": {
123
132
  "oneOf": [
124
133
  {
@@ -132,6 +141,7 @@
132
141
  }
133
142
  ],
134
143
  "x-show-example": false,
144
+ "x-advanced": true,
135
145
  "description": "A list of successful status codes and ranges \"200-299, 304\" that should trigger a metering event.",
136
146
  "default": "200-299",
137
147
  "examples": ["200-399"]
@@ -139,21 +149,15 @@
139
149
  "eventSource": {
140
150
  "type": "string",
141
151
  "x-show-example": false,
152
+ "x-advanced": true,
142
153
  "description": "The event's source (e.g. the service name).",
143
154
  "examples": ["api-gateway", "payment-service"],
144
155
  "default": "api-gateway"
145
156
  },
146
- "requiredEntitlements": {
147
- "type": "array",
148
- "description": "A list of entitlements (feature keys) required in order for the call to be allowed.",
149
- "items": {
150
- "type": "string"
151
- },
152
- "examples": [["api-request"], ["llm_tokens", "api-request"]]
153
- },
154
157
  "subjectPath": {
155
158
  "type": "string",
156
159
  "x-show-example": false,
160
+ "x-advanced": true,
157
161
  "description": "The path to the property on `request.user` that contains the subject used for meters and entitlements. For example `.data.accountId` would read the `request.user.data.accountId` property.",
158
162
  "examples": [".sub", ".data.customerId"],
159
163
  "default": ".sub"
@@ -45,15 +45,16 @@
45
45
  "description": "Model to use for classification.",
46
46
  "default": "gpt-3.5-turbo"
47
47
  },
48
- "baseUrl": {
49
- "type": "string",
50
- "description": "Base URL for the OpenAI compatible API.",
51
- "default": "https://api.openai.com/v1"
52
- },
53
48
  "strict": {
54
49
  "type": "boolean",
55
50
  "description": "Whether to block traffic if the classifier fails. When disabled, allows traffic flow if the classifier or inference API is unavailable.",
56
51
  "default": false
52
+ },
53
+ "baseUrl": {
54
+ "type": "string",
55
+ "x-advanced": true,
56
+ "description": "Base URL for the OpenAI compatible API.",
57
+ "default": "https://api.openai.com/v1"
57
58
  }
58
59
  }
59
60
  }
@@ -35,24 +35,26 @@
35
35
  "additionalProperties": false,
36
36
  "required": ["authUrl", "verifierKey"],
37
37
  "properties": {
38
- "allowUnauthenticatedRequests": {
39
- "type": "boolean",
40
- "default": false,
41
- "description": "Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic."
42
- },
43
38
  "authUrl": {
44
39
  "type": "string",
45
- "examples": ["https://6587563.propelauthtest.com"],
46
- "description": "Your PropelAuth authUrl. For example, `https://6587563.propelauthtest.com`."
40
+ "examples": ["https://12345678.propelauthtest.com"],
41
+ "description": "Your PropelAuth authUrl. For example, `https://12345678.propelauthtest.com`."
47
42
  },
48
43
  "verifierKey": {
49
44
  "type": "string",
50
45
  "examples": ["$env(PROPEL_VERIFIER_KEY)"],
51
46
  "description": "Your public (verifier) key that is used to verify access tokens. This key has a value that begins with '\\-\\-\\---BEGIN PUBLIC KEY\\-\\-\\---'. Make sure to remove all line breaks from the key before saving the variable."
52
47
  },
48
+ "allowUnauthenticatedRequests": {
49
+ "type": "boolean",
50
+ "default": false,
51
+ "x-advanced": true,
52
+ "description": "Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic."
53
+ },
53
54
  "oAuthResourceMetadataEnabled": {
54
55
  "type": "boolean",
55
56
  "default": false,
57
+ "x-advanced": true,
56
58
  "description": "Flag that determines whether OAuth protected resource metadata is enabled."
57
59
  }
58
60
  }
@@ -64,7 +66,7 @@
64
66
  "module": "$import(@zuplo/runtime)",
65
67
  "options": {
66
68
  "allowUnauthenticatedRequests": false,
67
- "authUrl": "https://6587563.propelauthtest.com",
69
+ "authUrl": "https://12345678.propelauthtest.com",
68
70
  "oAuthResourceMetadataEnabled": false,
69
71
  "verifierKey": "$env(PROPEL_VERIFIER_KEY)"
70
72
  }
@@ -53,6 +53,7 @@
53
53
  "removeFromUrl": {
54
54
  "type": "boolean",
55
55
  "default": true,
56
+ "x-advanced": true,
56
57
  "description": "Whether to remove the query parameter from the URL after extracting it."
57
58
  }
58
59
  }
@@ -46,12 +46,6 @@
46
46
  "enum": ["user", "function"],
47
47
  "default": "user"
48
48
  },
49
- "quotaAnchorMode": {
50
- "type": "string",
51
- "description": "How the policy determines the anchor date for ongoing quota cycles - defaults to `first-api-call` which uses the first API call for this key.",
52
- "enum": ["first-api-call", "function"],
53
- "default": "first-api-call"
54
- },
55
49
  "allowances": {
56
50
  "type": "object",
57
51
  "description": "The allowances for the quota.",
@@ -59,6 +53,13 @@
59
53
  "type": "number"
60
54
  }
61
55
  },
56
+ "quotaAnchorMode": {
57
+ "type": "string",
58
+ "x-advanced": true,
59
+ "description": "How the policy determines the anchor date for ongoing quota cycles - defaults to `first-api-call` which uses the first API call for this key.",
60
+ "enum": ["first-api-call", "function"],
61
+ "default": "first-api-call"
62
+ },
62
63
  "quotaOnStatusCodes": {
63
64
  "oneOf": [
64
65
  {
@@ -72,6 +73,7 @@
72
73
  }
73
74
  ],
74
75
  "x-show-example": false,
76
+ "x-advanced": true,
75
77
  "description": "A list of successful status codes and ranges \"200-299, 304\" that should trigger a quota increment.",
76
78
  "default": "200-299",
77
79
  "examples": ["200-399"]
@@ -79,6 +81,7 @@
79
81
  "identifier": {
80
82
  "type": "object",
81
83
  "additionalProperties": false,
84
+ "x-advanced": true,
82
85
  "description": "The module and functions to dynamically set the anchor date and/or the key/allowances for this request.",
83
86
  "required": ["module"],
84
87
  "properties": {
@@ -55,6 +55,7 @@
55
55
  "identifier": {
56
56
  "type": "object",
57
57
  "additionalProperties": false,
58
+ "x-advanced": true,
58
59
  "description": "The function that returns dynamic configuration data. Used only with `rateLimitBy=function`.",
59
60
  "required": ["export", "module"],
60
61
  "properties": {
@@ -77,11 +78,13 @@
77
78
  "default": "retry-after",
78
79
  "title": "RateLimitHeaderMode",
79
80
  "enum": ["none", "retry-after"],
81
+ "x-advanced": true,
80
82
  "description": "Adds the retry-after header."
81
83
  },
82
84
  "throwOnFailure": {
83
85
  "type": "boolean",
84
86
  "default": false,
87
+ "x-advanced": true,
85
88
  "description": "If true, the policy will throw an error in the event there is a problem connecting to the rate limit service."
86
89
  },
87
90
  "mode": {
@@ -89,6 +92,7 @@
89
92
  "default": "strict",
90
93
  "title": "RateLimitMode",
91
94
  "enum": ["strict", "async"],
95
+ "x-advanced": true,
92
96
  "description": "The mode of the policy. If set to `async`, the policy will check if the request is over the rate limit without blocking. This can result in some requests allowed over the rate limit."
93
97
  }
94
98
  },
@@ -40,29 +40,33 @@
40
40
  "examples": ["$env(README_API_KEY)"],
41
41
  "description": "The API key to use when sending metrics calls to Readme."
42
42
  },
43
+ "userEmailPropertyPath": {
44
+ "type": "string",
45
+ "default": "",
46
+ "description": "This is the path to the property on `request.user` that contains the e-mail of the user. For example `.data.email` would read the `request.user.data.email` property."
47
+ },
43
48
  "userLabelPropertyPath": {
44
49
  "type": "string",
45
50
  "x-show-example": false,
46
51
  "default": ".sub",
52
+ "x-advanced": true,
47
53
  "description": "This is the path to the property on `request.user` that contains the label you want to use. For example `.data.accountNumber` would read the `request.user.data.accountNumber` property."
48
54
  },
49
- "userEmailPropertyPath": {
50
- "type": "string",
51
- "default": "",
52
- "description": "This is the path to the property on `request.user` that contains the e-mail of the user. For example `.data.email` would read the `request.user.data.email` property."
53
- },
54
55
  "development": {
55
56
  "type": "boolean",
57
+ "x-advanced": true,
56
58
  "description": "Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments."
57
59
  },
58
60
  "useFullRequestPath": {
59
61
  "type": "boolean",
60
62
  "default": false,
63
+ "x-advanced": true,
61
64
  "description": "When true, Zuplo sends the full request path (which might contain sensitive information). By default, we only send the route path which should not contain sensitive information."
62
65
  },
63
66
  "url": {
64
67
  "type": "string",
65
68
  "default": "https://metrics.readme.io/request",
69
+ "x-advanced": true,
66
70
  "description": "The URL to send metering events. This is useful for testing purposes."
67
71
  }
68
72
  }
@@ -42,6 +42,7 @@
42
42
  },
43
43
  "trustContentLengthHeader": {
44
44
  "type": "boolean",
45
+ "x-advanced": true,
45
46
  "description": "If true, the policy will reject any request with a `content-length` header in excess of `maxSizeInBytes` bytes value, but will not verify the actual size of the request. This is more efficient and offers slightly better memory usage but should only be used if you trust/control the clients calling the gateway to send an accurate content-length. If false, the gateway will actually verify the request size and reject any request with a size in excess of the stated maximum."
46
47
  }
47
48
  }
@@ -35,12 +35,6 @@
35
35
  "additionalProperties": false,
36
36
  "required": [],
37
37
  "properties": {
38
- "logLevel": {
39
- "type": "string",
40
- "default": "info",
41
- "description": "The log level to use when logging validation errors.",
42
- "enum": ["error", "warn", "info", "debug"]
43
- },
44
38
  "validateBody": {
45
39
  "examples": ["reject-and-log"],
46
40
  "type": "string",
@@ -72,9 +66,17 @@
72
66
  "description": "The action to perform when validation fails.",
73
67
  "enum": ["none", "log-only", "reject-and-log", "reject-only"]
74
68
  },
69
+ "logLevel": {
70
+ "type": "string",
71
+ "default": "info",
72
+ "x-advanced": true,
73
+ "description": "The log level to use when logging validation errors.",
74
+ "enum": ["error", "warn", "info", "debug"]
75
+ },
75
76
  "includeRequestInLogs": {
76
77
  "type": "boolean",
77
78
  "default": false,
79
+ "x-advanced": true,
78
80
  "description": "Whether to include the request in the logs."
79
81
  }
80
82
  }
@@ -46,6 +46,7 @@
46
46
  "examples": [
47
47
  "Your origin is not authorized to make this request."
48
48
  ],
49
+ "x-advanced": true,
49
50
  "description": "The `detail` of the HTTP Problem response, if the origin is missing or disallowed."
50
51
  }
51
52
  }
@@ -58,9 +58,15 @@
58
58
  "enum": ["function", "propertyPath"],
59
59
  "description": "Determines how the cache key is generated. Use 'function' for custom logic or 'propertyPath' to extract from JSON body."
60
60
  },
61
+ "cacheByPropertyPath": {
62
+ "type": "string",
63
+ "description": "The path to the property in the request body (JSON) to use as cache key. For example '.userId' would read the 'userId' property from the request body. Only works with cacheBy=propertyPath.",
64
+ "examples": [".userId", ".data.customerId"]
65
+ },
61
66
  "cacheByFunction": {
62
67
  "type": "object",
63
68
  "additionalProperties": false,
69
+ "x-advanced": true,
64
70
  "description": "The function that returns dynamic cache key data. Used only with `cacheBy=function`.",
65
71
  "required": ["export", "module"],
66
72
  "properties": {
@@ -76,11 +82,6 @@
76
82
  }
77
83
  }
78
84
  },
79
- "cacheByPropertyPath": {
80
- "type": "string",
81
- "description": "The path to the property in the request body (JSON) to use as cache key. For example '.userId' would read the 'userId' property from the request body. Only works with cacheBy=propertyPath.",
82
- "examples": [".userId", ".data.customerId"]
83
- },
84
85
  "statusCodes": {
85
86
  "type": "array",
86
87
  "items": {
@@ -88,16 +89,19 @@
88
89
  },
89
90
  "examples": [[200, 201]],
90
91
  "default": [200, 206, 301, 302, 303, 410],
92
+ "x-advanced": true,
91
93
  "description": "Response status codes to be cached."
92
94
  },
93
95
  "returnCacheStatusHeader": {
94
96
  "type": "boolean",
95
97
  "default": false,
98
+ "x-advanced": true,
96
99
  "description": "If true, the policy will return a custom header with the cache status. The default header name is `zp-semantic-cache`."
97
100
  },
98
101
  "cacheStatusHeaderName": {
99
102
  "type": "string",
100
103
  "default": "zp-semantic-cache",
104
+ "x-advanced": true,
101
105
  "description": "The name of the header to return the cache status. Only used if `returnCacheStatusHeader` is true."
102
106
  }
103
107
  },
@@ -43,6 +43,7 @@
43
43
  "statusText": {
44
44
  "type": "string",
45
45
  "examples": ["OK", "Not Found"],
46
+ "x-advanced": true,
46
47
  "description": "The statusText to be used in the response."
47
48
  }
48
49
  }
@@ -35,21 +35,23 @@
35
35
  "additionalProperties": false,
36
36
  "required": ["value"],
37
37
  "properties": {
38
+ "value": {
39
+ "type": "string",
40
+ "examples": ["Bearer $env(UPSTREAM_API_KEY)"],
41
+ "description": "The value of the header. Most commonly an environment variable reference such as `Bearer $env(UPSTREAM_API_KEY)` so the secret is sourced from your environment."
42
+ },
38
43
  "header": {
39
44
  "type": "string",
40
45
  "default": "Authorization",
41
46
  "examples": ["Authorization"],
47
+ "x-advanced": true,
42
48
  "description": "The name of the header to set on the request. Defaults to `Authorization`."
43
49
  },
44
- "value": {
45
- "type": "string",
46
- "examples": ["Bearer $env(UPSTREAM_API_KEY)"],
47
- "description": "The value of the header. Most commonly an environment variable reference such as `Bearer $env(UPSTREAM_API_KEY)` so the secret is sourced from your environment."
48
- },
49
50
  "overwrite": {
50
51
  "type": "boolean",
51
52
  "x-show-example": false,
52
53
  "default": true,
54
+ "x-advanced": true,
53
55
  "description": "Overwrite the value if the header is already present in the request."
54
56
  }
55
57
  }
@@ -42,7 +42,8 @@
42
42
  "tolerance": {
43
43
  "type": "number",
44
44
  "default": 300,
45
- "description": "The allowed clock skew in seconds between the time the webhook signature was crated and the current time."
45
+ "x-advanced": true,
46
+ "description": "The allowed clock skew in seconds between the time the webhook signature was created and the current time."
46
47
  }
47
48
  }
48
49
  }
@@ -40,11 +40,6 @@
40
40
  "examples": ["$env(SUPABASE_JWT_SECRET)"],
41
41
  "description": "The key used to verify the signature of the JWT token."
42
42
  },
43
- "allowUnauthenticatedRequests": {
44
- "type": "boolean",
45
- "default": false,
46
- "description": "Indicates whether the request should continue if authentication fails. Default is `false` which means unauthenticated users will automatically receive a 401 response."
47
- },
48
43
  "requiredClaims": {
49
44
  "type": "object",
50
45
  "examples": [
@@ -60,9 +55,16 @@
60
55
  },
61
56
  "description": "Any claims that must be present for authentication to succeed - multiple valid values can be specified for each claim."
62
57
  },
58
+ "allowUnauthenticatedRequests": {
59
+ "type": "boolean",
60
+ "default": false,
61
+ "x-advanced": true,
62
+ "description": "Indicates whether the request should continue if authentication fails. Default is `false` which means unauthenticated users will automatically receive a 401 response."
63
+ },
63
64
  "oAuthResourceMetadataEnabled": {
64
65
  "type": "boolean",
65
66
  "default": false,
67
+ "x-advanced": true,
66
68
  "description": "Flag that determines whether OAuth protected resource metadata is enabled."
67
69
  }
68
70
  }
@@ -67,6 +67,7 @@
67
67
  "type": "boolean",
68
68
  "default": false,
69
69
  "x-show-example": false,
70
+ "x-advanced": true,
70
71
  "description": "When `true`, logs which base path was selected for each request. Defaults to `false`."
71
72
  }
72
73
  },
@@ -0,0 +1,78 @@
1
+ ## Overview
2
+
3
+ The Upstream AWS Federated Auth policy obtains AWS credentials **without storing
4
+ any AWS keys**. It exchanges Zuplo's ambient OIDC identity token for an IAM
5
+ role's short-lived temporary credentials using STS
6
+ `AssumeRoleWithWebIdentity`, then registers those credentials on the request
7
+ context.
8
+
9
+ Like the `upstream-aws-service-auth` policy, it does **not** add an
10
+ `Authorization` header itself — AWS Signature Version 4 signs the exact final
11
+ request, which is only known inside the handler. The AWS Lambda handler and your
12
+ own code read the resolved credentials and sign the requests they build.
13
+
14
+ ## AWS setup
15
+
16
+ 1. Create an **IAM OIDC identity provider** that trusts the Zuplo issuer. Set
17
+ the audience (client ID) to the value you use for the `audience` option
18
+ (default `sts.amazonaws.com`).
19
+ 2. Create an **IAM role** whose trust policy allows
20
+ `sts:AssumeRoleWithWebIdentity` for that provider, with a condition on the
21
+ token's audience.
22
+ 3. Grant the role only the permissions the gateway needs (for example
23
+ `execute-api:Invoke` or `lambda:InvokeFunction`).
24
+
25
+ ## Using the credentials
26
+
27
+ ### With the AWS Lambda handler
28
+
29
+ ```json
30
+ {
31
+ "paths": {
32
+ "/lambda/{path}*": {
33
+ "x-zuplo-route": {
34
+ "handler": {
35
+ "export": "awsLambdaHandler",
36
+ "module": "$import(@zuplo/runtime)",
37
+ "options": { "region": "us-east-1", "functionName": "my-function" }
38
+ },
39
+ "policies": { "inbound": ["upstream-aws-federated-auth"] }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ ### With custom code
47
+
48
+ ```typescript
49
+ import { AwsClient } from "@zuplo/runtime/aws";
50
+ import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
51
+
52
+ export default async function (request: ZuploRequest, context: ZuploContext) {
53
+ const aws = AwsClient.fromContext(context, {
54
+ service: "execute-api",
55
+ region: "us-east-1",
56
+ });
57
+ return aws.fetch(
58
+ "https://abc123.execute-api.us-east-1.amazonaws.com/prod/orders"
59
+ );
60
+ }
61
+ ```
62
+
63
+ ## Configuration
64
+
65
+ ```json
66
+ {
67
+ "name": "upstream-aws-federated-auth",
68
+ "policyType": "upstream-aws-federated-auth",
69
+ "handler": {
70
+ "export": "UpstreamAwsFederatedAuthInboundPolicy",
71
+ "module": "$import(@zuplo/runtime)",
72
+ "options": {
73
+ "roleArn": "arn:aws:iam::123456789012:role/zuplo-gateway",
74
+ "region": "us-east-1"
75
+ }
76
+ }
77
+ }
78
+ ```