@zuplo/runtime 5.2083.0 → 5.2084.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
- "version": "5.2083.0",
3
+ "version": "5.2084.0",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "exports": {
package/types-beta.d.ts CHANGED
@@ -170,6 +170,37 @@ export declare interface ApiKeyInboundPolicyOptions {
170
170
  disableAutomaticallyAddingKeyHeaderToOpenApi?: boolean;
171
171
  }
172
172
 
173
+ /**
174
+ * A list of attributes that will be included in the authorization request.
175
+ */
176
+ declare type Attribute = ({
177
+ /**
178
+ * The attribute ID that will be used in the PDP request.
179
+ */
180
+ attributeId: string;
181
+ /**
182
+ * A JSON path expression that selects the value of the attribute from incoming request.
183
+ */
184
+ valueSelector: string;
185
+ } | {
186
+ /**
187
+ * The attribute ID that will be used in the PDP request.
188
+ */
189
+ attributeId: string;
190
+ /**
191
+ * The value of the attribute.
192
+ */
193
+ value: string;
194
+ })[];
195
+
196
+ declare interface Attribute_2 {
197
+ AttributeId: string;
198
+ Value: string | boolean | number | string[] | boolean[] | number[];
199
+ Issuer?: string;
200
+ DataType?: string;
201
+ IncludeInResult?: boolean;
202
+ }
203
+
173
204
  export declare interface AuditLogDataStaxInit {
174
205
  url: string;
175
206
  xCassandraToken: string;
@@ -399,6 +430,45 @@ export declare class AWSLoggingPlugin extends LogPlugin {
399
430
  /* Excluded from this release type: getTransport */
400
431
  }
401
432
 
433
+ /* Excluded from this release type: AxiomaticsAuthZInboundPolicy */
434
+
435
+ /**
436
+ * The options for this policy.
437
+ */
438
+ export declare interface AxiomaticsAuthZInboundPolicyOptions {
439
+ /**
440
+ * Indicates whether the request should continue if authorization fails. Default is `false` which means unauthorized users will automatically receive a 403 response.
441
+ */
442
+ allowUnauthorizedRequests?: boolean;
443
+ /**
444
+ * The URL to which the plugin will make a JSON POST request before proxying the original request.
445
+ */
446
+ pdpUrl: string;
447
+ /**
448
+ * The username to use when authenticating with the PDP.
449
+ */
450
+ pdpUsername: string;
451
+ /**
452
+ * The password to use when authenticating with the PDP.
453
+ */
454
+ pdpPassword: string;
455
+ /**
456
+ * Indicates whether the plugin should include default resource attributes in the authorization request.
457
+ */
458
+ includeDefaultResourceAttributes?: boolean;
459
+ /**
460
+ * Indicates whether the plugin should include default subject attributes in the authorization request.
461
+ */
462
+ includeDefaultSubjectAttributes?: boolean;
463
+ /**
464
+ * The name of the header that carries the JWT.
465
+ */
466
+ tokenHeaderName?: string;
467
+ accessSubjectAttributes?: Attribute;
468
+ resourceAttributes?: Attribute;
469
+ actionAttributes?: Attribute;
470
+ }
471
+
402
472
  export declare class BackgroundDispatcher<TPayload> {
403
473
  #private;
404
474
  constructor(dispatcher: DispatchFunction<TPayload>, options: BatchDispatcherOptions);
@@ -498,6 +568,10 @@ declare interface BatchDispatcherOptions {
498
568
  name?: string;
499
569
  }
500
570
 
571
+ declare interface BuildAuthorizationRequestHook {
572
+ (request: ZuploRequest, context: ZuploContext, currentXacmlRequest: XacmlRequest): Promise<XacmlRequest>;
573
+ }
574
+
501
575
  /* Excluded from this release type: BuildEnvironment */
502
576
 
503
577
  declare interface BuildRouteConfiguration {
@@ -583,6 +657,13 @@ export declare interface CachingInboundPolicyOptions {
583
657
  statusCodes?: number[];
584
658
  }
585
659
 
660
+ declare interface Category {
661
+ Id?: string;
662
+ CategoryId?: string;
663
+ Content?: string;
664
+ Attribute: Attribute_2[];
665
+ }
666
+
586
667
  /**
587
668
  * Changes the HTTP method of the incoming request.
588
669
  *
@@ -2715,6 +2796,10 @@ export declare interface MonetizationSubscription extends MeteringSubscription {
2715
2796
  nextBillingCycle: string;
2716
2797
  }
2717
2798
 
2799
+ declare interface MultiRequests {
2800
+ RequestReference: RequestReference;
2801
+ }
2802
+
2718
2803
  declare interface NotFoundOptions {
2719
2804
  routesMatchedByPathOnly: RouteConfiguration[];
2720
2805
  }
@@ -3812,6 +3897,10 @@ declare type RequestParamsDefault = Record<string, string>;
3812
3897
 
3813
3898
  declare type RequestQueryDefault = Record<string, string>;
3814
3899
 
3900
+ declare interface RequestReference {
3901
+ ReferenceId: string[];
3902
+ }
3903
+
3815
3904
  /**
3816
3905
  * Enforces a maximum size in bytes of the incoming request.
3817
3906
  *
@@ -4861,6 +4950,29 @@ export declare function webSocketHandler(request: ZuploRequest, context: ZuploCo
4861
4950
  */
4862
4951
  export declare function webSocketPipelineHandler(request: ZuploRequest, context: ZuploContext): Promise<Response>;
4863
4952
 
4953
+ /**
4954
+ * The request to the PDP
4955
+ */
4956
+ declare interface XacmlRequest {
4957
+ Request: {
4958
+ ReturnPolicyIdList?: boolean;
4959
+ CombinedDecision?: boolean;
4960
+ XPathVersion?: string;
4961
+ Category?: Omit<Category, "CategoryId"> & {
4962
+ CategoryId: string;
4963
+ }[];
4964
+ Resource?: Category[];
4965
+ Action?: Category[];
4966
+ Environment?: Category[];
4967
+ AccessSubject?: Category[];
4968
+ RecipientSubject?: Category[];
4969
+ IntermediarySubject?: Category[];
4970
+ RequestingMachine?: Category[];
4971
+ CodeBase?: Category[];
4972
+ MultiRequests?: MultiRequests;
4973
+ };
4974
+ }
4975
+
4864
4976
  /**
4865
4977
  * Parses XML and converts it to JSON. This policy is useful for converting
4866
4978
  * legacy XML or SOAP APIs into modern REST APIs. It can be useful to add a
package/types-public.d.ts CHANGED
@@ -170,6 +170,37 @@ export declare interface ApiKeyInboundPolicyOptions {
170
170
  disableAutomaticallyAddingKeyHeaderToOpenApi?: boolean;
171
171
  }
172
172
 
173
+ /**
174
+ * A list of attributes that will be included in the authorization request.
175
+ */
176
+ declare type Attribute = ({
177
+ /**
178
+ * The attribute ID that will be used in the PDP request.
179
+ */
180
+ attributeId: string;
181
+ /**
182
+ * A JSON path expression that selects the value of the attribute from incoming request.
183
+ */
184
+ valueSelector: string;
185
+ } | {
186
+ /**
187
+ * The attribute ID that will be used in the PDP request.
188
+ */
189
+ attributeId: string;
190
+ /**
191
+ * The value of the attribute.
192
+ */
193
+ value: string;
194
+ })[];
195
+
196
+ declare interface Attribute_2 {
197
+ AttributeId: string;
198
+ Value: string | boolean | number | string[] | boolean[] | number[];
199
+ Issuer?: string;
200
+ DataType?: string;
201
+ IncludeInResult?: boolean;
202
+ }
203
+
173
204
  export declare interface AuditLogDataStaxInit {
174
205
  url: string;
175
206
  xCassandraToken: string;
@@ -392,6 +423,45 @@ export declare class AWSLoggingPlugin extends LogPlugin {
392
423
  /* Excluded from this release type: getTransport */
393
424
  }
394
425
 
426
+ /* Excluded from this release type: AxiomaticsAuthZInboundPolicy */
427
+
428
+ /**
429
+ * The options for this policy.
430
+ */
431
+ export declare interface AxiomaticsAuthZInboundPolicyOptions {
432
+ /**
433
+ * Indicates whether the request should continue if authorization fails. Default is `false` which means unauthorized users will automatically receive a 403 response.
434
+ */
435
+ allowUnauthorizedRequests?: boolean;
436
+ /**
437
+ * The URL to which the plugin will make a JSON POST request before proxying the original request.
438
+ */
439
+ pdpUrl: string;
440
+ /**
441
+ * The username to use when authenticating with the PDP.
442
+ */
443
+ pdpUsername: string;
444
+ /**
445
+ * The password to use when authenticating with the PDP.
446
+ */
447
+ pdpPassword: string;
448
+ /**
449
+ * Indicates whether the plugin should include default resource attributes in the authorization request.
450
+ */
451
+ includeDefaultResourceAttributes?: boolean;
452
+ /**
453
+ * Indicates whether the plugin should include default subject attributes in the authorization request.
454
+ */
455
+ includeDefaultSubjectAttributes?: boolean;
456
+ /**
457
+ * The name of the header that carries the JWT.
458
+ */
459
+ tokenHeaderName?: string;
460
+ accessSubjectAttributes?: Attribute;
461
+ resourceAttributes?: Attribute;
462
+ actionAttributes?: Attribute;
463
+ }
464
+
395
465
  export declare class BackgroundDispatcher<TPayload> {
396
466
  #private;
397
467
  constructor(dispatcher: DispatchFunction<TPayload>, options: BatchDispatcherOptions);
@@ -477,6 +547,10 @@ declare interface BatchDispatcherOptions {
477
547
  name?: string;
478
548
  }
479
549
 
550
+ declare interface BuildAuthorizationRequestHook {
551
+ (request: ZuploRequest, context: ZuploContext, currentXacmlRequest: XacmlRequest): Promise<XacmlRequest>;
552
+ }
553
+
480
554
  /* Excluded from this release type: BuildEnvironment */
481
555
 
482
556
  declare interface BuildRouteConfiguration {
@@ -562,6 +636,13 @@ export declare interface CachingInboundPolicyOptions {
562
636
  statusCodes?: number[];
563
637
  }
564
638
 
639
+ declare interface Category {
640
+ Id?: string;
641
+ CategoryId?: string;
642
+ Content?: string;
643
+ Attribute: Attribute_2[];
644
+ }
645
+
565
646
  /**
566
647
  * Changes the HTTP method of the incoming request.
567
648
  *
@@ -1499,6 +1580,10 @@ declare type MonetizationPolicyMeters = {
1499
1580
 
1500
1581
  /* Excluded from this release type: MonetizationSubscription */
1501
1582
 
1583
+ declare interface MultiRequests {
1584
+ RequestReference: RequestReference;
1585
+ }
1586
+
1502
1587
  declare interface NotFoundOptions {
1503
1588
  routesMatchedByPathOnly: RouteConfiguration[];
1504
1589
  }
@@ -2461,6 +2546,10 @@ declare type RequestParamsDefault = Record<string, string>;
2461
2546
 
2462
2547
  declare type RequestQueryDefault = Record<string, string>;
2463
2548
 
2549
+ declare interface RequestReference {
2550
+ ReferenceId: string[];
2551
+ }
2552
+
2464
2553
  /**
2465
2554
  * Enforces a maximum size in bytes of the incoming request.
2466
2555
  *
@@ -3381,6 +3470,29 @@ declare interface WaitUntilFunc {
3381
3470
 
3382
3471
  /* Excluded from this release type: webSocketPipelineHandler */
3383
3472
 
3473
+ /**
3474
+ * The request to the PDP
3475
+ */
3476
+ declare interface XacmlRequest {
3477
+ Request: {
3478
+ ReturnPolicyIdList?: boolean;
3479
+ CombinedDecision?: boolean;
3480
+ XPathVersion?: string;
3481
+ Category?: Omit<Category, "CategoryId"> & {
3482
+ CategoryId: string;
3483
+ }[];
3484
+ Resource?: Category[];
3485
+ Action?: Category[];
3486
+ Environment?: Category[];
3487
+ AccessSubject?: Category[];
3488
+ RecipientSubject?: Category[];
3489
+ IntermediarySubject?: Category[];
3490
+ RequestingMachine?: Category[];
3491
+ CodeBase?: Category[];
3492
+ MultiRequests?: MultiRequests;
3493
+ };
3494
+ }
3495
+
3384
3496
  /**
3385
3497
  * Parses XML and converts it to JSON. This policy is useful for converting
3386
3498
  * legacy XML or SOAP APIs into modern REST APIs. It can be useful to add a