@zuplo/runtime 5.2340.0 → 5.2342.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/out/cjs/index.js +1 -1
- package/out/esm/index.js +1 -1
- package/out/types/index.d.ts +29 -337
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -2,15 +2,8 @@ import { KeyLike } from 'jose';
|
|
|
2
2
|
import type { ValidateFunction as ValidateFunction_2 } from 'ajv';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Amberflo is a usage metering and billing service. This policy allows
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Amberflo {@link https://www.amberflo.io|amberflo.com} is a usage metering and
|
|
9
|
-
* billing service. This policy allows you to meter API calls going through Zuplo
|
|
10
|
-
* and send them to your Amberflo account using your Amberflo API key.
|
|
11
|
-
*
|
|
12
|
-
* Add the policy to each route you want to meter. Note you can specify the Meter
|
|
13
|
-
* API Name and Meter Value (meter increment) at the policy level.
|
|
5
|
+
* Amberflo is a usage metering and billing service. This policy allows
|
|
6
|
+
* you to send metering calls for each API to their meter ingest endpoint.
|
|
14
7
|
*
|
|
15
8
|
* @title Amberflo Metering / Billing
|
|
16
9
|
* @public
|
|
@@ -79,16 +72,7 @@ declare interface AmberfloMeteringProperties extends Omit<AmberfloMeteringIngest
|
|
|
79
72
|
}
|
|
80
73
|
|
|
81
74
|
/**
|
|
82
|
-
* Authenticates requests based on API Keys using Zuplo API Management.
|
|
83
|
-
* can learn more about the Zuplo API Key Service
|
|
84
|
-
* [here](https://zuplo.com/docs/articles/api-key-api#buckets)
|
|
85
|
-
*
|
|
86
|
-
* @remarks
|
|
87
|
-
* This policy uses the managed API key storage provided by Zuplo.
|
|
88
|
-
* `allowUnauthenticatedRequests` defaults to false and rejects any request without
|
|
89
|
-
* a valid API key (returning a `401 - Unauthorized` response). You can override
|
|
90
|
-
* (set `"allowUnauthenticatedRequests" : true`) this to support multiple
|
|
91
|
-
* authentication methods or support both authenticated and anonymous requests.
|
|
75
|
+
* Authenticates requests based on API Keys using Zuplo API Management.
|
|
92
76
|
*
|
|
93
77
|
* @deprecated Please use the new {@link https://zuplo.com/docs/policies/api-key-inbound|API Key Authentication} policy
|
|
94
78
|
* instead. This policy will continue to work but will be removed in a future
|
|
@@ -116,19 +100,7 @@ export declare interface ApiAuthKeyInboundPolicyOptions {
|
|
|
116
100
|
}
|
|
117
101
|
|
|
118
102
|
/**
|
|
119
|
-
* Authenticates requests based on API Keys using Zuplo API Management.
|
|
120
|
-
*
|
|
121
|
-
* @remarks
|
|
122
|
-
* Authenticate requests with Zuplo's fully managed API Key service. This policy is
|
|
123
|
-
* the easiest way to secure your API and can be combined with other policies like
|
|
124
|
-
* Rate limiting, quotas, and more to build a fully featured API to support your
|
|
125
|
-
* partners, developers, or customers.
|
|
126
|
-
*
|
|
127
|
-
* For more information on Zuplo's API Key Management service and options enabling
|
|
128
|
-
* self-serve API Key management see the following resources:
|
|
129
|
-
*
|
|
130
|
-
* - {@link https://zuplo.com/docs/articles/api-key-management|API Key Authentication Overview}
|
|
131
|
-
* - {@link https://zuplo.com/docs/articles/api-key-api|API Key Management API}
|
|
103
|
+
* Authenticates requests based on API Keys using Zuplo API Management.
|
|
132
104
|
*
|
|
133
105
|
* @title API Key Authentication
|
|
134
106
|
* @public
|
|
@@ -304,11 +276,6 @@ declare interface AuditLogRequestFilter {
|
|
|
304
276
|
/**
|
|
305
277
|
* Authenticate users using Auth0 issued JWT tokens.
|
|
306
278
|
*
|
|
307
|
-
* @remarks
|
|
308
|
-
* Authenticate requests with JWT tokens issued by Auth0. This is a customized
|
|
309
|
-
* version of the {@link https://zuplo.com/docs/policies/open-id-jwt-auth-inbound|OpenId JWT Policy} specifically
|
|
310
|
-
* for Auth0.
|
|
311
|
-
*
|
|
312
279
|
* @title Auth0 JWT Auth
|
|
313
280
|
* @public
|
|
314
281
|
* @param request - The ZuploRequest
|
|
@@ -474,19 +441,6 @@ export declare class AWSLoggingPlugin extends LogPlugin {
|
|
|
474
441
|
/**
|
|
475
442
|
* Authorize requests using Axiomatics Policy Server.
|
|
476
443
|
*
|
|
477
|
-
* @remarks
|
|
478
|
-
* This policy will authorize requests using Axiomatics Policy Server. If the
|
|
479
|
-
* request is not authorized, a 403 response will be returned.
|
|
480
|
-
*
|
|
481
|
-
* This policy is designed to be highly customizable in order to tailor the
|
|
482
|
-
* authorization requests to the specific needs of your application. You can
|
|
483
|
-
* add default attributes on the policy that are included in every request, or
|
|
484
|
-
* you can programmatically add attributes to the request using the
|
|
485
|
-
* `setAuthAttributes` method.
|
|
486
|
-
*
|
|
487
|
-
* Using this policy in conjunction with an authorization policy will automatically
|
|
488
|
-
* set AttributeSubject attributes for the user in the request.
|
|
489
|
-
*
|
|
490
444
|
* @title Axiomatics Authorization Inbound
|
|
491
445
|
* @beta
|
|
492
446
|
* @param request - The ZuploRequest
|
|
@@ -644,17 +598,6 @@ declare interface BasicAuthAccount {
|
|
|
644
598
|
/**
|
|
645
599
|
* Authenticate requests using basic auth (i.e. username and password)
|
|
646
600
|
*
|
|
647
|
-
* @remarks
|
|
648
|
-
* The Basic Authentication policy allows you to authenticate incoming requests
|
|
649
|
-
* using the Basic authentication standard. You can configure multiple accounts
|
|
650
|
-
* with different passwords and a different bucket of user 'data'.
|
|
651
|
-
*
|
|
652
|
-
* The API will expect a Basic Auth header (you can generate samples
|
|
653
|
-
* {@link https://www.debugbear.com/basic-auth-header-generator|here}). Requests with
|
|
654
|
-
* invalid credentials (or no header) will not be authenticated. Authenticated
|
|
655
|
-
* requests will populate the `user` property of the `ZuploRequest` parameter on
|
|
656
|
-
* your RequestHandler.
|
|
657
|
-
*
|
|
658
601
|
* @title Basic Auth
|
|
659
602
|
* @public
|
|
660
603
|
* @param request - The ZuploRequest
|
|
@@ -689,20 +632,6 @@ declare interface BatchDispatcherOptions {
|
|
|
689
632
|
/**
|
|
690
633
|
* Authenticate requests based on the mTLS protocol.
|
|
691
634
|
*
|
|
692
|
-
* @remarks
|
|
693
|
-
* The brownout policy allows performing scheduled downtime on your API. This can
|
|
694
|
-
* be useful for helping notify clients of an impending deprecation or for
|
|
695
|
-
* scheduling maintenance.
|
|
696
|
-
*
|
|
697
|
-
* This policy uses {@link https://crontab.guru|cron schedules} to check if a request
|
|
698
|
-
* should experience a brownout or not. When a request falls into a scheduled
|
|
699
|
-
* brownout an error response will be return. The error response can be customized
|
|
700
|
-
* by setting the `problem` properties.
|
|
701
|
-
*
|
|
702
|
-
* For more information using brownouts to alert clients on impending API
|
|
703
|
-
* changes/deprecations see our blog post
|
|
704
|
-
* {@link https://zuplo.com/blog/2022/05/17/how-to-version-an-api|How to version an API}
|
|
705
|
-
*
|
|
706
635
|
* @title Brown Out
|
|
707
636
|
* @public
|
|
708
637
|
* @param request - The ZuploRequest
|
|
@@ -913,11 +842,6 @@ export declare interface ClearHeadersOutboundPolicyOptions {
|
|
|
913
842
|
/**
|
|
914
843
|
* Authenticate users using Clerk issued JWT tokens.
|
|
915
844
|
*
|
|
916
|
-
* @remarks
|
|
917
|
-
* Authenticate requests with JWT tokens issued by Clerk. This is a customized
|
|
918
|
-
* version of the {@link https://zuplo.com/docs/policies/open-id-jwt-auth-inbound|OpenId JWT Policy} specifically
|
|
919
|
-
* for Clerk.
|
|
920
|
-
*
|
|
921
845
|
* @title Clerk JWT Auth
|
|
922
846
|
* @public
|
|
923
847
|
* @param request - The ZuploRequest
|
|
@@ -971,14 +895,6 @@ declare interface ClientCredentialsConfig {
|
|
|
971
895
|
/**
|
|
972
896
|
* Authenticate requests with JWT tokens issued by AWS Cognito.
|
|
973
897
|
*
|
|
974
|
-
* @remarks
|
|
975
|
-
* Authenticate requests with JWT tokens issued by AWS Cognito. This is a
|
|
976
|
-
* customized version of the {@link https://zuplo.com/docs/policies/open-id-jwt-auth-inbound|OpenId JWT Policy}
|
|
977
|
-
* specifically for AWS Cognito.
|
|
978
|
-
*
|
|
979
|
-
* See {@link https://zuplo.com/docs/articles/oauth-authentication|this document} for more information
|
|
980
|
-
* about OAuth authorization in Zuplo.
|
|
981
|
-
*
|
|
982
898
|
* @title AWS Cognito JWT Auth
|
|
983
899
|
* @public
|
|
984
900
|
* @param request - The ZuploRequest
|
|
@@ -1048,10 +964,6 @@ export declare type ComplexRateLimitFunction = RateLimitFunction<ComplexCustomRa
|
|
|
1048
964
|
* The Complex Rate Limiting policy is an advanced rate limiting policy that
|
|
1049
965
|
* let's you set rate limits based on custom counters (not just requests)
|
|
1050
966
|
*
|
|
1051
|
-
* @remarks
|
|
1052
|
-
* You can use the Complex Rate Limiting policy to limit the number of requests
|
|
1053
|
-
* based on complex counters, based on details of the request or the response
|
|
1054
|
-
*
|
|
1055
967
|
* @title Complex Rate Limiting
|
|
1056
968
|
* @enterprise
|
|
1057
969
|
* @param request - The ZuploRequest
|
|
@@ -1064,20 +976,6 @@ export declare class ComplexRateLimitInboundPolicy extends InboundPolicy<Complex
|
|
|
1064
976
|
/**
|
|
1065
977
|
* Override the increments for a limit in the current request.
|
|
1066
978
|
*
|
|
1067
|
-
* @remarks
|
|
1068
|
-
* If your policy is has a limit set as follows:
|
|
1069
|
-
*
|
|
1070
|
-
* ```
|
|
1071
|
-
* "limits": {
|
|
1072
|
-
* "compute": 10
|
|
1073
|
-
* }
|
|
1074
|
-
* ```
|
|
1075
|
-
*
|
|
1076
|
-
* You can use this function to override the increments of the `compute` limit
|
|
1077
|
-
* by calling `setIncrements(context, { compute: 5 })` on a custom policy.
|
|
1078
|
-
* This can be useful if you want to dynamically change the increments of a limit
|
|
1079
|
-
* based on data in the response (say a header).
|
|
1080
|
-
*
|
|
1081
979
|
* @param context - The ZuploContext
|
|
1082
980
|
* @param increments - The increments to set.
|
|
1083
981
|
*/
|
|
@@ -1126,13 +1024,6 @@ export declare interface ComplexRateLimitInboundPolicyOptions {
|
|
|
1126
1024
|
/**
|
|
1127
1025
|
* Creates a composite, or group policy - composed of other policies. For reuse across routes.
|
|
1128
1026
|
*
|
|
1129
|
-
* @remarks
|
|
1130
|
-
* The Composite policy allows you to create groups of other policies, for easy
|
|
1131
|
-
* reuse across multiple routes. Other policies are referenced by their `name`.
|
|
1132
|
-
*
|
|
1133
|
-
* Be careful not to create circular references which can cause your gateway to
|
|
1134
|
-
* fail.
|
|
1135
|
-
*
|
|
1136
1027
|
* @title Composite Inbound (Group Policies)
|
|
1137
1028
|
* @public
|
|
1138
1029
|
* @param request - The ZuploRequest
|
|
@@ -1312,11 +1203,6 @@ export declare class CryptoBeta extends BaseCryptoBeta {
|
|
|
1312
1203
|
/**
|
|
1313
1204
|
* Authenticate users using the Curity Phantom Token Pattern.
|
|
1314
1205
|
*
|
|
1315
|
-
* @remarks
|
|
1316
|
-
* Authenticate requests with Phantom Tokens issued by Curity. The payload of the
|
|
1317
|
-
* Phantom JWT token, if successfully authenticated, with be on the
|
|
1318
|
-
* `request.user.data` object accessible to the runtime.
|
|
1319
|
-
*
|
|
1320
1206
|
* @title Curity Phantom Token Auth
|
|
1321
1207
|
* @public
|
|
1322
1208
|
* @param request - The ZuploRequest
|
|
@@ -1448,14 +1334,6 @@ export declare interface ErrorHandler {
|
|
|
1448
1334
|
/**
|
|
1449
1335
|
* Authenticate users using Firebase issued JWT tokens.
|
|
1450
1336
|
*
|
|
1451
|
-
* @remarks
|
|
1452
|
-
* Authenticate requests with JWT tokens issued by Firebase. The payload of the JWT
|
|
1453
|
-
* token, if successfully authenticated, with be on the `request.user.data` object
|
|
1454
|
-
* accessible to the runtime.
|
|
1455
|
-
*
|
|
1456
|
-
* See {@link https://zuplo.com/docs/articles/oauth-authentication|this document} for more information
|
|
1457
|
-
* about OAuth authorization in Zuplo.
|
|
1458
|
-
*
|
|
1459
1337
|
* @title Firebase JWT Auth
|
|
1460
1338
|
* @public
|
|
1461
1339
|
* @param request - The ZuploRequest
|
|
@@ -3069,15 +2947,8 @@ declare interface MoesifContext {
|
|
|
3069
2947
|
}
|
|
3070
2948
|
|
|
3071
2949
|
/**
|
|
3072
|
-
* Moesif is an API analytics and billing service. This policy allows you to
|
|
3073
|
-
*
|
|
3074
|
-
* @remarks
|
|
3075
|
-
* Moesif {@link https://moesif.com|moesif.com} is an API analytics and monetization
|
|
3076
|
-
* platform. This policy allows you to measure (and meter) API calls flowing
|
|
3077
|
-
* through your Zuplo gateway.
|
|
3078
|
-
*
|
|
3079
|
-
* Add the policy to each route you want to meter. Note you can specify the Meter
|
|
3080
|
-
* API Name and Meter Value (meter increment) at the policy level.
|
|
2950
|
+
* Moesif is an API analytics and billing service. This policy allows you to
|
|
2951
|
+
* send metering calls for each API to their events batch endpoint.
|
|
3081
2952
|
*
|
|
3082
2953
|
* @title Moesif Analytics & Billing
|
|
3083
2954
|
* @public
|
|
@@ -3110,13 +2981,6 @@ export declare interface MoesifInboundPolicyOptions {
|
|
|
3110
2981
|
/**
|
|
3111
2982
|
* The Monetization policy enables you to track & monetize by your API's usage
|
|
3112
2983
|
*
|
|
3113
|
-
* @remarks
|
|
3114
|
-
* The Monetization policy allows you to track and monetize the usage of our API resources,
|
|
3115
|
-
* declaratively and programatically.
|
|
3116
|
-
*
|
|
3117
|
-
* Follow our {@link https://zuplo.com/docs/articles/monetization-dev-portal-setup|Quickstart guide for Monetization}
|
|
3118
|
-
* to get started.
|
|
3119
|
-
*
|
|
3120
2984
|
* @title Monetization
|
|
3121
2985
|
* @beta
|
|
3122
2986
|
* @param request - The ZuploRequest
|
|
@@ -3199,11 +3063,6 @@ declare interface NotFoundOptions {
|
|
|
3199
3063
|
/**
|
|
3200
3064
|
* Authorize requests using Okta FGA.
|
|
3201
3065
|
*
|
|
3202
|
-
* @remarks
|
|
3203
|
-
* This policy will authorize requests using Okta FGA. If the
|
|
3204
|
-
* request is not authorized, a 403 response will be returned.
|
|
3205
|
-
*
|
|
3206
|
-
*
|
|
3207
3066
|
* @title Okta FGA Authorization Inbound
|
|
3208
3067
|
* @beta
|
|
3209
3068
|
* @param request - The ZuploRequest
|
|
@@ -3252,14 +3111,6 @@ export declare interface OktaFGAAuthZInboundPolicyOptions {
|
|
|
3252
3111
|
/**
|
|
3253
3112
|
* Authenticate users using Okta issued JWT tokens.
|
|
3254
3113
|
*
|
|
3255
|
-
* @remarks
|
|
3256
|
-
* Authenticate requests with JWT tokens issued by Okta. This is a customized
|
|
3257
|
-
* version of the {@link https://zuplo.com/docs/policies/open-id-jwt-auth-inbound|OpenId JWT Policy} specifically
|
|
3258
|
-
* for Okta.
|
|
3259
|
-
*
|
|
3260
|
-
* See {@link https://zuplo.com/docs/articles/oauth-authentication|this document} for more information
|
|
3261
|
-
* about OAuth authorization in Zuplo.
|
|
3262
|
-
*
|
|
3263
3114
|
* @title Okta JWT Auth
|
|
3264
3115
|
* @public
|
|
3265
3116
|
* @param request - The ZuploRequest
|
|
@@ -3786,11 +3637,6 @@ declare namespace OpenAPIV3_1 {
|
|
|
3786
3637
|
/**
|
|
3787
3638
|
* Authorize requests using OpenFGA.
|
|
3788
3639
|
*
|
|
3789
|
-
* @remarks
|
|
3790
|
-
* This policy will authorize requests using OpenFGA. If the
|
|
3791
|
-
* request is not authorized, a 403 response will be returned.
|
|
3792
|
-
*
|
|
3793
|
-
*
|
|
3794
3640
|
* @title OpenFGA Authorization Inbound
|
|
3795
3641
|
* @beta
|
|
3796
3642
|
* @param request - The ZuploRequest
|
|
@@ -3847,22 +3693,8 @@ declare interface OpenFGACheck {
|
|
|
3847
3693
|
}
|
|
3848
3694
|
|
|
3849
3695
|
/**
|
|
3850
|
-
* The Open ID JWT Authentication policy allows you to authenticate incoming requests using an Open ID compliant bearer token.
|
|
3851
|
-
*
|
|
3852
|
-
* @remarks
|
|
3853
3696
|
* The Open ID JWT Authentication policy allows you to authenticate incoming
|
|
3854
|
-
* requests using an Open ID
|
|
3855
|
-
* authentication services like Auth0 (sample here) but should also work with any
|
|
3856
|
-
* valid Open ID JWT token.
|
|
3857
|
-
*
|
|
3858
|
-
* When configured, you can have Zuplo check incoming requests for a JWT token and
|
|
3859
|
-
* automatically populate the `ZuploRequest` 's `user` property with a user object.
|
|
3860
|
-
* This `user` object will have a `sub` property - taking the `sub` id from the JWT
|
|
3861
|
-
* token. It will also have a `data` property populated by other data returned in
|
|
3862
|
-
* the JWT token (including any claims).
|
|
3863
|
-
*
|
|
3864
|
-
* See {@link https://zuplo.com/docs/articles/oauth-authentication|this document} for more information
|
|
3865
|
-
* about OAuth authorization in Zuplo.
|
|
3697
|
+
* requests using an Open ID compliant bearer token.
|
|
3866
3698
|
*
|
|
3867
3699
|
* @title JWT Auth
|
|
3868
3700
|
* @public
|
|
@@ -4109,11 +3941,6 @@ export declare class ProblemResponseFormatter {
|
|
|
4109
3941
|
/**
|
|
4110
3942
|
* Authenticate users using PropelAuth issued JWT tokens.
|
|
4111
3943
|
*
|
|
4112
|
-
* @remarks
|
|
4113
|
-
* Authenticate requests with JWT tokens issued by {@link https://propelauth.com|PropelAuth}.
|
|
4114
|
-
* This is a customized version of the {@link https://zuplo.com/docs/policies/open-id-jwt-auth-inbound|OpenId JWT Policy}
|
|
4115
|
-
* specifically for PropelAuth.
|
|
4116
|
-
*
|
|
4117
3944
|
* @title PropelAuth JWT Auth
|
|
4118
3945
|
* @public
|
|
4119
3946
|
* @param request - The ZuploRequest
|
|
@@ -4165,21 +3992,8 @@ declare type RateLimitHeaderMode = "none" | "retry-after";
|
|
|
4165
3992
|
declare type RateLimitHeaderMode_2 = "none" | "retry-after";
|
|
4166
3993
|
|
|
4167
3994
|
/**
|
|
4168
|
-
* The rate-limiting policy is used to limit the number of requests that
|
|
4169
|
-
*
|
|
4170
|
-
* @remarks
|
|
4171
|
-
* Rate-limiting allows you to set a maximum rate of requests for your API gateway.
|
|
4172
|
-
* This is useful to enforce rate limits agreed with your clients and protect your
|
|
4173
|
-
* downstream services.
|
|
4174
|
-
*
|
|
4175
|
-
* The Zuplo Rate-Limit allows you to limit based on different attributes of the
|
|
4176
|
-
* incoming request. For example, you might set a rate limit of 10 requests per
|
|
4177
|
-
* second per user, or 20 requests per second for a given IP address.
|
|
4178
|
-
*
|
|
4179
|
-
* The Zuplo rate-limiter also allows you to set a custom bucket name by which to
|
|
4180
|
-
* effect a rate-limit using a function.
|
|
4181
|
-
*
|
|
4182
|
-
* When a client reaches a rate limit - they will receive a `429` response code.
|
|
3995
|
+
* The rate-limiting policy is used to limit the number of requests that
|
|
3996
|
+
* can be made against your API based on a key.
|
|
4183
3997
|
*
|
|
4184
3998
|
* @title Rate Limiting
|
|
4185
3999
|
* @public
|
|
@@ -4270,12 +4084,8 @@ declare interface ReadmeMeteringInboundPolicyOptions {
|
|
|
4270
4084
|
}
|
|
4271
4085
|
|
|
4272
4086
|
/**
|
|
4273
|
-
* Readme is a developer documentation and API metrics company. This
|
|
4274
|
-
*
|
|
4275
|
-
* @remarks
|
|
4276
|
-
* {@link https://readme.com|Readme} is a developer Documentation and
|
|
4277
|
-
* metrics service. This policy pushes the request/response data to their ingestion
|
|
4278
|
-
* endpoint so you can see your Zuplo API traffic in their API calls dashboard.
|
|
4087
|
+
* Readme is a developer documentation and API metrics company. This
|
|
4088
|
+
* policy pushes logs to their API calls dashboard.
|
|
4279
4089
|
*
|
|
4280
4090
|
* @title Readme Metrics
|
|
4281
4091
|
* @public
|
|
@@ -4483,15 +4293,7 @@ export declare interface RequestUser<TUserData> {
|
|
|
4483
4293
|
}
|
|
4484
4294
|
|
|
4485
4295
|
/**
|
|
4486
|
-
* Validate inbound requests based on Open API specification
|
|
4487
|
-
*
|
|
4488
|
-
* @remarks
|
|
4489
|
-
* The Request Validation policy is used to validate incoming requests based on
|
|
4490
|
-
* schemas in OpenAPI specifications.
|
|
4491
|
-
*
|
|
4492
|
-
* When configured, any requests that do not conform to your OpenAPI schema will be
|
|
4493
|
-
* rejected with a `400: Bad Request` response containing a detailed error message
|
|
4494
|
-
* (in JSON) explaining why the request was not accepted.
|
|
4296
|
+
* Validate inbound requests based on Open API specification.
|
|
4495
4297
|
*
|
|
4496
4298
|
* @title Request Validation
|
|
4497
4299
|
* @public
|
|
@@ -4524,20 +4326,6 @@ export declare interface RequestValidationInboundPolicyOptions {
|
|
|
4524
4326
|
/**
|
|
4525
4327
|
* Sets an allow-list for an origin header
|
|
4526
4328
|
*
|
|
4527
|
-
* @remarks
|
|
4528
|
-
* The Require Origin policy is used to enforce that the client is sending an
|
|
4529
|
-
* `origin` header that matches your allow-list specified in the policy options.
|
|
4530
|
-
*
|
|
4531
|
-
* This is useful if you want to stop any browser traffic from different domains.
|
|
4532
|
-
*
|
|
4533
|
-
* However, it is important to note that it does not guarantee that traffic is only
|
|
4534
|
-
* coming from a browser. Somebody could simulate a browser request from a backend
|
|
4535
|
-
* server and set any origin they like.
|
|
4536
|
-
*
|
|
4537
|
-
* If the incoming origin is missing, or not allowed - a 400 Forbidden Problem
|
|
4538
|
-
* Response will be sent to the client. You can customize the `detail` property in
|
|
4539
|
-
* the policy options.
|
|
4540
|
-
*
|
|
4541
4329
|
* @title Require Origin
|
|
4542
4330
|
* @public
|
|
4543
4331
|
* @param request - The ZuploRequest
|
|
@@ -4723,15 +4511,8 @@ export declare interface ServiceProvider {
|
|
|
4723
4511
|
/* Excluded from this release type: ServiceProviderImpl */
|
|
4724
4512
|
|
|
4725
4513
|
/**
|
|
4726
|
-
* Sets the body of the request in the inbound pipeline - make sure to convert
|
|
4727
|
-
*
|
|
4728
|
-
* @remarks
|
|
4729
|
-
* The Set Body policy allows you to set or override the incoming request body.
|
|
4730
|
-
* {@link https://zuplo.com/docs/articles/zp-body-removed|GET or HEAD requests do not support bodies on Zuplo},
|
|
4731
|
-
* so be sure to use the {@link https://zuplo.com/docs/policies/change-method-inbound|Change Method}
|
|
4732
|
-
* policy to update the method to a `POST` or whatever is appropriate. You might
|
|
4733
|
-
* also need to use the {@link https://zuplo.com/docs/policies/set-headers-inbound|Set Header} policy to
|
|
4734
|
-
* set a `content-type`.
|
|
4514
|
+
* Sets the body of the request in the inbound pipeline - make sure to convert
|
|
4515
|
+
* a GET/HEAD request to another method when using this policy.
|
|
4735
4516
|
*
|
|
4736
4517
|
* @title Set Body
|
|
4737
4518
|
* @public
|
|
@@ -4756,10 +4537,6 @@ export declare interface SetBodyInboundPolicyOptions {
|
|
|
4756
4537
|
/**
|
|
4757
4538
|
* Adds or sets headers on the incoming request.
|
|
4758
4539
|
*
|
|
4759
|
-
* @remarks
|
|
4760
|
-
* The set header policy adds a header to the request in the inbound pipeline. This
|
|
4761
|
-
* can be used to set a security header required by the downstream service.
|
|
4762
|
-
*
|
|
4763
4540
|
* @title Add or Set Request Headers
|
|
4764
4541
|
* @public
|
|
4765
4542
|
* @param request - The ZuploRequest
|
|
@@ -4963,10 +4740,6 @@ export declare interface StripeMonetizationPluginOptions {
|
|
|
4963
4740
|
/**
|
|
4964
4741
|
* The Stripe Webhook policy validates the authenticity of an incoming Stripe webhook.
|
|
4965
4742
|
*
|
|
4966
|
-
* @remarks
|
|
4967
|
-
* The Stripe Webhook policy secures your incoming webhooks by validating that
|
|
4968
|
-
* the request was sent by Stripe.
|
|
4969
|
-
*
|
|
4970
4743
|
* @title Stripe Webhook Auth
|
|
4971
4744
|
* @public
|
|
4972
4745
|
* @param request - The ZuploRequest
|
|
@@ -5017,21 +4790,8 @@ export declare class SumoLogicLoggingPlugin extends LogPlugin {
|
|
|
5017
4790
|
}
|
|
5018
4791
|
|
|
5019
4792
|
/**
|
|
5020
|
-
* The Supabase JWT Authentication policy supports user JWT tokens created
|
|
5021
|
-
*
|
|
5022
|
-
* @remarks
|
|
5023
|
-
* The Supabase JWT Authentication policy allows you to authenticate incoming
|
|
5024
|
-
* requests using a token created by {@link https://supabase.com|supabase.com}.
|
|
5025
|
-
*
|
|
5026
|
-
* When configured, you can have Zuplo check incoming requests for a JWT token and
|
|
5027
|
-
* automatically populate the `ZuploRequest`'s `user` property with a user object.
|
|
5028
|
-
*
|
|
5029
|
-
* This `user` object will have a `sub` property - taking the `sub` id from the JWT
|
|
5030
|
-
* token. It will also have a `data` property populated by other data returned in
|
|
5031
|
-
* the JWT token - including all your claims, `user_metadata` and `app_metadata`.
|
|
5032
|
-
*
|
|
5033
|
-
* You can also require specific claims to have specific values to allow
|
|
5034
|
-
* authentication to complete, providing a layer of authorization.
|
|
4793
|
+
* The Supabase JWT Authentication policy supports user JWT tokens created
|
|
4794
|
+
* by Supabase.
|
|
5035
4795
|
*
|
|
5036
4796
|
* @title Supabase JWT Auth
|
|
5037
4797
|
* @public
|
|
@@ -5131,18 +4891,8 @@ declare interface UnauthenticatedCredentialConfig {
|
|
|
5131
4891
|
}
|
|
5132
4892
|
|
|
5133
4893
|
/**
|
|
5134
|
-
* Uses Azure Active Directory to add an Authorization header to the request
|
|
5135
|
-
*
|
|
5136
|
-
* @remarks
|
|
5137
|
-
* This policy adds a `Authorization` header to the upstream request that allows
|
|
5138
|
-
* using Azure AD to authenticate requests to your origin server. This is a useful
|
|
5139
|
-
* means of securing your origin server so that only your Zuplo gateway can make
|
|
5140
|
-
* requests against it.
|
|
5141
|
-
*
|
|
5142
|
-
* Using this policy allows you to delegate authentication and authorization to
|
|
5143
|
-
* your gateway without writing any code on your origin service. For instructions
|
|
5144
|
-
* on how to configure Azure AD authentication see
|
|
5145
|
-
* {@link https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad | Configure your App Service or Azure Functions app to use Azure AD login}.
|
|
4894
|
+
* Uses Azure Active Directory to add an Authorization header to the request
|
|
4895
|
+
* in order to authenticate requests using Azure identity.
|
|
5146
4896
|
*
|
|
5147
4897
|
* @title Upstream Azure AD Service Auth
|
|
5148
4898
|
* @public
|
|
@@ -5181,19 +4931,8 @@ export declare interface UpstreamAzureAdServiceAuthInboundPolicyOptions {
|
|
|
5181
4931
|
}
|
|
5182
4932
|
|
|
5183
4933
|
/**
|
|
5184
|
-
* Creates a Firebase Admin token and attaches it to the outgoing request.
|
|
5185
|
-
*
|
|
5186
|
-
* @remarks
|
|
5187
|
-
* This policy adds a Firebase Admin token to the outgoing `Authentication` header
|
|
5188
|
-
* allowing requests to Firebase using Service Account admin permissions. This can
|
|
5189
|
-
* be useful for calling Firebase services such as Firestore through a Zuplo
|
|
5190
|
-
* endpoint that is secured with other means of Authentication such as API keys.
|
|
5191
|
-
* Additionally, this policy can be useful for service content to all API users
|
|
5192
|
-
* (for example serving a specific Firestore document containing configuration
|
|
5193
|
-
* data)
|
|
5194
|
-
*
|
|
5195
|
-
* We recommend reading the `serviceAccountJson` from environment variables (so it
|
|
5196
|
-
* is not checked in to source control) using the `$env(ENV_VAR)` syntax.
|
|
4934
|
+
* Creates a Firebase Admin token and attaches it to the outgoing request.
|
|
4935
|
+
* Useful when calling Firebase services as an administrator.
|
|
5197
4936
|
*
|
|
5198
4937
|
* @title Upstream Firebase Admin Auth
|
|
5199
4938
|
* @public
|
|
@@ -5224,19 +4963,8 @@ export declare interface UpstreamFirebaseAdminAuthInboundPolicyOptions {
|
|
|
5224
4963
|
}
|
|
5225
4964
|
|
|
5226
4965
|
/**
|
|
5227
|
-
* Creates a Firebase custom user token and attaches it to the outgoing
|
|
5228
|
-
*
|
|
5229
|
-
* @remarks
|
|
5230
|
-
* This policy adds a Firebase Admin token to the outgoing `Authentication` header
|
|
5231
|
-
* allowing requests to Firebase using Service Account admin permissions. This can
|
|
5232
|
-
* be useful for calling Firebase services such as Firestore through a Zuplo
|
|
5233
|
-
* endpoint that is secured with other means of Authentication such as API keys.
|
|
5234
|
-
* Additionally, this policy can be useful for service content to all API users
|
|
5235
|
-
* (for example serving a specific Firestore document containing configuration
|
|
5236
|
-
* data)
|
|
5237
|
-
*
|
|
5238
|
-
* We recommend reading the `serviceAccountJson` from environment variables (so it
|
|
5239
|
-
* is not checked in to source control) using the `$env(ENV_VAR)` syntax.
|
|
4966
|
+
* Creates a Firebase custom user token and attaches it to the outgoing
|
|
4967
|
+
* request. Useful when calling Firebase services as user.
|
|
5240
4968
|
*
|
|
5241
4969
|
* @title Upstream Firebase User Auth
|
|
5242
4970
|
* @public
|
|
@@ -5284,17 +5012,9 @@ export declare interface UpstreamFirebaseUserAuthInboundPolicyOptions {
|
|
|
5284
5012
|
}
|
|
5285
5013
|
|
|
5286
5014
|
/**
|
|
5287
|
-
* Creates a self-signed JWT token (generated using a Google Service Account
|
|
5288
|
-
*
|
|
5289
|
-
*
|
|
5290
|
-
* This policy adds a JWT token to the headers, ready for us in an outgoing request
|
|
5291
|
-
* when calling a GCP service (e.g. Cloud Endpoints / ESPv2). We recommend reading
|
|
5292
|
-
* the `serviceAccountJson` from environment variables (so it is not checked in to
|
|
5293
|
-
* source control) using the `$env(ENV_VAR)` syntax.
|
|
5294
|
-
*
|
|
5295
|
-
* CAUTION: This policy only works with {@link https://developers.google.com/identity/protocols/oauth2/service-account#jwt-auth | certain Google APIs}.
|
|
5296
|
-
* In most cases, the {@link https://zuplo.com/docs/policies/upstream-gcp-service-auth-inbound | Upstream GCP Service Auth}
|
|
5297
|
-
* should be used.
|
|
5015
|
+
* Creates a self-signed JWT token (generated using a Google Service Account
|
|
5016
|
+
* JSON) and attaches it to the outgoing request. Useful when calling GCP
|
|
5017
|
+
* services like Cloud Endpoints / ESPv2
|
|
5298
5018
|
*
|
|
5299
5019
|
* @title Upstream GCP Self-Signed JWT
|
|
5300
5020
|
* @public
|
|
@@ -5321,25 +5041,9 @@ export declare interface UpstreamGcpJwtInboundPolicyOptions {
|
|
|
5321
5041
|
}
|
|
5322
5042
|
|
|
5323
5043
|
/**
|
|
5324
|
-
* Creates an ID Token from Google's OAuth service and attaches it to the
|
|
5325
|
-
*
|
|
5326
|
-
*
|
|
5327
|
-
* This policy allows you to delegate authentication and authorization to your
|
|
5328
|
-
* gateway without writing any code on your origin service by adding a GCP Issued
|
|
5329
|
-
* ID Token to outgoing header allowing the service to be secured with GCP IAM.
|
|
5330
|
-
* This is a useful means of securing your origin server so that only your Zuplo
|
|
5331
|
-
* gateway can make requests against it.
|
|
5332
|
-
*
|
|
5333
|
-
*
|
|
5334
|
-
* This policy works with
|
|
5335
|
-
* {@link https://zuplo.com/docs/articles/gke-with-upstream-auth-policy|GCP Identity Aware Proxy}
|
|
5336
|
-
* or services like {@link https://cloud.google.com/iap/docs/managing-access|Cloud Run}
|
|
5337
|
-
* that natively support IAM authorization.
|
|
5338
|
-
*
|
|
5339
|
-
* We recommend reading the `serviceAccountJson` from environment variables (so it
|
|
5340
|
-
* is not checked in to source control) using the `$env(ENV_VAR)` syntax.
|
|
5341
|
-
*
|
|
5342
|
-
* For information on how Google's service based auth works see {@link https://cloud.google.com/functions/docs/securing/authenticating|Authenticating for invocation}
|
|
5044
|
+
* Creates an ID Token from Google's OAuth service and attaches it to the
|
|
5045
|
+
* outgoing request. Useful when calling GCP services or Google APIs that are
|
|
5046
|
+
* secured with GCP IAM.
|
|
5343
5047
|
*
|
|
5344
5048
|
* @title Upstream GCP Service Auth
|
|
5345
5049
|
* @public
|
|
@@ -5406,15 +5110,6 @@ declare type UserDataDefault = any;
|
|
|
5406
5110
|
/**
|
|
5407
5111
|
* Validates the body of an incoming request based on a JSON schema.
|
|
5408
5112
|
*
|
|
5409
|
-
* @remarks
|
|
5410
|
-
* The Validate JSON Schema policy is used to validate the body of incoming
|
|
5411
|
-
* requests. It works using JSON Schemas defined in the `Schemas` folder of your
|
|
5412
|
-
* project.
|
|
5413
|
-
*
|
|
5414
|
-
* When configured, any requests that do not have a body conforming to your JSON
|
|
5415
|
-
* schema will be rejected with a `400: Bad Request` response containing a detailed
|
|
5416
|
-
* error message (in JSON) explaining why the body was not accepted.
|
|
5417
|
-
*
|
|
5418
5113
|
* @title JSON Body Validation
|
|
5419
5114
|
* @public
|
|
5420
5115
|
* @deprecated Use the new {@link https://zuplo.com/docs/policies/request-validation-inbound|Request Validation Policy}.
|
|
@@ -5564,10 +5259,7 @@ declare interface XacmlRequest {
|
|
|
5564
5259
|
}
|
|
5565
5260
|
|
|
5566
5261
|
/**
|
|
5567
|
-
* Parses XML and converts it to JSON.
|
|
5568
|
-
* legacy XML or SOAP APIs into modern REST APIs. It can be useful to add a
|
|
5569
|
-
* custom outbound policy that runs after this policy to further transform the
|
|
5570
|
-
* raw converted content into something more user friendly.
|
|
5262
|
+
* Parses XML and converts it to JSON.
|
|
5571
5263
|
*
|
|
5572
5264
|
* @title XML to JSON Outbound
|
|
5573
5265
|
* @public
|