@aws/agentcore-cdk 0.1.0-alpha.10 → 0.1.0-alpha.11
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/dist/cdk/constructs/components/base-props.d.ts +2 -0
- package/dist/cdk/constructs/components/base-props.d.ts.map +1 -1
- package/dist/cdk/constructs/components/mcp/Gateway.d.ts.map +1 -1
- package/dist/cdk/constructs/components/mcp/Gateway.js +21 -1
- package/dist/cdk/constructs/components/mcp/Gateway.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.js +3 -0
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js +3 -0
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js +3 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js +3 -0
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js +10 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.js +23 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts +2 -0
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.js +19 -0
- package/dist/cdk/constructs/l3/AgentCoreMcp.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts +2 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentEnvironment.js +2 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.js.map +1 -1
- package/dist/cdk/utils/__tests__/tags.test.d.ts +2 -0
- package/dist/cdk/utils/__tests__/tags.test.d.ts.map +1 -0
- package/dist/cdk/utils/__tests__/tags.test.js +57 -0
- package/dist/cdk/utils/__tests__/tags.test.js.map +1 -0
- package/dist/cdk/utils/tags.d.ts +11 -0
- package/dist/cdk/utils/tags.d.ts.map +1 -0
- package/dist/cdk/utils/tags.js +22 -0
- package/dist/cdk/utils/tags.js.map +1 -0
- package/dist/schema/schemas/agent-env.d.ts +10 -0
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agent-env.js +17 -1
- package/dist/schema/schemas/agent-env.js.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +378 -0
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +11 -1
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/deployed-state.d.ts +126 -12
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
- package/dist/schema/schemas/deployed-state.js +16 -2
- package/dist/schema/schemas/deployed-state.js.map +1 -1
- package/dist/schema/schemas/mcp.d.ts +120 -8
- package/dist/schema/schemas/mcp.d.ts.map +1 -1
- package/dist/schema/schemas/mcp.js +74 -3
- package/dist/schema/schemas/mcp.js.map +1 -1
- package/dist/schema/schemas/primitives/online-evaluation-config.d.ts +1 -0
- package/dist/schema/schemas/primitives/online-evaluation-config.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/online-evaluation-config.js +2 -0
- package/dist/schema/schemas/primitives/online-evaluation-config.js.map +1 -1
- package/dist/schema/schemas/primitives/policy.d.ts +1 -0
- package/dist/schema/schemas/primitives/policy.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/policy.js +2 -0
- package/dist/schema/schemas/primitives/policy.js.map +1 -1
- package/dist/schema/schemas/primitives/tags.d.ts +6 -0
- package/dist/schema/schemas/primitives/tags.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/tags.js +20 -0
- package/dist/schema/schemas/primitives/tags.js.map +1 -0
- package/package.json +4 -2
|
@@ -51,8 +51,27 @@ export declare const ExternallyManagedResourceSchema: z.ZodObject<{
|
|
|
51
51
|
export type ExternallyManagedResource = z.infer<typeof ExternallyManagedResourceSchema>;
|
|
52
52
|
export declare const CustomJwtAuthorizerSchema: z.ZodObject<{
|
|
53
53
|
name: z.ZodString;
|
|
54
|
-
allowedAudience: z.ZodArray<z.ZodString
|
|
55
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
54
|
+
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
+
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
|
+
inboundTokenClaimName: z.ZodString;
|
|
59
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
60
|
+
STRING: "STRING";
|
|
61
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
62
|
+
}>;
|
|
63
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
64
|
+
claimMatchOperator: z.ZodEnum<{
|
|
65
|
+
EQUALS: "EQUALS";
|
|
66
|
+
CONTAINS: "CONTAINS";
|
|
67
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
68
|
+
}>;
|
|
69
|
+
claimMatchValue: z.ZodObject<{
|
|
70
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
71
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
}, z.core.$strict>>>;
|
|
56
75
|
discoveryUrl: z.ZodString;
|
|
57
76
|
}, z.core.$strip>;
|
|
58
77
|
export type CustomJwtAuthorizer = z.infer<typeof CustomJwtAuthorizerSchema>;
|
|
@@ -65,8 +84,27 @@ export type VpcConfig = z.infer<typeof VpcConfigSchema>;
|
|
|
65
84
|
export declare const ExternallyManagedStateSchema: z.ZodObject<{
|
|
66
85
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
67
86
|
name: z.ZodString;
|
|
68
|
-
allowedAudience: z.ZodArray<z.ZodString
|
|
69
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
87
|
+
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
inboundTokenClaimName: z.ZodString;
|
|
92
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
93
|
+
STRING: "STRING";
|
|
94
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
95
|
+
}>;
|
|
96
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
97
|
+
claimMatchOperator: z.ZodEnum<{
|
|
98
|
+
EQUALS: "EQUALS";
|
|
99
|
+
CONTAINS: "CONTAINS";
|
|
100
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
101
|
+
}>;
|
|
102
|
+
claimMatchValue: z.ZodObject<{
|
|
103
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
104
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
}, z.core.$strict>>>;
|
|
70
108
|
discoveryUrl: z.ZodString;
|
|
71
109
|
}, z.core.$strip>>;
|
|
72
110
|
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
@@ -136,8 +174,27 @@ export declare const DeployedResourceStateSchema: z.ZodObject<{
|
|
|
136
174
|
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
137
175
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
138
176
|
name: z.ZodString;
|
|
139
|
-
allowedAudience: z.ZodArray<z.ZodString
|
|
140
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
177
|
+
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
178
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
|
+
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
180
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
181
|
+
inboundTokenClaimName: z.ZodString;
|
|
182
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
183
|
+
STRING: "STRING";
|
|
184
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
185
|
+
}>;
|
|
186
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
187
|
+
claimMatchOperator: z.ZodEnum<{
|
|
188
|
+
EQUALS: "EQUALS";
|
|
189
|
+
CONTAINS: "CONTAINS";
|
|
190
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
191
|
+
}>;
|
|
192
|
+
claimMatchValue: z.ZodObject<{
|
|
193
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
194
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
}, z.core.$strict>>>;
|
|
141
198
|
discoveryUrl: z.ZodString;
|
|
142
199
|
}, z.core.$strip>>;
|
|
143
200
|
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
@@ -194,8 +251,27 @@ export declare const TargetDeployedStateSchema: z.ZodObject<{
|
|
|
194
251
|
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
195
252
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
196
253
|
name: z.ZodString;
|
|
197
|
-
allowedAudience: z.ZodArray<z.ZodString
|
|
198
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
254
|
+
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
+
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
257
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
258
|
+
inboundTokenClaimName: z.ZodString;
|
|
259
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
260
|
+
STRING: "STRING";
|
|
261
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
262
|
+
}>;
|
|
263
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
264
|
+
claimMatchOperator: z.ZodEnum<{
|
|
265
|
+
EQUALS: "EQUALS";
|
|
266
|
+
CONTAINS: "CONTAINS";
|
|
267
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
268
|
+
}>;
|
|
269
|
+
claimMatchValue: z.ZodObject<{
|
|
270
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
271
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
}, z.core.$strict>>>;
|
|
199
275
|
discoveryUrl: z.ZodString;
|
|
200
276
|
}, z.core.$strip>>;
|
|
201
277
|
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
@@ -258,8 +334,27 @@ export declare const DeployedStateSchema: z.ZodObject<{
|
|
|
258
334
|
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
259
335
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
260
336
|
name: z.ZodString;
|
|
261
|
-
allowedAudience: z.ZodArray<z.ZodString
|
|
262
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
337
|
+
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
338
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
339
|
+
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
341
|
+
inboundTokenClaimName: z.ZodString;
|
|
342
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
343
|
+
STRING: "STRING";
|
|
344
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
345
|
+
}>;
|
|
346
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
347
|
+
claimMatchOperator: z.ZodEnum<{
|
|
348
|
+
EQUALS: "EQUALS";
|
|
349
|
+
CONTAINS: "CONTAINS";
|
|
350
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
351
|
+
}>;
|
|
352
|
+
claimMatchValue: z.ZodObject<{
|
|
353
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
354
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
}, z.core.$strict>>>;
|
|
263
358
|
discoveryUrl: z.ZodString;
|
|
264
359
|
}, z.core.$strip>>;
|
|
265
360
|
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
@@ -323,8 +418,27 @@ export declare function createValidatedDeployedStateSchema(targetNames: string[]
|
|
|
323
418
|
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
324
419
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
325
420
|
name: z.ZodString;
|
|
326
|
-
allowedAudience: z.ZodArray<z.ZodString
|
|
327
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
421
|
+
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
422
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
423
|
+
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
424
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
425
|
+
inboundTokenClaimName: z.ZodString;
|
|
426
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
427
|
+
STRING: "STRING";
|
|
428
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
429
|
+
}>;
|
|
430
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
431
|
+
claimMatchOperator: z.ZodEnum<{
|
|
432
|
+
EQUALS: "EQUALS";
|
|
433
|
+
CONTAINS: "CONTAINS";
|
|
434
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
435
|
+
}>;
|
|
436
|
+
claimMatchValue: z.ZodObject<{
|
|
437
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
438
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
}, z.core.$strict>>>;
|
|
328
442
|
discoveryUrl: z.ZodString;
|
|
329
443
|
}, z.core.$strip>>;
|
|
330
444
|
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployed-state.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/deployed-state.ts"],"names":[],"mappings":"
|
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;;;;;;;iBAE9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,WAAW,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAYvE"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DeployedStateSchema = exports.TargetDeployedStateSchema = exports.DeployedResourceStateSchema = exports.CredentialDeployedStateSchema = exports.PolicyDeployedStateSchema = exports.PolicyEngineDeployedStateSchema = exports.ExternallyManagedStateSchema = exports.VpcConfigSchema = exports.CustomJwtAuthorizerSchema = exports.ExternallyManagedResourceSchema = exports.McpDeployedStateSchema = exports.McpLambdaDeployedStateSchema = exports.McpRuntimeDeployedStateSchema = exports.GatewayDeployedStateSchema = exports.MemoryDeployedStateSchema = exports.AgentCoreDeployedStateSchema = void 0;
|
|
4
4
|
exports.createValidatedDeployedStateSchema = createValidatedDeployedStateSchema;
|
|
5
5
|
const aws_targets_1 = require("./aws-targets");
|
|
6
|
+
const mcp_1 = require("./mcp");
|
|
6
7
|
const zod_1 = require("zod");
|
|
7
8
|
// ============================================================================
|
|
8
9
|
// Agent Deployed State
|
|
@@ -59,9 +60,22 @@ exports.ExternallyManagedResourceSchema = zod_1.z.object({
|
|
|
59
60
|
name: zod_1.z.string().min(1),
|
|
60
61
|
});
|
|
61
62
|
exports.CustomJwtAuthorizerSchema = exports.ExternallyManagedResourceSchema.extend({
|
|
62
|
-
allowedAudience: zod_1.z.array(zod_1.z.string()),
|
|
63
|
-
allowedClients: zod_1.z.array(zod_1.z.string()),
|
|
63
|
+
allowedAudience: zod_1.z.array(zod_1.z.string()).optional(),
|
|
64
|
+
allowedClients: zod_1.z.array(zod_1.z.string()).optional(),
|
|
65
|
+
allowedScopes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
66
|
+
customClaims: zod_1.z.array(mcp_1.CustomClaimValidationSchema).optional(),
|
|
64
67
|
discoveryUrl: zod_1.z.string(),
|
|
68
|
+
}).superRefine((data, ctx) => {
|
|
69
|
+
const hasAudience = data.allowedAudience && data.allowedAudience.length > 0;
|
|
70
|
+
const hasClients = data.allowedClients && data.allowedClients.length > 0;
|
|
71
|
+
const hasScopes = data.allowedScopes && data.allowedScopes.length > 0;
|
|
72
|
+
const hasClaims = data.customClaims && data.customClaims.length > 0;
|
|
73
|
+
if (!hasAudience && !hasClients && !hasScopes && !hasClaims) {
|
|
74
|
+
ctx.addIssue({
|
|
75
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
76
|
+
message: 'At least one of allowedAudience, allowedClients, allowedScopes, or customClaims must be provided',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
65
79
|
});
|
|
66
80
|
exports.VpcConfigSchema = exports.ExternallyManagedResourceSchema.extend({
|
|
67
81
|
securityGroups: zod_1.z.array(zod_1.z.string()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployed-state.js","sourceRoot":"","sources":["../../../src/schema/schemas/deployed-state.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"deployed-state.js","sourceRoot":"","sources":["../../../src/schema/schemas/deployed-state.ts"],"names":[],"mappings":";;;AA0MA,gFAYC;AAtND,+CAA2D;AAC3D,+BAAoD;AACpD,6BAAwB;AAExB,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAElE,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,C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,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,iCAAyB,CAAC,CAAC,QAAQ,EAAE;IACpE,iBAAiB,EAAE,oCAA4B,CAAC,QAAQ,EAAE;IAC1D,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAIH,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAElE,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,SAAS,EAAE,mCAA2B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAaU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,wCAA0B,EAAE,iCAAyB,CAAC;CACzE,CAAC,CAAC;AAIH;;;GAGG;AACH,SAAgB,kCAAkC,CAAC,WAAqB;IACtE,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;IAE3C,OAAO,2BAAmB,CAAC,MAAM,CAC/B,KAAK,CAAC,EAAE;QACN,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,CAAC,EACD;QACE,OAAO,EAAE,iEAAiE;KAC3E,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -15,16 +15,72 @@ export declare const GatewayAuthorizerTypeSchema: z.ZodEnum<{
|
|
|
15
15
|
CUSTOM_JWT: "CUSTOM_JWT";
|
|
16
16
|
}>;
|
|
17
17
|
export type GatewayAuthorizerType = z.infer<typeof GatewayAuthorizerTypeSchema>;
|
|
18
|
+
export declare const ClaimMatchOperatorSchema: z.ZodEnum<{
|
|
19
|
+
EQUALS: "EQUALS";
|
|
20
|
+
CONTAINS: "CONTAINS";
|
|
21
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
22
|
+
}>;
|
|
23
|
+
export type ClaimMatchOperator = z.infer<typeof ClaimMatchOperatorSchema>;
|
|
24
|
+
export declare const ClaimMatchValueSchema: z.ZodObject<{
|
|
25
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
26
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type ClaimMatchValue = z.infer<typeof ClaimMatchValueSchema>;
|
|
29
|
+
export declare const InboundTokenClaimValueTypeSchema: z.ZodEnum<{
|
|
30
|
+
STRING: "STRING";
|
|
31
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
32
|
+
}>;
|
|
33
|
+
export type InboundTokenClaimValueType = z.infer<typeof InboundTokenClaimValueTypeSchema>;
|
|
34
|
+
export declare const CustomClaimValidationSchema: z.ZodObject<{
|
|
35
|
+
inboundTokenClaimName: z.ZodString;
|
|
36
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
37
|
+
STRING: "STRING";
|
|
38
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
39
|
+
}>;
|
|
40
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
41
|
+
claimMatchOperator: z.ZodEnum<{
|
|
42
|
+
EQUALS: "EQUALS";
|
|
43
|
+
CONTAINS: "CONTAINS";
|
|
44
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
45
|
+
}>;
|
|
46
|
+
claimMatchValue: z.ZodObject<{
|
|
47
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
48
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export type CustomClaimValidation = z.infer<typeof CustomClaimValidationSchema>;
|
|
18
53
|
/**
|
|
19
54
|
* Custom JWT authorizer configuration.
|
|
20
55
|
* Used when authorizerType is 'CUSTOM_JWT'.
|
|
56
|
+
*
|
|
57
|
+
* At least one of allowedAudience, allowedClients, allowedScopes, or customClaims
|
|
58
|
+
* must be provided. Only discoveryUrl is unconditionally required.
|
|
21
59
|
*/
|
|
22
60
|
export declare const CustomJwtAuthorizerConfigSchema: z.ZodObject<{
|
|
23
61
|
discoveryUrl: z.ZodString;
|
|
24
62
|
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
63
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
64
|
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
-
|
|
65
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
inboundTokenClaimName: z.ZodString;
|
|
67
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
68
|
+
STRING: "STRING";
|
|
69
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
70
|
+
}>;
|
|
71
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
72
|
+
claimMatchOperator: z.ZodEnum<{
|
|
73
|
+
EQUALS: "EQUALS";
|
|
74
|
+
CONTAINS: "CONTAINS";
|
|
75
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
76
|
+
}>;
|
|
77
|
+
claimMatchValue: z.ZodObject<{
|
|
78
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
79
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
}, z.core.$strict>>>;
|
|
83
|
+
}, z.core.$strict>;
|
|
28
84
|
export type CustomJwtAuthorizerConfig = z.infer<typeof CustomJwtAuthorizerConfigSchema>;
|
|
29
85
|
/**
|
|
30
86
|
* Gateway authorizer configuration container.
|
|
@@ -33,9 +89,27 @@ export declare const GatewayAuthorizerConfigSchema: z.ZodObject<{
|
|
|
33
89
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
34
90
|
discoveryUrl: z.ZodString;
|
|
35
91
|
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
92
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
93
|
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
-
|
|
94
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
inboundTokenClaimName: z.ZodString;
|
|
96
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
97
|
+
STRING: "STRING";
|
|
98
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
99
|
+
}>;
|
|
100
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
101
|
+
claimMatchOperator: z.ZodEnum<{
|
|
102
|
+
EQUALS: "EQUALS";
|
|
103
|
+
CONTAINS: "CONTAINS";
|
|
104
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
105
|
+
}>;
|
|
106
|
+
claimMatchValue: z.ZodObject<{
|
|
107
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
108
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, z.core.$strict>>>;
|
|
112
|
+
}, z.core.$strict>>;
|
|
39
113
|
}, z.core.$strip>;
|
|
40
114
|
export type GatewayAuthorizerConfig = z.infer<typeof GatewayAuthorizerConfigSchema>;
|
|
41
115
|
export declare const OutboundAuthTypeSchema: z.ZodEnum<{
|
|
@@ -720,9 +794,27 @@ export declare const AgentCoreGatewaySchema: z.ZodObject<{
|
|
|
720
794
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
721
795
|
discoveryUrl: z.ZodString;
|
|
722
796
|
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
723
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
797
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
724
798
|
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
725
|
-
|
|
799
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
800
|
+
inboundTokenClaimName: z.ZodString;
|
|
801
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
802
|
+
STRING: "STRING";
|
|
803
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
804
|
+
}>;
|
|
805
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
806
|
+
claimMatchOperator: z.ZodEnum<{
|
|
807
|
+
EQUALS: "EQUALS";
|
|
808
|
+
CONTAINS: "CONTAINS";
|
|
809
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
810
|
+
}>;
|
|
811
|
+
claimMatchValue: z.ZodObject<{
|
|
812
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
813
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
814
|
+
}, z.core.$strip>;
|
|
815
|
+
}, z.core.$strip>;
|
|
816
|
+
}, z.core.$strict>>>;
|
|
817
|
+
}, z.core.$strict>>;
|
|
726
818
|
}, z.core.$strip>>;
|
|
727
819
|
enableSemanticSearch: z.ZodDefault<z.ZodBoolean>;
|
|
728
820
|
exceptionLevel: z.ZodDefault<z.ZodEnum<{
|
|
@@ -736,6 +828,7 @@ export declare const AgentCoreGatewaySchema: z.ZodObject<{
|
|
|
736
828
|
ENFORCE: "ENFORCE";
|
|
737
829
|
}>;
|
|
738
830
|
}, z.core.$strict>>;
|
|
831
|
+
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
739
832
|
}, z.core.$strict>;
|
|
740
833
|
export type AgentCoreGateway = z.infer<typeof AgentCoreGatewaySchema>;
|
|
741
834
|
/**
|
|
@@ -958,9 +1051,27 @@ export declare const AgentCoreMcpSpecSchema: z.ZodObject<{
|
|
|
958
1051
|
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
959
1052
|
discoveryUrl: z.ZodString;
|
|
960
1053
|
allowedAudience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
961
|
-
allowedClients: z.ZodArray<z.ZodString
|
|
1054
|
+
allowedClients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
962
1055
|
allowedScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
963
|
-
|
|
1056
|
+
customClaims: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1057
|
+
inboundTokenClaimName: z.ZodString;
|
|
1058
|
+
inboundTokenClaimValueType: z.ZodEnum<{
|
|
1059
|
+
STRING: "STRING";
|
|
1060
|
+
STRING_ARRAY: "STRING_ARRAY";
|
|
1061
|
+
}>;
|
|
1062
|
+
authorizingClaimMatchValue: z.ZodObject<{
|
|
1063
|
+
claimMatchOperator: z.ZodEnum<{
|
|
1064
|
+
EQUALS: "EQUALS";
|
|
1065
|
+
CONTAINS: "CONTAINS";
|
|
1066
|
+
CONTAINS_ANY: "CONTAINS_ANY";
|
|
1067
|
+
}>;
|
|
1068
|
+
claimMatchValue: z.ZodObject<{
|
|
1069
|
+
matchValueString: z.ZodOptional<z.ZodString>;
|
|
1070
|
+
matchValueStringList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1071
|
+
}, z.core.$strip>;
|
|
1072
|
+
}, z.core.$strip>;
|
|
1073
|
+
}, z.core.$strict>>>;
|
|
1074
|
+
}, z.core.$strict>>;
|
|
964
1075
|
}, z.core.$strip>>;
|
|
965
1076
|
enableSemanticSearch: z.ZodDefault<z.ZodBoolean>;
|
|
966
1077
|
exceptionLevel: z.ZodDefault<z.ZodEnum<{
|
|
@@ -974,6 +1085,7 @@ export declare const AgentCoreMcpSpecSchema: z.ZodObject<{
|
|
|
974
1085
|
ENFORCE: "ENFORCE";
|
|
975
1086
|
}>;
|
|
976
1087
|
}, z.core.$strict>>;
|
|
1088
|
+
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
977
1089
|
}, z.core.$strict>>;
|
|
978
1090
|
mcpRuntimeTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
979
1091
|
name: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/mcp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/mcp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAIxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,uBAAuB;;;;;;;EAOlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE,eAAO,MAAM,2BAA2B;;;;EAA4C,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AA4BhF,eAAO,MAAM,wBAAwB;;;;EAAiD,CAAC;AACvF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,qBAAqB;;;iBAmB9B,CAAC;AACL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,gCAAgC;;;EAAqC,CAAC;AACnF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,K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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgentCoreMcpSpecSchema = exports.AgentCoreMcpRuntimeToolSchema = exports.McpRuntimeBindingSchema = exports.AgentCoreGatewaySchema = exports.GatewayPolicyEngineConfigurationSchema = exports.PolicyEngineModeSchema = exports.GatewayExceptionLevelSchema = exports.AgentCoreGatewayTargetSchema = exports.SchemaSourceSchema = exports.ToolComputeConfigSchema = exports.CodeZipRuntimeSchema = exports.RuntimeConfigSchema = exports.IamPolicyDocumentSchema = exports.ToolImplementationBindingSchema = exports.ComputeHostSchema = exports.McpImplLanguageSchema = exports.LambdaFunctionArnConfigSchema = exports.ApiGatewayConfigSchema = exports.ApiGatewayToolConfigurationSchema = exports.ApiGatewayToolOverrideSchema = exports.ApiGatewayToolFilterSchema = exports.ApiGatewayHttpMethodSchema = exports.TARGET_TYPE_AUTH_CONFIG = exports.OutboundAuthSchema = exports.OutboundAuthTypeSchema = exports.GatewayAuthorizerConfigSchema = exports.CustomJwtAuthorizerConfigSchema = exports.GatewayAuthorizerTypeSchema = exports.GatewayTargetTypeSchema = void 0;
|
|
3
|
+
exports.AgentCoreMcpSpecSchema = exports.AgentCoreMcpRuntimeToolSchema = exports.McpRuntimeBindingSchema = exports.AgentCoreGatewaySchema = exports.GatewayPolicyEngineConfigurationSchema = exports.PolicyEngineModeSchema = exports.GatewayExceptionLevelSchema = exports.AgentCoreGatewayTargetSchema = exports.SchemaSourceSchema = exports.ToolComputeConfigSchema = exports.CodeZipRuntimeSchema = exports.RuntimeConfigSchema = exports.IamPolicyDocumentSchema = exports.ToolImplementationBindingSchema = exports.ComputeHostSchema = exports.McpImplLanguageSchema = exports.LambdaFunctionArnConfigSchema = exports.ApiGatewayConfigSchema = exports.ApiGatewayToolConfigurationSchema = exports.ApiGatewayToolOverrideSchema = exports.ApiGatewayToolFilterSchema = exports.ApiGatewayHttpMethodSchema = exports.TARGET_TYPE_AUTH_CONFIG = exports.OutboundAuthSchema = exports.OutboundAuthTypeSchema = exports.GatewayAuthorizerConfigSchema = exports.CustomJwtAuthorizerConfigSchema = exports.CustomClaimValidationSchema = exports.InboundTokenClaimValueTypeSchema = exports.ClaimMatchValueSchema = exports.ClaimMatchOperatorSchema = exports.GatewayAuthorizerTypeSchema = exports.GatewayTargetTypeSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const agent_env_1 = require("./agent-env");
|
|
6
6
|
const mcp_defs_1 = require("./mcp-defs");
|
|
7
|
+
const tags_1 = require("./primitives/tags");
|
|
7
8
|
const zod_1 = require("zod");
|
|
8
9
|
// ============================================================================
|
|
9
10
|
// MCP-Specific Schemas
|
|
@@ -30,21 +31,90 @@ const OIDC_WELL_KNOWN_SUFFIX = '/.well-known/openid-configuration';
|
|
|
30
31
|
const OidcDiscoveryUrlSchema = zod_1.z
|
|
31
32
|
.string()
|
|
32
33
|
.url('Must be a valid URL')
|
|
34
|
+
.refine(url => url.startsWith('https://'), {
|
|
35
|
+
message: 'OIDC discovery URL must use HTTPS',
|
|
36
|
+
})
|
|
33
37
|
.refine(url => url.endsWith(OIDC_WELL_KNOWN_SUFFIX), {
|
|
34
38
|
message: `OIDC discovery URL must end with '${OIDC_WELL_KNOWN_SUFFIX}'`,
|
|
35
39
|
});
|
|
40
|
+
// ── Custom Claims Schemas (matches CFN CustomClaimValidationType) ──
|
|
41
|
+
// API-documented patterns (from ClaimMatchValueType and CustomClaimValidationType)
|
|
42
|
+
const MATCH_VALUE_PATTERN = /^[A-Za-z0-9_.-]+$/;
|
|
43
|
+
const CLAIM_NAME_PATTERN = /^[A-Za-z0-9_.:-]+$/;
|
|
44
|
+
// Server-side reserved claim names (not regex-documented; API rejects these at deploy time)
|
|
45
|
+
const RESERVED_CLAIM_NAMES = ['client_id'];
|
|
46
|
+
exports.ClaimMatchOperatorSchema = zod_1.z.enum(['EQUALS', 'CONTAINS', 'CONTAINS_ANY']);
|
|
47
|
+
exports.ClaimMatchValueSchema = zod_1.z
|
|
48
|
+
.object({
|
|
49
|
+
matchValueString: zod_1.z
|
|
50
|
+
.string()
|
|
51
|
+
.min(1)
|
|
52
|
+
.max(255)
|
|
53
|
+
.regex(MATCH_VALUE_PATTERN, 'Match value must match [A-Za-z0-9_.-]+')
|
|
54
|
+
.optional(),
|
|
55
|
+
matchValueStringList: zod_1.z
|
|
56
|
+
.array(zod_1.z.string().min(1).max(255).regex(MATCH_VALUE_PATTERN, 'Each match value must match [A-Za-z0-9_.-]+'))
|
|
57
|
+
.min(1)
|
|
58
|
+
.max(255)
|
|
59
|
+
.optional(),
|
|
60
|
+
})
|
|
61
|
+
.refine(data => data.matchValueString !== undefined || data.matchValueStringList !== undefined, {
|
|
62
|
+
message: 'Either matchValueString or matchValueStringList must be provided',
|
|
63
|
+
})
|
|
64
|
+
.refine(data => !(data.matchValueString !== undefined && data.matchValueStringList !== undefined), {
|
|
65
|
+
message: 'Only one of matchValueString or matchValueStringList may be provided',
|
|
66
|
+
});
|
|
67
|
+
exports.InboundTokenClaimValueTypeSchema = zod_1.z.enum(['STRING', 'STRING_ARRAY']);
|
|
68
|
+
exports.CustomClaimValidationSchema = zod_1.z
|
|
69
|
+
.object({
|
|
70
|
+
inboundTokenClaimName: zod_1.z
|
|
71
|
+
.string()
|
|
72
|
+
.min(1)
|
|
73
|
+
.max(255)
|
|
74
|
+
.regex(CLAIM_NAME_PATTERN, 'Claim name must match [A-Za-z0-9_.-:]+')
|
|
75
|
+
.refine(name => !RESERVED_CLAIM_NAMES.includes(name), {
|
|
76
|
+
message: `Claim name cannot be a reserved name (${RESERVED_CLAIM_NAMES.join(', ')})`,
|
|
77
|
+
}),
|
|
78
|
+
inboundTokenClaimValueType: exports.InboundTokenClaimValueTypeSchema,
|
|
79
|
+
authorizingClaimMatchValue: zod_1.z.object({
|
|
80
|
+
claimMatchOperator: exports.ClaimMatchOperatorSchema,
|
|
81
|
+
claimMatchValue: exports.ClaimMatchValueSchema,
|
|
82
|
+
}),
|
|
83
|
+
})
|
|
84
|
+
.strict();
|
|
85
|
+
// ── Custom JWT Authorizer Configuration ──
|
|
36
86
|
/**
|
|
37
87
|
* Custom JWT authorizer configuration.
|
|
38
88
|
* Used when authorizerType is 'CUSTOM_JWT'.
|
|
89
|
+
*
|
|
90
|
+
* At least one of allowedAudience, allowedClients, allowedScopes, or customClaims
|
|
91
|
+
* must be provided. Only discoveryUrl is unconditionally required.
|
|
39
92
|
*/
|
|
40
|
-
exports.CustomJwtAuthorizerConfigSchema = zod_1.z
|
|
93
|
+
exports.CustomJwtAuthorizerConfigSchema = zod_1.z
|
|
94
|
+
.object({
|
|
41
95
|
/** OIDC discovery URL (e.g., https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/openid-configuration) */
|
|
42
96
|
discoveryUrl: OidcDiscoveryUrlSchema,
|
|
43
97
|
/** List of allowed audiences (typically client IDs) */
|
|
44
98
|
allowedAudience: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
45
99
|
/** List of allowed client IDs */
|
|
46
|
-
allowedClients: zod_1.z.array(zod_1.z.string().min(1)).
|
|
100
|
+
allowedClients: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
101
|
+
/** List of allowed scopes */
|
|
47
102
|
allowedScopes: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
103
|
+
/** Custom claim validations */
|
|
104
|
+
customClaims: zod_1.z.array(exports.CustomClaimValidationSchema).min(1).optional(),
|
|
105
|
+
})
|
|
106
|
+
.strict()
|
|
107
|
+
.superRefine((data, ctx) => {
|
|
108
|
+
const hasAudience = data.allowedAudience && data.allowedAudience.length > 0;
|
|
109
|
+
const hasClients = data.allowedClients && data.allowedClients.length > 0;
|
|
110
|
+
const hasScopes = data.allowedScopes && data.allowedScopes.length > 0;
|
|
111
|
+
const hasClaims = data.customClaims && data.customClaims.length > 0;
|
|
112
|
+
if (!hasAudience && !hasClients && !hasScopes && !hasClaims) {
|
|
113
|
+
ctx.addIssue({
|
|
114
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
115
|
+
message: 'At least one of allowedAudience, allowedClients, allowedScopes, or customClaims must be provided',
|
|
116
|
+
});
|
|
117
|
+
}
|
|
48
118
|
});
|
|
49
119
|
/**
|
|
50
120
|
* Gateway authorizer configuration container.
|
|
@@ -533,6 +603,7 @@ exports.AgentCoreGatewaySchema = zod_1.z
|
|
|
533
603
|
exceptionLevel: exports.GatewayExceptionLevelSchema.default('NONE'),
|
|
534
604
|
/** Policy engine configuration for Cedar-based authorization of tool calls. */
|
|
535
605
|
policyEngineConfiguration: exports.GatewayPolicyEngineConfigurationSchema.optional(),
|
|
606
|
+
tags: tags_1.TagsSchema.optional(),
|
|
536
607
|
})
|
|
537
608
|
.strict()
|
|
538
609
|
.refine(data => {
|