@aws-sdk/client-verifiedpermissions 3.391.0 → 3.397.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/dist-cjs/VerifiedPermissionsClient.js +4 -2
- package/dist-cjs/clientConfiguration.js +2 -0
- package/dist-cjs/commands/CreateIdentitySourceCommand.js +2 -1
- package/dist-cjs/commands/CreatePolicyCommand.js +3 -2
- package/dist-cjs/commands/CreatePolicyTemplateCommand.js +2 -1
- package/dist-cjs/commands/GetIdentitySourceCommand.js +2 -1
- package/dist-cjs/commands/GetPolicyCommand.js +2 -1
- package/dist-cjs/commands/GetPolicyTemplateCommand.js +2 -1
- package/dist-cjs/commands/GetSchemaCommand.js +2 -1
- package/dist-cjs/commands/IsAuthorizedCommand.js +3 -2
- package/dist-cjs/commands/IsAuthorizedWithTokenCommand.js +3 -2
- package/dist-cjs/commands/ListIdentitySourcesCommand.js +3 -2
- package/dist-cjs/commands/ListPoliciesCommand.js +3 -2
- package/dist-cjs/commands/ListPolicyTemplatesCommand.js +2 -1
- package/dist-cjs/commands/PutSchemaCommand.js +3 -2
- package/dist-cjs/commands/UpdateIdentitySourceCommand.js +2 -1
- package/dist-cjs/commands/UpdatePolicyCommand.js +3 -2
- package/dist-cjs/commands/UpdatePolicyTemplateCommand.js +2 -1
- package/dist-cjs/models/models_0.js +361 -1
- package/dist-cjs/runtimeConfig.shared.js +1 -0
- package/dist-cjs/runtimeExtensions.js +16 -0
- package/dist-es/VerifiedPermissionsClient.js +4 -2
- package/dist-es/clientConfiguration.js +1 -0
- package/dist-es/commands/CreateIdentitySourceCommand.js +2 -1
- package/dist-es/commands/CreatePolicyCommand.js +3 -2
- package/dist-es/commands/CreatePolicyTemplateCommand.js +2 -1
- package/dist-es/commands/GetIdentitySourceCommand.js +2 -1
- package/dist-es/commands/GetPolicyCommand.js +2 -1
- package/dist-es/commands/GetPolicyTemplateCommand.js +2 -1
- package/dist-es/commands/GetSchemaCommand.js +2 -1
- package/dist-es/commands/IsAuthorizedCommand.js +3 -2
- package/dist-es/commands/IsAuthorizedWithTokenCommand.js +3 -2
- package/dist-es/commands/ListIdentitySourcesCommand.js +3 -2
- package/dist-es/commands/ListPoliciesCommand.js +3 -2
- package/dist-es/commands/ListPolicyTemplatesCommand.js +2 -1
- package/dist-es/commands/PutSchemaCommand.js +3 -2
- package/dist-es/commands/UpdateIdentitySourceCommand.js +2 -1
- package/dist-es/commands/UpdatePolicyCommand.js +3 -2
- package/dist-es/commands/UpdatePolicyTemplateCommand.js +2 -1
- package/dist-es/models/models_0.js +305 -0
- package/dist-es/runtimeConfig.shared.js +1 -0
- package/dist-es/runtimeExtensions.js +12 -0
- package/dist-types/VerifiedPermissionsClient.d.ts +6 -1
- package/dist-types/clientConfiguration.d.ts +6 -0
- package/dist-types/commands/IsAuthorizedWithTokenCommand.d.ts +19 -5
- package/dist-types/commands/UpdatePolicyCommand.d.ts +40 -3
- package/dist-types/models/models_0.d.ts +276 -42
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/VerifiedPermissionsClient.d.ts +3 -0
- package/dist-types/ts3.4/clientConfiguration.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +156 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { PutSchemaInputFilterSensitiveLog, PutSchemaOutputFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { de_PutSchemaCommand, se_PutSchemaCommand } from "../protocols/Aws_json1_0";
|
|
5
6
|
export { $Command };
|
|
6
7
|
export class PutSchemaCommand extends $Command {
|
|
@@ -27,8 +28,8 @@ export class PutSchemaCommand extends $Command {
|
|
|
27
28
|
logger,
|
|
28
29
|
clientName,
|
|
29
30
|
commandName,
|
|
30
|
-
inputFilterSensitiveLog:
|
|
31
|
-
outputFilterSensitiveLog:
|
|
31
|
+
inputFilterSensitiveLog: PutSchemaInputFilterSensitiveLog,
|
|
32
|
+
outputFilterSensitiveLog: PutSchemaOutputFilterSensitiveLog,
|
|
32
33
|
};
|
|
33
34
|
const { requestHandler } = configuration;
|
|
34
35
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { UpdateIdentitySourceInputFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { de_UpdateIdentitySourceCommand, se_UpdateIdentitySourceCommand } from "../protocols/Aws_json1_0";
|
|
5
6
|
export { $Command };
|
|
6
7
|
export class UpdateIdentitySourceCommand extends $Command {
|
|
@@ -27,7 +28,7 @@ export class UpdateIdentitySourceCommand extends $Command {
|
|
|
27
28
|
logger,
|
|
28
29
|
clientName,
|
|
29
30
|
commandName,
|
|
30
|
-
inputFilterSensitiveLog:
|
|
31
|
+
inputFilterSensitiveLog: UpdateIdentitySourceInputFilterSensitiveLog,
|
|
31
32
|
outputFilterSensitiveLog: (_) => _,
|
|
32
33
|
};
|
|
33
34
|
const { requestHandler } = configuration;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { UpdatePolicyInputFilterSensitiveLog, UpdatePolicyOutputFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { de_UpdatePolicyCommand, se_UpdatePolicyCommand } from "../protocols/Aws_json1_0";
|
|
5
6
|
export { $Command };
|
|
6
7
|
export class UpdatePolicyCommand extends $Command {
|
|
@@ -27,8 +28,8 @@ export class UpdatePolicyCommand extends $Command {
|
|
|
27
28
|
logger,
|
|
28
29
|
clientName,
|
|
29
30
|
commandName,
|
|
30
|
-
inputFilterSensitiveLog:
|
|
31
|
-
outputFilterSensitiveLog:
|
|
31
|
+
inputFilterSensitiveLog: UpdatePolicyInputFilterSensitiveLog,
|
|
32
|
+
outputFilterSensitiveLog: UpdatePolicyOutputFilterSensitiveLog,
|
|
32
33
|
};
|
|
33
34
|
const { requestHandler } = configuration;
|
|
34
35
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { UpdatePolicyTemplateInputFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { de_UpdatePolicyTemplateCommand, se_UpdatePolicyTemplateCommand } from "../protocols/Aws_json1_0";
|
|
5
6
|
export { $Command };
|
|
6
7
|
export class UpdatePolicyTemplateCommand extends $Command {
|
|
@@ -27,7 +28,7 @@ export class UpdatePolicyTemplateCommand extends $Command {
|
|
|
27
28
|
logger,
|
|
28
29
|
clientName,
|
|
29
30
|
commandName,
|
|
30
|
-
inputFilterSensitiveLog:
|
|
31
|
+
inputFilterSensitiveLog: UpdatePolicyTemplateInputFilterSensitiveLog,
|
|
31
32
|
outputFilterSensitiveLog: (_) => _,
|
|
32
33
|
};
|
|
33
34
|
const { requestHandler } = configuration;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
1
2
|
import { VerifiedPermissionsServiceException as __BaseException } from "./VerifiedPermissionsServiceException";
|
|
2
3
|
export class AccessDeniedException extends __BaseException {
|
|
3
4
|
constructor(opts) {
|
|
@@ -225,3 +226,307 @@ export var EntitiesDefinition;
|
|
|
225
226
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
226
227
|
};
|
|
227
228
|
})(EntitiesDefinition || (EntitiesDefinition = {}));
|
|
229
|
+
export const ActionIdentifierFilterSensitiveLog = (obj) => ({
|
|
230
|
+
...obj,
|
|
231
|
+
...(obj.actionType && { actionType: SENSITIVE_STRING }),
|
|
232
|
+
...(obj.actionId && { actionId: SENSITIVE_STRING }),
|
|
233
|
+
});
|
|
234
|
+
export const EntityIdentifierFilterSensitiveLog = (obj) => ({
|
|
235
|
+
...obj,
|
|
236
|
+
...(obj.entityType && { entityType: SENSITIVE_STRING }),
|
|
237
|
+
...(obj.entityId && { entityId: SENSITIVE_STRING }),
|
|
238
|
+
});
|
|
239
|
+
export const CognitoUserPoolConfigurationFilterSensitiveLog = (obj) => ({
|
|
240
|
+
...obj,
|
|
241
|
+
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
|
|
242
|
+
});
|
|
243
|
+
export const ConfigurationFilterSensitiveLog = (obj) => {
|
|
244
|
+
if (obj.cognitoUserPoolConfiguration !== undefined)
|
|
245
|
+
return {
|
|
246
|
+
cognitoUserPoolConfiguration: CognitoUserPoolConfigurationFilterSensitiveLog(obj.cognitoUserPoolConfiguration),
|
|
247
|
+
};
|
|
248
|
+
if (obj.$unknown !== undefined)
|
|
249
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
250
|
+
};
|
|
251
|
+
export const CreateIdentitySourceInputFilterSensitiveLog = (obj) => ({
|
|
252
|
+
...obj,
|
|
253
|
+
...(obj.configuration && { configuration: ConfigurationFilterSensitiveLog(obj.configuration) }),
|
|
254
|
+
...(obj.principalEntityType && { principalEntityType: SENSITIVE_STRING }),
|
|
255
|
+
});
|
|
256
|
+
export const StaticPolicyDefinitionFilterSensitiveLog = (obj) => ({
|
|
257
|
+
...obj,
|
|
258
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
259
|
+
...(obj.statement && { statement: SENSITIVE_STRING }),
|
|
260
|
+
});
|
|
261
|
+
export const TemplateLinkedPolicyDefinitionFilterSensitiveLog = (obj) => ({
|
|
262
|
+
...obj,
|
|
263
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
264
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
265
|
+
});
|
|
266
|
+
export const PolicyDefinitionFilterSensitiveLog = (obj) => {
|
|
267
|
+
if (obj.static !== undefined)
|
|
268
|
+
return { static: StaticPolicyDefinitionFilterSensitiveLog(obj.static) };
|
|
269
|
+
if (obj.templateLinked !== undefined)
|
|
270
|
+
return { templateLinked: TemplateLinkedPolicyDefinitionFilterSensitiveLog(obj.templateLinked) };
|
|
271
|
+
if (obj.$unknown !== undefined)
|
|
272
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
273
|
+
};
|
|
274
|
+
export const CreatePolicyInputFilterSensitiveLog = (obj) => ({
|
|
275
|
+
...obj,
|
|
276
|
+
...(obj.definition && { definition: PolicyDefinitionFilterSensitiveLog(obj.definition) }),
|
|
277
|
+
});
|
|
278
|
+
export const CreatePolicyOutputFilterSensitiveLog = (obj) => ({
|
|
279
|
+
...obj,
|
|
280
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
281
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
282
|
+
});
|
|
283
|
+
export const CreatePolicyTemplateInputFilterSensitiveLog = (obj) => ({
|
|
284
|
+
...obj,
|
|
285
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
286
|
+
...(obj.statement && { statement: SENSITIVE_STRING }),
|
|
287
|
+
});
|
|
288
|
+
export const EntityReferenceFilterSensitiveLog = (obj) => {
|
|
289
|
+
if (obj.unspecified !== undefined)
|
|
290
|
+
return { unspecified: obj.unspecified };
|
|
291
|
+
if (obj.identifier !== undefined)
|
|
292
|
+
return { identifier: EntityIdentifierFilterSensitiveLog(obj.identifier) };
|
|
293
|
+
if (obj.$unknown !== undefined)
|
|
294
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
295
|
+
};
|
|
296
|
+
export const EvaluationErrorItemFilterSensitiveLog = (obj) => ({
|
|
297
|
+
...obj,
|
|
298
|
+
});
|
|
299
|
+
export const IdentitySourceDetailsFilterSensitiveLog = (obj) => ({
|
|
300
|
+
...obj,
|
|
301
|
+
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
|
|
302
|
+
});
|
|
303
|
+
export const GetIdentitySourceOutputFilterSensitiveLog = (obj) => ({
|
|
304
|
+
...obj,
|
|
305
|
+
...(obj.details && { details: IdentitySourceDetailsFilterSensitiveLog(obj.details) }),
|
|
306
|
+
...(obj.principalEntityType && { principalEntityType: SENSITIVE_STRING }),
|
|
307
|
+
});
|
|
308
|
+
export const StaticPolicyDefinitionDetailFilterSensitiveLog = (obj) => ({
|
|
309
|
+
...obj,
|
|
310
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
311
|
+
...(obj.statement && { statement: SENSITIVE_STRING }),
|
|
312
|
+
});
|
|
313
|
+
export const TemplateLinkedPolicyDefinitionDetailFilterSensitiveLog = (obj) => ({
|
|
314
|
+
...obj,
|
|
315
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
316
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
317
|
+
});
|
|
318
|
+
export const PolicyDefinitionDetailFilterSensitiveLog = (obj) => {
|
|
319
|
+
if (obj.static !== undefined)
|
|
320
|
+
return { static: StaticPolicyDefinitionDetailFilterSensitiveLog(obj.static) };
|
|
321
|
+
if (obj.templateLinked !== undefined)
|
|
322
|
+
return { templateLinked: TemplateLinkedPolicyDefinitionDetailFilterSensitiveLog(obj.templateLinked) };
|
|
323
|
+
if (obj.$unknown !== undefined)
|
|
324
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
325
|
+
};
|
|
326
|
+
export const GetPolicyOutputFilterSensitiveLog = (obj) => ({
|
|
327
|
+
...obj,
|
|
328
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
329
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
330
|
+
...(obj.definition && { definition: PolicyDefinitionDetailFilterSensitiveLog(obj.definition) }),
|
|
331
|
+
});
|
|
332
|
+
export const GetPolicyTemplateOutputFilterSensitiveLog = (obj) => ({
|
|
333
|
+
...obj,
|
|
334
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
335
|
+
...(obj.statement && { statement: SENSITIVE_STRING }),
|
|
336
|
+
});
|
|
337
|
+
export const GetSchemaOutputFilterSensitiveLog = (obj) => ({
|
|
338
|
+
...obj,
|
|
339
|
+
...(obj.schema && { schema: SENSITIVE_STRING }),
|
|
340
|
+
});
|
|
341
|
+
export const IdentitySourceFilterFilterSensitiveLog = (obj) => ({
|
|
342
|
+
...obj,
|
|
343
|
+
...(obj.principalEntityType && { principalEntityType: SENSITIVE_STRING }),
|
|
344
|
+
});
|
|
345
|
+
export const ListIdentitySourcesInputFilterSensitiveLog = (obj) => ({
|
|
346
|
+
...obj,
|
|
347
|
+
...(obj.filters && { filters: obj.filters.map((item) => IdentitySourceFilterFilterSensitiveLog(item)) }),
|
|
348
|
+
});
|
|
349
|
+
export const IdentitySourceItemDetailsFilterSensitiveLog = (obj) => ({
|
|
350
|
+
...obj,
|
|
351
|
+
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
|
|
352
|
+
});
|
|
353
|
+
export const IdentitySourceItemFilterSensitiveLog = (obj) => ({
|
|
354
|
+
...obj,
|
|
355
|
+
...(obj.details && { details: IdentitySourceItemDetailsFilterSensitiveLog(obj.details) }),
|
|
356
|
+
...(obj.principalEntityType && { principalEntityType: SENSITIVE_STRING }),
|
|
357
|
+
});
|
|
358
|
+
export const ListIdentitySourcesOutputFilterSensitiveLog = (obj) => ({
|
|
359
|
+
...obj,
|
|
360
|
+
...(obj.identitySources && {
|
|
361
|
+
identitySources: obj.identitySources.map((item) => IdentitySourceItemFilterSensitiveLog(item)),
|
|
362
|
+
}),
|
|
363
|
+
});
|
|
364
|
+
export const UpdateCognitoUserPoolConfigurationFilterSensitiveLog = (obj) => ({
|
|
365
|
+
...obj,
|
|
366
|
+
...(obj.clientIds && { clientIds: SENSITIVE_STRING }),
|
|
367
|
+
});
|
|
368
|
+
export const UpdateConfigurationFilterSensitiveLog = (obj) => {
|
|
369
|
+
if (obj.cognitoUserPoolConfiguration !== undefined)
|
|
370
|
+
return {
|
|
371
|
+
cognitoUserPoolConfiguration: UpdateCognitoUserPoolConfigurationFilterSensitiveLog(obj.cognitoUserPoolConfiguration),
|
|
372
|
+
};
|
|
373
|
+
if (obj.$unknown !== undefined)
|
|
374
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
375
|
+
};
|
|
376
|
+
export const UpdateIdentitySourceInputFilterSensitiveLog = (obj) => ({
|
|
377
|
+
...obj,
|
|
378
|
+
...(obj.updateConfiguration && {
|
|
379
|
+
updateConfiguration: UpdateConfigurationFilterSensitiveLog(obj.updateConfiguration),
|
|
380
|
+
}),
|
|
381
|
+
...(obj.principalEntityType && { principalEntityType: SENSITIVE_STRING }),
|
|
382
|
+
});
|
|
383
|
+
export const IsAuthorizedOutputFilterSensitiveLog = (obj) => ({
|
|
384
|
+
...obj,
|
|
385
|
+
...(obj.errors && { errors: SENSITIVE_STRING }),
|
|
386
|
+
});
|
|
387
|
+
export const IsAuthorizedWithTokenOutputFilterSensitiveLog = (obj) => ({
|
|
388
|
+
...obj,
|
|
389
|
+
...(obj.errors && { errors: SENSITIVE_STRING }),
|
|
390
|
+
});
|
|
391
|
+
export const PolicyFilterFilterSensitiveLog = (obj) => ({
|
|
392
|
+
...obj,
|
|
393
|
+
...(obj.principal && { principal: EntityReferenceFilterSensitiveLog(obj.principal) }),
|
|
394
|
+
...(obj.resource && { resource: EntityReferenceFilterSensitiveLog(obj.resource) }),
|
|
395
|
+
});
|
|
396
|
+
export const ListPoliciesInputFilterSensitiveLog = (obj) => ({
|
|
397
|
+
...obj,
|
|
398
|
+
...(obj.filter && { filter: PolicyFilterFilterSensitiveLog(obj.filter) }),
|
|
399
|
+
});
|
|
400
|
+
export const StaticPolicyDefinitionItemFilterSensitiveLog = (obj) => ({
|
|
401
|
+
...obj,
|
|
402
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
403
|
+
});
|
|
404
|
+
export const TemplateLinkedPolicyDefinitionItemFilterSensitiveLog = (obj) => ({
|
|
405
|
+
...obj,
|
|
406
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
407
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
408
|
+
});
|
|
409
|
+
export const PolicyDefinitionItemFilterSensitiveLog = (obj) => {
|
|
410
|
+
if (obj.static !== undefined)
|
|
411
|
+
return { static: StaticPolicyDefinitionItemFilterSensitiveLog(obj.static) };
|
|
412
|
+
if (obj.templateLinked !== undefined)
|
|
413
|
+
return { templateLinked: TemplateLinkedPolicyDefinitionItemFilterSensitiveLog(obj.templateLinked) };
|
|
414
|
+
if (obj.$unknown !== undefined)
|
|
415
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
416
|
+
};
|
|
417
|
+
export const PolicyItemFilterSensitiveLog = (obj) => ({
|
|
418
|
+
...obj,
|
|
419
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
420
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
421
|
+
...(obj.definition && { definition: PolicyDefinitionItemFilterSensitiveLog(obj.definition) }),
|
|
422
|
+
});
|
|
423
|
+
export const ListPoliciesOutputFilterSensitiveLog = (obj) => ({
|
|
424
|
+
...obj,
|
|
425
|
+
...(obj.policies && { policies: obj.policies.map((item) => PolicyItemFilterSensitiveLog(item)) }),
|
|
426
|
+
});
|
|
427
|
+
export const PolicyTemplateItemFilterSensitiveLog = (obj) => ({
|
|
428
|
+
...obj,
|
|
429
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
430
|
+
});
|
|
431
|
+
export const ListPolicyTemplatesOutputFilterSensitiveLog = (obj) => ({
|
|
432
|
+
...obj,
|
|
433
|
+
...(obj.policyTemplates && {
|
|
434
|
+
policyTemplates: obj.policyTemplates.map((item) => PolicyTemplateItemFilterSensitiveLog(item)),
|
|
435
|
+
}),
|
|
436
|
+
});
|
|
437
|
+
export const UpdateStaticPolicyDefinitionFilterSensitiveLog = (obj) => ({
|
|
438
|
+
...obj,
|
|
439
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
440
|
+
...(obj.statement && { statement: SENSITIVE_STRING }),
|
|
441
|
+
});
|
|
442
|
+
export const UpdatePolicyDefinitionFilterSensitiveLog = (obj) => {
|
|
443
|
+
if (obj.static !== undefined)
|
|
444
|
+
return { static: UpdateStaticPolicyDefinitionFilterSensitiveLog(obj.static) };
|
|
445
|
+
if (obj.$unknown !== undefined)
|
|
446
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
447
|
+
};
|
|
448
|
+
export const UpdatePolicyInputFilterSensitiveLog = (obj) => ({
|
|
449
|
+
...obj,
|
|
450
|
+
...(obj.definition && { definition: UpdatePolicyDefinitionFilterSensitiveLog(obj.definition) }),
|
|
451
|
+
});
|
|
452
|
+
export const UpdatePolicyOutputFilterSensitiveLog = (obj) => ({
|
|
453
|
+
...obj,
|
|
454
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
455
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
456
|
+
});
|
|
457
|
+
export const UpdatePolicyTemplateInputFilterSensitiveLog = (obj) => ({
|
|
458
|
+
...obj,
|
|
459
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
460
|
+
...(obj.statement && { statement: SENSITIVE_STRING }),
|
|
461
|
+
});
|
|
462
|
+
export const SchemaDefinitionFilterSensitiveLog = (obj) => {
|
|
463
|
+
if (obj.cedarJson !== undefined)
|
|
464
|
+
return { cedarJson: SENSITIVE_STRING };
|
|
465
|
+
if (obj.$unknown !== undefined)
|
|
466
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
467
|
+
};
|
|
468
|
+
export const PutSchemaInputFilterSensitiveLog = (obj) => ({
|
|
469
|
+
...obj,
|
|
470
|
+
...(obj.definition && { definition: SchemaDefinitionFilterSensitiveLog(obj.definition) }),
|
|
471
|
+
});
|
|
472
|
+
export const PutSchemaOutputFilterSensitiveLog = (obj) => ({
|
|
473
|
+
...obj,
|
|
474
|
+
...(obj.namespaces && { namespaces: SENSITIVE_STRING }),
|
|
475
|
+
});
|
|
476
|
+
export const AttributeValueFilterSensitiveLog = (obj) => {
|
|
477
|
+
if (obj.boolean !== undefined)
|
|
478
|
+
return { boolean: SENSITIVE_STRING };
|
|
479
|
+
if (obj.entityIdentifier !== undefined)
|
|
480
|
+
return { entityIdentifier: EntityIdentifierFilterSensitiveLog(obj.entityIdentifier) };
|
|
481
|
+
if (obj.long !== undefined)
|
|
482
|
+
return { long: SENSITIVE_STRING };
|
|
483
|
+
if (obj.string !== undefined)
|
|
484
|
+
return { string: SENSITIVE_STRING };
|
|
485
|
+
if (obj.set !== undefined)
|
|
486
|
+
return { set: obj.set.map((item) => AttributeValueFilterSensitiveLog(item)) };
|
|
487
|
+
if (obj.record !== undefined)
|
|
488
|
+
return {
|
|
489
|
+
record: Object.entries(obj.record).reduce((acc, [key, value]) => ((acc[key] = AttributeValueFilterSensitiveLog(value)), acc), {}),
|
|
490
|
+
};
|
|
491
|
+
if (obj.$unknown !== undefined)
|
|
492
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
493
|
+
};
|
|
494
|
+
export const ContextDefinitionFilterSensitiveLog = (obj) => {
|
|
495
|
+
if (obj.contextMap !== undefined)
|
|
496
|
+
return {
|
|
497
|
+
contextMap: Object.entries(obj.contextMap).reduce((acc, [key, value]) => ((acc[key] = AttributeValueFilterSensitiveLog(value)), acc), {}),
|
|
498
|
+
};
|
|
499
|
+
if (obj.$unknown !== undefined)
|
|
500
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
501
|
+
};
|
|
502
|
+
export const EntityItemFilterSensitiveLog = (obj) => ({
|
|
503
|
+
...obj,
|
|
504
|
+
...(obj.identifier && { identifier: EntityIdentifierFilterSensitiveLog(obj.identifier) }),
|
|
505
|
+
...(obj.attributes && {
|
|
506
|
+
attributes: Object.entries(obj.attributes).reduce((acc, [key, value]) => ((acc[key] = AttributeValueFilterSensitiveLog(value)), acc), {}),
|
|
507
|
+
}),
|
|
508
|
+
...(obj.parents && { parents: obj.parents.map((item) => EntityIdentifierFilterSensitiveLog(item)) }),
|
|
509
|
+
});
|
|
510
|
+
export const EntitiesDefinitionFilterSensitiveLog = (obj) => {
|
|
511
|
+
if (obj.entityList !== undefined)
|
|
512
|
+
return { entityList: obj.entityList.map((item) => EntityItemFilterSensitiveLog(item)) };
|
|
513
|
+
if (obj.$unknown !== undefined)
|
|
514
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
515
|
+
};
|
|
516
|
+
export const IsAuthorizedInputFilterSensitiveLog = (obj) => ({
|
|
517
|
+
...obj,
|
|
518
|
+
...(obj.principal && { principal: EntityIdentifierFilterSensitiveLog(obj.principal) }),
|
|
519
|
+
...(obj.action && { action: ActionIdentifierFilterSensitiveLog(obj.action) }),
|
|
520
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
521
|
+
...(obj.context && { context: ContextDefinitionFilterSensitiveLog(obj.context) }),
|
|
522
|
+
...(obj.entities && { entities: EntitiesDefinitionFilterSensitiveLog(obj.entities) }),
|
|
523
|
+
});
|
|
524
|
+
export const IsAuthorizedWithTokenInputFilterSensitiveLog = (obj) => ({
|
|
525
|
+
...obj,
|
|
526
|
+
...(obj.identityToken && { identityToken: SENSITIVE_STRING }),
|
|
527
|
+
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
|
|
528
|
+
...(obj.action && { action: ActionIdentifierFilterSensitiveLog(obj.action) }),
|
|
529
|
+
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
|
|
530
|
+
...(obj.context && { context: ContextDefinitionFilterSensitiveLog(obj.context) }),
|
|
531
|
+
...(obj.entities && { entities: EntitiesDefinitionFilterSensitiveLog(obj.entities) }),
|
|
532
|
+
});
|
|
@@ -9,6 +9,7 @@ export const getRuntimeConfig = (config) => ({
|
|
|
9
9
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
10
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
11
11
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
12
|
+
extensions: config?.extensions ?? [],
|
|
12
13
|
logger: config?.logger ?? new NoOpLogger(),
|
|
13
14
|
serviceId: config?.serviceId ?? "VerifiedPermissions",
|
|
14
15
|
urlParser: config?.urlParser ?? parseUrl,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getDefaultClientConfiguration, resolveDefaultRuntimeConfig } from "@smithy/types";
|
|
2
|
+
const asPartial = (t) => t;
|
|
3
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
4
|
+
const clientConfiguration = {
|
|
5
|
+
...asPartial(getDefaultClientConfiguration(runtimeConfig)),
|
|
6
|
+
};
|
|
7
|
+
extensions.forEach((extension) => extension.configureClient(clientConfiguration));
|
|
8
|
+
return {
|
|
9
|
+
...runtimeConfig,
|
|
10
|
+
...resolveDefaultRuntimeConfig(clientConfiguration),
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -33,6 +33,7 @@ import { UpdatePolicyCommandInput, UpdatePolicyCommandOutput } from "./commands/
|
|
|
33
33
|
import { UpdatePolicyStoreCommandInput, UpdatePolicyStoreCommandOutput } from "./commands/UpdatePolicyStoreCommand";
|
|
34
34
|
import { UpdatePolicyTemplateCommandInput, UpdatePolicyTemplateCommandOutput } from "./commands/UpdatePolicyTemplateCommand";
|
|
35
35
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
36
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
36
37
|
export { __Client };
|
|
37
38
|
/**
|
|
38
39
|
* @public
|
|
@@ -140,6 +141,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
140
141
|
* Optional logger for logging debug/info/warn/error.
|
|
141
142
|
*/
|
|
142
143
|
logger?: __Logger;
|
|
144
|
+
/**
|
|
145
|
+
* Optional extensions
|
|
146
|
+
*/
|
|
147
|
+
extensions?: RuntimeExtension[];
|
|
143
148
|
/**
|
|
144
149
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
145
150
|
*/
|
|
@@ -159,7 +164,7 @@ export interface VerifiedPermissionsClientConfig extends VerifiedPermissionsClie
|
|
|
159
164
|
/**
|
|
160
165
|
* @public
|
|
161
166
|
*/
|
|
162
|
-
export type VerifiedPermissionsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
|
|
167
|
+
export type VerifiedPermissionsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
|
|
163
168
|
/**
|
|
164
169
|
* @public
|
|
165
170
|
*
|
|
@@ -24,11 +24,25 @@ export interface IsAuthorizedWithTokenCommandOutput extends IsAuthorizedWithToke
|
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
26
|
* <p>Makes an authorization decision about a service request described in the parameters.
|
|
27
|
-
* The principal in this request comes from an external identity source
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
27
|
+
* The principal in this request comes from an external identity source in the form of an identity
|
|
28
|
+
* token formatted as a <a href="https://wikipedia.org/wiki/JSON_Web_Token">JSON web
|
|
29
|
+
* token (JWT)</a>. The information in the parameters can also define additional
|
|
30
|
+
* context that Verified Permissions can include in the evaluation. The request is evaluated against all
|
|
31
|
+
* matching policies in the specified policy store. The result of the decision is either
|
|
32
|
+
* <code>Allow</code> or <code>Deny</code>, along with a list of the policies that
|
|
33
|
+
* resulted in the decision.</p>
|
|
34
|
+
* <important>
|
|
35
|
+
* <p>If you specify the <code>identityToken</code> parameter, then this operation
|
|
36
|
+
* derives the principal from that token. You must not also include that principal in
|
|
37
|
+
* the <code>entities</code> parameter or the operation fails and reports a conflict
|
|
38
|
+
* between the two entity sources.</p>
|
|
39
|
+
* <p>If you provide only an <code>accessToken</code>, then you can include the entity
|
|
40
|
+
* as part of the <code>entities</code> parameter to provide additional
|
|
41
|
+
* attributes.</p>
|
|
42
|
+
* </important>
|
|
43
|
+
* <p>At this time, Verified Permissions accepts tokens from only Amazon Cognito.</p>
|
|
44
|
+
* <p>Verified Permissions validates each token that is specified in a request by checking its expiration
|
|
45
|
+
* date and its signature.</p>
|
|
32
46
|
* <important>
|
|
33
47
|
* <p>If you delete a Amazon Cognito user pool or user, tokens from that deleted pool or that deleted user continue to be usable until they expire.</p>
|
|
34
48
|
* </important>
|
|
@@ -27,9 +27,46 @@ export interface UpdatePolicyCommandOutput extends UpdatePolicyOutput, __Metadat
|
|
|
27
27
|
* the <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyInput.html#amazonverifiedpermissions-UpdatePolicy-request-UpdatePolicyDefinition">UpdatePolicyDefinition</a> parameter. You can directly update only static policies. To
|
|
28
28
|
* change a template-linked policy, you must update the template instead, using <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyTemplate.html">UpdatePolicyTemplate</a>.</p>
|
|
29
29
|
* <note>
|
|
30
|
-
* <
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* <ul>
|
|
31
|
+
* <li>
|
|
32
|
+
* <p>If policy validation is enabled in the policy store, then updating a static policy causes
|
|
33
|
+
* Verified Permissions to validate the policy against the schema in the policy store. If the updated
|
|
34
|
+
* static policy doesn't pass validation, the operation fails and the update isn't
|
|
35
|
+
* stored.</p>
|
|
36
|
+
* </li>
|
|
37
|
+
* <li>
|
|
38
|
+
* <p>When you edit a static policy, You can change only certain elements of a static
|
|
39
|
+
* policy:</p>
|
|
40
|
+
* <ul>
|
|
41
|
+
* <li>
|
|
42
|
+
* <p>The action referenced by the policy. </p>
|
|
43
|
+
* </li>
|
|
44
|
+
* <li>
|
|
45
|
+
* <p>A condition clause, such as when and unless. </p>
|
|
46
|
+
* </li>
|
|
47
|
+
* </ul>
|
|
48
|
+
* <p>You can't change these elements of a static policy: </p>
|
|
49
|
+
* <ul>
|
|
50
|
+
* <li>
|
|
51
|
+
* <p>Changing a policy from a static policy to a template-linked
|
|
52
|
+
* policy. </p>
|
|
53
|
+
* </li>
|
|
54
|
+
* <li>
|
|
55
|
+
* <p>Changing the effect of a static policy from permit or forbid.
|
|
56
|
+
* </p>
|
|
57
|
+
* </li>
|
|
58
|
+
* <li>
|
|
59
|
+
* <p>The principal referenced by a static policy. </p>
|
|
60
|
+
* </li>
|
|
61
|
+
* <li>
|
|
62
|
+
* <p>The resource referenced by a static policy. </p>
|
|
63
|
+
* </li>
|
|
64
|
+
* </ul>
|
|
65
|
+
* </li>
|
|
66
|
+
* <li>
|
|
67
|
+
* <p>To update a template-linked policy, you must update the template instead. </p>
|
|
68
|
+
* </li>
|
|
69
|
+
* </ul>
|
|
33
70
|
* </note>
|
|
34
71
|
* @example
|
|
35
72
|
* Use a bare-bones client and the command you need to make an API call.
|