@kensio/yulin 1.17.0 → 1.17.1
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/service/acm/certificate/register-sim-acm-certificate.d.ts +41 -0
- package/dist/service/acm/certificate/register-sim-acm-certificate.d.ts.map +1 -0
- package/dist/service/acm/certificate/register-sim-acm-certificate.js +60 -0
- package/dist/service/acm/certificate/register-sim-acm-certificate.js.map +1 -0
- package/dist/service/acm/command/request-certificate/request-certificate.handler.d.ts +9 -0
- package/dist/service/acm/command/request-certificate/request-certificate.handler.d.ts.map +1 -1
- package/dist/service/acm/command/request-certificate/request-certificate.handler.js +18 -1
- package/dist/service/acm/command/request-certificate/request-certificate.handler.js.map +1 -1
- package/dist/service/acm/sim-acm.d.ts +15 -0
- package/dist/service/acm/sim-acm.d.ts.map +1 -1
- package/dist/service/acm/sim-acm.js +21 -0
- package/dist/service/acm/sim-acm.js.map +1 -1
- package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.d.ts +4 -0
- package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.d.ts.map +1 -1
- package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.js +7 -2
- package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.js.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.d.ts +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.d.ts.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.js +6 -4
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.js.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts +4 -0
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.js.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.d.ts +25 -2
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.d.ts.map +1 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.js +13 -0
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.js.map +1 -1
- package/dist/service/cloudformation/index.d.ts +1 -1
- package/dist/service/cloudformation/index.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-cfn-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-cfn-value-adapter.js +4 -0
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-cfn-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.d.ts +28 -0
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.js +33 -0
- package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.d.ts +6 -0
- package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.js +3 -0
- package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.js.map +1 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource-record.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource-record.js +1 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource-record.js.map +1 -1
- package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.d.ts +1 -0
- package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.d.ts.map +1 -1
- package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.js +2 -1
- package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.js.map +1 -1
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference-resolvers.d.ts.map +1 -1
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference-resolvers.js +4 -0
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference-resolvers.js.map +1 -1
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference.type.d.ts +19 -1
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference.type.d.ts.map +1 -1
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.d.ts +6 -0
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.d.ts.map +1 -1
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.js +9 -3
- package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.js.map +1 -1
- package/dist/service/cloudfront/command/create-function/create-function-code-size.d.ts +23 -0
- package/dist/service/cloudfront/command/create-function/create-function-code-size.d.ts.map +1 -0
- package/dist/service/cloudfront/command/create-function/create-function-code-size.js +33 -0
- package/dist/service/cloudfront/command/create-function/create-function-code-size.js.map +1 -0
- package/dist/service/cloudfront/command/create-function/create-function.handler.d.ts.map +1 -1
- package/dist/service/cloudfront/command/create-function/create-function.handler.js +2 -0
- package/dist/service/cloudfront/command/create-function/create-function.handler.js.map +1 -1
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +11 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts.map +1 -1
- package/dist/service/cloudfront/error/sim-cloudfront.error.js +13 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.js.map +1 -1
- package/dist/service/cloudfront/index.d.ts +1 -1
- package/dist/service/cloudfront/index.d.ts.map +1 -1
- package/dist/service/cloudfront/index.js +1 -1
- package/dist/service/cloudfront/index.js.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +6 -0
- package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.js +22 -6
- package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.d.ts +22 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +26 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +2 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +1 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts +24 -0
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-identity-provider.js +26 -0
- package/dist/service/cognito/sim-cognito-identity-provider.js.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.d.ts +9 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.js +2 -2
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.js.map +1 -1
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.d.ts +22 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.js +36 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.js.map +1 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.d.ts +25 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.js +30 -0
- package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-registration.types.d.ts +40 -0
- package/dist/service/cognito/user-pool/sim-cognito-registration.types.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-registration.types.js +2 -0
- package/dist/service/cognito/user-pool/sim-cognito-registration.types.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-registrations.d.ts +34 -0
- package/dist/service/cognito/user-pool/sim-cognito-registrations.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-registrations.js +28 -0
- package/dist/service/cognito/user-pool/sim-cognito-registrations.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.d.ts +9 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.js +3 -2
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.d.ts +9 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.js +18 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.d.ts +8 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.js +15 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.js.map +1 -1
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.d.ts +40 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.d.ts.map +1 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.js +65 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.js.map +1 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.d.ts +1 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.d.ts.map +1 -1
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js +5 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js.map +1 -1
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.d.ts +11 -20
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.d.ts.map +1 -1
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.js +29 -61
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.js.map +1 -1
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.d.ts +38 -0
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.d.ts.map +1 -0
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.js +79 -0
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.js.map +1 -0
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.d.ts +2 -2
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.d.ts.map +1 -1
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.js +4 -2
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.js.map +1 -1
- package/dist/service/iam/cfn/sim-cfn-iam-policies-parser.d.ts +35 -0
- package/dist/service/iam/cfn/sim-cfn-iam-policies-parser.d.ts.map +1 -0
- package/dist/service/iam/cfn/{role/sim-cfn-iam-role-policies-parser.js → sim-cfn-iam-policies-parser.js} +17 -12
- package/dist/service/iam/cfn/sim-cfn-iam-policies-parser.js.map +1 -0
- package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.d.ts +11 -0
- package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.d.ts.map +1 -1
- package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.js +25 -0
- package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.js.map +1 -1
- package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.d.ts +1 -0
- package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.d.ts.map +1 -1
- package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.js +6 -0
- package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.js.map +1 -1
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.d.ts +28 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.d.ts.map +1 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.js +67 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.js.map +1 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.d.ts +26 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.d.ts.map +1 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.js +29 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.js.map +1 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.d.ts +38 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.d.ts.map +1 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.js +80 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.js.map +1 -0
- package/dist/service/iam/command/sim-iam-command.types.d.ts +3 -0
- package/dist/service/iam/command/sim-iam-command.types.d.ts.map +1 -1
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.d.ts +9 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.d.ts.map +1 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.js +2 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.js.map +1 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.d.ts +30 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.d.ts.map +1 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.js +44 -0
- package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.js.map +1 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.d.ts +16 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.d.ts.map +1 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.js +2 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.js.map +1 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.d.ts +32 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.d.ts.map +1 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.js +59 -0
- package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.js.map +1 -0
- package/dist/service/iam/command/user/create-user/create-user-record-factory.d.ts.map +1 -1
- package/dist/service/iam/command/user/create-user/create-user-record-factory.js +1 -0
- package/dist/service/iam/command/user/create-user/create-user-record-factory.js.map +1 -1
- package/dist/service/iam/command/user/delete-user/delete-user.command.d.ts +19 -0
- package/dist/service/iam/command/user/delete-user/delete-user.command.d.ts.map +1 -0
- package/dist/service/iam/command/user/delete-user/delete-user.command.js +2 -0
- package/dist/service/iam/command/user/delete-user/delete-user.command.js.map +1 -0
- package/dist/service/iam/command/user/delete-user/delete-user.handler.d.ts +34 -0
- package/dist/service/iam/command/user/delete-user/delete-user.handler.d.ts.map +1 -0
- package/dist/service/iam/command/user/delete-user/delete-user.handler.js +51 -0
- package/dist/service/iam/command/user/delete-user/delete-user.handler.js.map +1 -0
- package/dist/service/iam/command/user/sim-iam-user-command-handlers.d.ts +15 -0
- package/dist/service/iam/command/user/sim-iam-user-command-handlers.d.ts.map +1 -1
- package/dist/service/iam/command/user/sim-iam-user-command-handlers.js +36 -0
- package/dist/service/iam/command/user/sim-iam-user-command-handlers.js.map +1 -1
- package/dist/service/iam/sdk/sim-iam-sdk-command-router.d.ts.map +1 -1
- package/dist/service/iam/sdk/sim-iam-sdk-command-router.js +12 -0
- package/dist/service/iam/sdk/sim-iam-sdk-command-router.js.map +1 -1
- package/dist/service/iam/sim-iam.d.ts +12 -0
- package/dist/service/iam/sim-iam.d.ts.map +1 -1
- package/dist/service/iam/sim-iam.js +18 -0
- package/dist/service/iam/sim-iam.js.map +1 -1
- package/dist/service/iam/user/sim-iam-user-login-profile.d.ts +14 -0
- package/dist/service/iam/user/sim-iam-user-login-profile.d.ts.map +1 -0
- package/dist/service/iam/user/sim-iam-user-login-profile.js +2 -0
- package/dist/service/iam/user/sim-iam-user-login-profile.js.map +1 -0
- package/dist/service/iam/user/sim-iam-user.d.ts +8 -0
- package/dist/service/iam/user/sim-iam-user.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts +6 -5
- package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-executable-code.js +7 -6
- package/dist/service/lambda/function/code/sim-lambda-executable-code.js.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +11 -3
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +13 -7
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-process-output.d.ts +104 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-output.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-output.js +133 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-output.js.map +1 -0
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts +10 -0
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts.map +1 -1
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.js +11 -0
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.js.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.d.ts +2 -1
- package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.js +5 -2
- package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
- package/dist/service/s3/command/get-object/get-object-loader.d.ts +5 -3
- package/dist/service/s3/command/get-object/get-object-loader.d.ts.map +1 -1
- package/dist/service/s3/command/get-object/get-object-loader.js +19 -4
- package/dist/service/s3/command/get-object/get-object-loader.js.map +1 -1
- package/dist/service/s3/command/get-object/get-object.command.d.ts +13 -0
- package/dist/service/s3/command/get-object/get-object.command.d.ts.map +1 -1
- package/dist/service/s3/command/get-object/get-object.handler.d.ts +3 -0
- package/dist/service/s3/command/get-object/get-object.handler.d.ts.map +1 -1
- package/dist/service/s3/command/get-object/get-object.handler.js +4 -1
- package/dist/service/s3/command/get-object/get-object.handler.js.map +1 -1
- package/dist/service/s3/error/sim-s3.error.d.ts +13 -0
- package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.js +15 -0
- package/dist/service/s3/error/sim-s3.error.js.map +1 -1
- package/dist/service/s3/object/s3-object-range.d.ts +26 -0
- package/dist/service/s3/object/s3-object-range.d.ts.map +1 -0
- package/dist/service/s3/object/s3-object-range.js +89 -0
- package/dist/service/s3/object/s3-object-range.js.map +1 -0
- package/dist/service/s3/object/s3-object-response-headers.d.ts +7 -1
- package/dist/service/s3/object/s3-object-response-headers.d.ts.map +1 -1
- package/dist/service/s3/object/s3-object-response-headers.js +5 -1
- package/dist/service/s3/object/s3-object-response-headers.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts +0 -14
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-input.js +0 -29
- package/dist/service/s3/serve/api/sim-s3-api-input.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-object-input.d.ts +27 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-input.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-input.js +47 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-input.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-output.d.ts +5 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-output.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-object-output.js +8 -1
- package/dist/service/s3/serve/api/sim-s3-api-object-output.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.js +2 -2
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.js.map +1 -1
- package/dist/service/s3/serve/sim-s3-rest-object-reader.d.ts +5 -0
- package/dist/service/s3/serve/sim-s3-rest-object-reader.d.ts.map +1 -1
- package/dist/service/s3/serve/sim-s3-rest-object-reader.js +20 -3
- package/dist/service/s3/serve/sim-s3-rest-object-reader.js.map +1 -1
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.d.ts +0 -7
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.d.ts.map +1 -1
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.js +7 -41
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.js.map +1 -1
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.d.ts +14 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.d.ts.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.js +26 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.js.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.d.ts +11 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.d.ts.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.js +16 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.js.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.d.ts +40 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.d.ts.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.js +67 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.js.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.d.ts +8 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.d.ts.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.js +61 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.js.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.d.ts +19 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.d.ts.map +1 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.js +37 -0
- package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.js.map +1 -0
- package/dist/service/ssm/sim-ssm.d.ts +5 -0
- package/dist/service/ssm/sim-ssm.d.ts.map +1 -1
- package/dist/service/ssm/sim-ssm.js +7 -0
- package/dist/service/ssm/sim-ssm.js.map +1 -1
- package/package.json +1 -1
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-policies-parser.d.ts +0 -25
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-policies-parser.d.ts.map +0 -1
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-policies-parser.js.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SimCognitoUserPoolClientFactory } from "./client/sim-cognito-user-pool-client-factory.js";
|
|
2
|
+
import type { SimCognitoUserPoolClient } from "./client/sim-cognito-user-pool-client.js";
|
|
3
|
+
import type { SimCognitoUserPoolClientRegistration, SimCognitoUserPoolRegistration } from "./sim-cognito-registration.types.js";
|
|
4
|
+
import type { SimCognitoUserPool } from "./sim-cognito-user-pool.js";
|
|
5
|
+
import type { SimCognitoUserPoolFactory } from "./sim-cognito-user-pool-factory.js";
|
|
6
|
+
import type { SimCognitoUserPoolStore } from "./sim-cognito-user-pool-store.js";
|
|
7
|
+
interface SimCognitoRegistrationsProperties {
|
|
8
|
+
/** The Region a pool registered here has to name in its id. */
|
|
9
|
+
readonly regionName: string;
|
|
10
|
+
readonly pools: SimCognitoUserPoolStore;
|
|
11
|
+
readonly poolFactory: SimCognitoUserPoolFactory;
|
|
12
|
+
readonly clientFactory: SimCognitoUserPoolClientFactory;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The user pools and app clients a simulation is told already exist.
|
|
16
|
+
*
|
|
17
|
+
* These are the simulator's own setup operations rather than AWS ones, so they
|
|
18
|
+
* skip the command surface and its authorization, as `mountBucketFilesystem`
|
|
19
|
+
* and `registerHostedZone` do.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SimCognitoRegistrations {
|
|
22
|
+
private readonly properties;
|
|
23
|
+
constructor(properties: SimCognitoRegistrationsProperties);
|
|
24
|
+
/**
|
|
25
|
+
* Register a user pool under a chosen pool id.
|
|
26
|
+
*/
|
|
27
|
+
userPool(registration: SimCognitoUserPoolRegistration): SimCognitoUserPool;
|
|
28
|
+
/**
|
|
29
|
+
* Register an app client of a pool under a chosen client id.
|
|
30
|
+
*/
|
|
31
|
+
userPoolClient(registration: SimCognitoUserPoolClientRegistration): SimCognitoUserPoolClient;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=sim-cognito-registrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-registrations.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-registrations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACxG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,KAAK,EACV,oCAAoC,EACpC,8BAA8B,EAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,UAAU,iCAAiC;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAChD,QAAQ,CAAC,aAAa,EAAE,+BAA+B,CAAC;CACzD;AAED;;;;;;GAMG;AACH,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAAvC,YAA6B,UAAU,EAAE,iCAAiC,EAAI;IAE9E;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,8BAA8B,GAAG,kBAAkB,CAEzE;IAED;;OAEG;IACH,cAAc,CACZ,YAAY,EAAE,oCAAoC,GACjD,wBAAwB,CAE1B;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { registerSimCognitoUserPoolClient } from "./register-sim-cognito-user-pool-client.js";
|
|
2
|
+
import { registerSimCognitoUserPool } from "./register-sim-cognito-user-pool.js";
|
|
3
|
+
/**
|
|
4
|
+
* The user pools and app clients a simulation is told already exist.
|
|
5
|
+
*
|
|
6
|
+
* These are the simulator's own setup operations rather than AWS ones, so they
|
|
7
|
+
* skip the command surface and its authorization, as `mountBucketFilesystem`
|
|
8
|
+
* and `registerHostedZone` do.
|
|
9
|
+
*/
|
|
10
|
+
export class SimCognitoRegistrations {
|
|
11
|
+
properties;
|
|
12
|
+
constructor(properties) {
|
|
13
|
+
this.properties = properties;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Register a user pool under a chosen pool id.
|
|
17
|
+
*/
|
|
18
|
+
userPool(registration) {
|
|
19
|
+
return registerSimCognitoUserPool(registration, this.properties);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Register an app client of a pool under a chosen client id.
|
|
23
|
+
*/
|
|
24
|
+
userPoolClient(registration) {
|
|
25
|
+
return registerSimCognitoUserPoolClient(registration, this.properties);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=sim-cognito-registrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cognito-registrations.js","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-registrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAoBjF;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IACL,UAAU;IAAvC,YAA6B,UAA6C;0BAA7C,UAAU;IAAsC,CAAC;IAE9E;;OAEG;IACH,QAAQ,CAAC,YAA4C;QACnD,OAAO,0BAA0B,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,YAAkD;QAElD,OAAO,gCAAgC,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SimClock } from "../../../util/clock/sim-clock.js";
|
|
2
2
|
import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-scope.js";
|
|
3
3
|
import { SimCognitoUserPool } from "./sim-cognito-user-pool.js";
|
|
4
|
+
import { type SimCognitoUserPoolId } from "./sim-cognito-user-pool-id.js";
|
|
4
5
|
import { type SimCognitoUserPoolSettingsInput } from "./sim-cognito-user-pool-settings.js";
|
|
5
6
|
import type { SimCognitoUserPoolStore } from "./sim-cognito-user-pool-store.js";
|
|
6
7
|
interface SimCognitoUserPoolFactoryProperties {
|
|
@@ -14,6 +15,14 @@ interface SimCognitoMakeUserPoolProperties {
|
|
|
14
15
|
* The `CreateUserPool` request the pool's settings are read out of.
|
|
15
16
|
*/
|
|
16
17
|
readonly settings: SimCognitoUserPoolSettingsInput;
|
|
18
|
+
/**
|
|
19
|
+
* The id the pool takes, where something else already decided it.
|
|
20
|
+
*
|
|
21
|
+
* `CreateUserPool` leaves this out and gets an allocated id, as real Cognito
|
|
22
|
+
* allocates one. A registration passes the id it was given, having checked
|
|
23
|
+
* that it is free and that it names this scope's region.
|
|
24
|
+
*/
|
|
25
|
+
readonly id?: SimCognitoUserPoolId | undefined;
|
|
17
26
|
}
|
|
18
27
|
/**
|
|
19
28
|
* Builds simulated user pools, including their id, ARN and defaults.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cognito-user-pool-factory.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cognito-user-pool-factory.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;CAC1B;AAED,UAAU,gCAAgC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,CAAC;IAEnD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CAChD;AAED;;;;;;GAMG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAC9D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;IAChD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IAEjC,YAAY,UAAU,EAAE,mCAAmC,EAI1D;IAED;;OAEG;IACH,IAAI,CAAC,UAAU,EAAE,gCAAgC,GAAG,kBAAkB,CAwBrE;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SimCognitoName } from "./sim-cognito-name.js";
|
|
2
2
|
import { SimCognitoUserPool } from "./sim-cognito-user-pool.js";
|
|
3
3
|
import { SimCognitoUserPoolArn } from "./sim-cognito-user-pool-arn.js";
|
|
4
|
-
import { makeSimCognitoUserPoolId } from "./sim-cognito-user-pool-id.js";
|
|
4
|
+
import { makeSimCognitoUserPoolId, } from "./sim-cognito-user-pool-id.js";
|
|
5
5
|
import { SimCognitoUserPoolSettings, } from "./sim-cognito-user-pool-settings.js";
|
|
6
6
|
/**
|
|
7
7
|
* Builds simulated user pools, including their id, ARN and defaults.
|
|
@@ -23,7 +23,8 @@ export class SimCognitoUserPoolFactory {
|
|
|
23
23
|
* Make a new pool with no app clients yet.
|
|
24
24
|
*/
|
|
25
25
|
make(properties) {
|
|
26
|
-
const userPoolId =
|
|
26
|
+
const userPoolId = properties.id ??
|
|
27
|
+
makeSimCognitoUserPoolId(this.accountRegionScope.regionName, this.pools.ids);
|
|
27
28
|
return new SimCognitoUserPool({
|
|
28
29
|
id: userPoolId,
|
|
29
30
|
arn: new SimCognitoUserPoolArn({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cognito-user-pool-factory.js","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"sim-cognito-user-pool-factory.js","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EACL,wBAAwB,GAEzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,GAE3B,MAAM,qCAAqC,CAAC;AA2B7C;;;;;;GAMG;AACH,MAAM,OAAO,yBAAyB;IACnB,kBAAkB,CAA2B;IAC7C,KAAK,CAA0B;IAC/B,KAAK,CAAW;IAEjC,YAAY,UAA+C;QACzD,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,UAA4C;QAC/C,MAAM,UAAU,GACd,UAAU,CAAC,EAAE;YACb,wBAAwB,CACtB,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAClC,IAAI,CAAC,KAAK,CAAC,GAAG,CACf,CAAC;QAEJ,OAAO,IAAI,kBAAkB,CAAC;YAC5B,EAAE,EAAE,UAAU;YACd,GAAG,EAAE,IAAI,qBAAqB,CAAC;gBAC7B,UAAU;gBACV,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;aAC5C,CAAC;YACF,IAAI,EAAE,IAAI,cAAc,CAAC;gBACvB,KAAK,EAAE,UAAU;gBACjB,KAAK,EAAE,UAAU,CAAC,IAAI;aACvB,CAAC;YACF,QAAQ,EAAE,IAAI,0BAA0B,CAAC;gBACvC,KAAK,EAAE,UAAU,CAAC,QAAQ;gBAC1B,SAAS,EAAE,gBAAgB;aAC5B,CAAC;YACF,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -17,6 +17,15 @@ export declare function makeSimCognitoUserPoolId(regionName: AwsRegionName, exis
|
|
|
17
17
|
* as a missing pool.
|
|
18
18
|
*/
|
|
19
19
|
export declare function requireSimCognitoUserPoolId(value: string | undefined): SimCognitoUserPoolId;
|
|
20
|
+
/**
|
|
21
|
+
* Read a requested user pool id that has to belong to one Region.
|
|
22
|
+
*
|
|
23
|
+
* A pool id carries the Region its pool lives in, and a pool's ARN carries the
|
|
24
|
+
* Region of the simulated Cognito holding it. Registering a pool under an id
|
|
25
|
+
* from another Region would name two Regions in one pool, which no real pool
|
|
26
|
+
* does.
|
|
27
|
+
*/
|
|
28
|
+
export declare function requireSimCognitoUserPoolIdInRegion(value: string | undefined, regionName: string): SimCognitoUserPoolId;
|
|
20
29
|
/**
|
|
21
30
|
* The Region a pool lives in, which its id names.
|
|
22
31
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cognito-user-pool-id.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAczE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,aAAa,EACzB,QAAQ,cAAoB,GAC3B,oBAAoB,CAatB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,oBAAoB,CAetB;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIvE;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAItE;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzE"}
|
|
1
|
+
{"version":3,"file":"sim-cognito-user-pool-id.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAczE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,aAAa,EACzB,QAAQ,cAAoB,GAC3B,oBAAoB,CAatB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,oBAAoB,CAetB;AAED;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,UAAU,EAAE,MAAM,GACjB,oBAAoB,CAatB;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIvE;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAItE;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzE"}
|
|
@@ -45,6 +45,24 @@ export function requireSimCognitoUserPoolId(value) {
|
|
|
45
45
|
}
|
|
46
46
|
return value;
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Read a requested user pool id that has to belong to one Region.
|
|
50
|
+
*
|
|
51
|
+
* A pool id carries the Region its pool lives in, and a pool's ARN carries the
|
|
52
|
+
* Region of the simulated Cognito holding it. Registering a pool under an id
|
|
53
|
+
* from another Region would name two Regions in one pool, which no real pool
|
|
54
|
+
* does.
|
|
55
|
+
*/
|
|
56
|
+
export function requireSimCognitoUserPoolIdInRegion(value, regionName) {
|
|
57
|
+
const userPoolId = requireSimCognitoUserPoolId(value);
|
|
58
|
+
const idRegionName = simCognitoUserPoolRegionName(userPoolId);
|
|
59
|
+
if (idRegionName !== regionName) {
|
|
60
|
+
throw new SimCognitoInvalidParameterException(`UserPoolId '${userPoolId}' names Region ${idRegionName}, and this ` +
|
|
61
|
+
`simulated Cognito is ${regionName}. Register the pool on the ` +
|
|
62
|
+
`simulated Cognito of Region ${idRegionName}.`);
|
|
63
|
+
}
|
|
64
|
+
return userPoolId;
|
|
65
|
+
}
|
|
48
66
|
/**
|
|
49
67
|
* The Region a pool lives in, which its id names.
|
|
50
68
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cognito-user-p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AAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CAAC,UAAkB;IAC5D,MAAM,UAAU,GAAG,4BAA4B,CAAC,UAAU,CAAC,CAAC;IAE5D,OAAO,uBAAuB,UAAU,kBAAkB,UAAU,EAAE,CAAC;AACzE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAAC,UAAkB;IAC/D,OAAO,2BAA2B,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -82,6 +82,14 @@ export declare class SimCognitoUserPoolStore {
|
|
|
82
82
|
* from.
|
|
83
83
|
*/
|
|
84
84
|
requireClient(clientId: SimCognitoUserPoolClientId): SimCognitoClientInPool;
|
|
85
|
+
/**
|
|
86
|
+
* Find an app client by id alone, and the pool holding it.
|
|
87
|
+
*
|
|
88
|
+
* This is the same search `requireClient` makes, for a caller that has
|
|
89
|
+
* something to do with the absence. Registering a client under a chosen id
|
|
90
|
+
* uses it to keep one client id out of two pools.
|
|
91
|
+
*/
|
|
92
|
+
findClient(clientId: SimCognitoUserPoolClientId): SimCognitoClientInPool | undefined;
|
|
85
93
|
/**
|
|
86
94
|
* Resolve the access token a request is authorized with, and the pool that
|
|
87
95
|
* signed it, or refuse.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cognito-user-pool-store.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,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IAED;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,0BAA0B,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"sim-cognito-user-pool-store.d.ts","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;CACvC;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IAE/C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyC;IAC/D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IACtD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2B;IAEnD,YAAY,UAAU,GAAE,iCAAsC,EAG7D;IAED,OAAO,CAAC,MAAM,CAAC,SAAS;IAWxB;;OAEG;IACH,IAAI,GAAG,IAAI,SAAS,kBAAkB,EAAE,CAEvC;IAED;;;;;;OAMG;IACH,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAErB;IAED;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAGlC;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,CASrC;IAED;;OAEG;IACH,IAAI,CAAC,UAAU,EAAE,oBAAoB,GAAG,kBAAkB,GAAG,SAAS,CAErE;IAED;;OAEG;IACH,OAAO,CAAC,UAAU,EAAE,oBAAoB,GAAG,kBAAkB,CAU5D;IAED;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,0BAA0B,GAAG,sBAAsB,CAU1E;IAED;;;;;;OAMG;IACH,UAAU,CACR,QAAQ,EAAE,0BAA0B,GACnC,sBAAsB,GAAG,SAAS,CAUpC;IAED;;;;;;;OAOG;IACH,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,2BAA2B,CAYxE;CACF"}
|
|
@@ -86,13 +86,27 @@ export class SimCognitoUserPoolStore {
|
|
|
86
86
|
* from.
|
|
87
87
|
*/
|
|
88
88
|
requireClient(clientId) {
|
|
89
|
+
const found = this.findClient(clientId);
|
|
90
|
+
if (found === undefined) {
|
|
91
|
+
throw new SimCognitoResourceNotFoundException(`App client ${clientId} does not exist.`);
|
|
92
|
+
}
|
|
93
|
+
return found;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Find an app client by id alone, and the pool holding it.
|
|
97
|
+
*
|
|
98
|
+
* This is the same search `requireClient` makes, for a caller that has
|
|
99
|
+
* something to do with the absence. Registering a client under a chosen id
|
|
100
|
+
* uses it to keep one client id out of two pools.
|
|
101
|
+
*/
|
|
102
|
+
findClient(clientId) {
|
|
89
103
|
for (const pool of this.all) {
|
|
90
104
|
const client = pool.findClient(clientId);
|
|
91
105
|
if (client !== undefined) {
|
|
92
106
|
return { pool, client };
|
|
93
107
|
}
|
|
94
108
|
}
|
|
95
|
-
|
|
109
|
+
return undefined;
|
|
96
110
|
}
|
|
97
111
|
/**
|
|
98
112
|
* Resolve the access token a request is authorized with, and the pool that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cognito-user-pool-store.js","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,mCAAmC,GACpC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAiC3F;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAuB;IACjB,KAAK,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC9C,QAAQ,CAA6B;IACrC,OAAO,CAA2B;IAEnD,YAAY,UAAU,GAAsC,EAAE;QAC5D,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,IAAI,IAAI,0BAA0B,EAAE,CAAC;QACxE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,IAAI,IAAI,wBAAwB,EAAE,CAAC;IACtE,CAAC;IAEO,MAAM,CAAC,SAAS,CACtB,MAA6B,EAC7B,GAAS;QAET,IAAI,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,gCAAgC,CAAC,2BAA2B,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAA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CAAC;YAC1B,CAAC;QACH,CAAC;QAED,
|
|
1
|
+
{"version":3,"file":"sim-cognito-user-pool-store.js","sourceRoot":"","sources":["../../../../src/service/cognito/user-pool/sim-cognito-user-pool-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,mCAAmC,GACpC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAiC3F;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAuB;IACjB,KAAK,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC9C,QAAQ,CAA6B;IACrC,OAAO,CAA2B;IAEnD,YAAY,UAAU,GAAsC,EAAE;QAC5D,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,IAAI,IAAI,0BAA0B,EAAE,CAAC;QACxE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,IAAI,IAAI,wBAAwB,EAAE,CAAC;IACtE,CAAC;IAEO,MAAM,CAAC,SAAS,CACtB,MAA6B,EAC7B,GAAS;QAET,IAAI,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,gCAAgC,CAAC,2BAA2B,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAwB;QAC1B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,C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MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;;OAOG;IACH,kBAAkB,CAAC,KAAa,EAAE,GAAS;QACzC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YAEhD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAuB,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;YACzE,CAAC;QACH,CAAC;QAED,MAAM,IAAI,gCAAgC,CACxC,gCAAgC,CACjC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SimArn } from "../../../aws/arn.js";
|
|
2
|
+
import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-resource.js";
|
|
3
|
+
import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
4
|
+
import type { SimIam } from "../../sim-iam.js";
|
|
5
|
+
import type { SimIamRoleName } from "../../role/sim-iam-role.js";
|
|
6
|
+
interface SimCfnIamManagedPolicyAttacherProperties {
|
|
7
|
+
readonly iam: SimIam;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Attaches a CloudFormation-created Managed Policy to the principals its
|
|
11
|
+
* Resource names.
|
|
12
|
+
*
|
|
13
|
+
* `Roles` names the Roles the policy is attached to as it is created, which is
|
|
14
|
+
* the attachment AttachRolePolicy records. `Users` and `Groups` name
|
|
15
|
+
* principals with nowhere to hold a managed policy attachment here, and both
|
|
16
|
+
* fail the Resource. Dropping the grant a template asked for without saying so
|
|
17
|
+
* would be misleading.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SimCfnIamManagedPolicyAttacher {
|
|
20
|
+
private readonly iam;
|
|
21
|
+
constructor(properties: SimCfnIamManagedPolicyAttacherProperties);
|
|
22
|
+
/**
|
|
23
|
+
* The Roles an AWS::IAM::ManagedPolicy Resource attaches itself to. Role
|
|
24
|
+
* Refs are resolved to Role names before creation, so entries arrive as
|
|
25
|
+
* plain strings.
|
|
26
|
+
*
|
|
27
|
+
* A name no simulated Role answers to fails the Resource before the policy
|
|
28
|
+
* is created. Checking afterwards would leave a policy behind with nothing
|
|
29
|
+
* attached to it.
|
|
30
|
+
*/
|
|
31
|
+
roleNames(resource: SimCfnResource, properties: SimCfnTemplateValueRecord): readonly SimIamRoleName[];
|
|
32
|
+
/**
|
|
33
|
+
* Attach the created Managed Policy to each of the Roles.
|
|
34
|
+
*/
|
|
35
|
+
attach(policyArn: SimArn, roleNames: readonly SimIamRoleName[]): Promise<void>;
|
|
36
|
+
private roleName;
|
|
37
|
+
private rejectUnsimulatedPrincipals;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=sim-cfn-iam-managed-policy-attacher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-iam-managed-policy-attacher.d.ts","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,UAAU,wCAAwC;IAChD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,qBAAa,8BAA8B;IACzC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B,YAAY,UAAU,EAAE,wCAAwC,EAE/D;IAED;;;;;;;;OAQG;IACH,SAAS,CACP,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,yBAAyB,GACpC,SAAS,cAAc,EAAE,CAgB3B;IAED;;OAEG;IACG,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC,CAQf;IAED,OAAO,CAAC,QAAQ;IAmBhB,OAAO,CAAC,2BAA2B;CAcpC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SimIamNoSuchEntity } from "../../error/sim-iam.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Attaches a CloudFormation-created Managed Policy to the principals its
|
|
4
|
+
* Resource names.
|
|
5
|
+
*
|
|
6
|
+
* `Roles` names the Roles the policy is attached to as it is created, which is
|
|
7
|
+
* the attachment AttachRolePolicy records. `Users` and `Groups` name
|
|
8
|
+
* principals with nowhere to hold a managed policy attachment here, and both
|
|
9
|
+
* fail the Resource. Dropping the grant a template asked for without saying so
|
|
10
|
+
* would be misleading.
|
|
11
|
+
*/
|
|
12
|
+
export class SimCfnIamManagedPolicyAttacher {
|
|
13
|
+
iam;
|
|
14
|
+
constructor(properties) {
|
|
15
|
+
this.iam = properties.iam;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The Roles an AWS::IAM::ManagedPolicy Resource attaches itself to. Role
|
|
19
|
+
* Refs are resolved to Role names before creation, so entries arrive as
|
|
20
|
+
* plain strings.
|
|
21
|
+
*
|
|
22
|
+
* A name no simulated Role answers to fails the Resource before the policy
|
|
23
|
+
* is created. Checking afterwards would leave a policy behind with nothing
|
|
24
|
+
* attached to it.
|
|
25
|
+
*/
|
|
26
|
+
roleNames(resource, properties) {
|
|
27
|
+
this.rejectUnsimulatedPrincipals(resource, properties);
|
|
28
|
+
const roles = properties["Roles"];
|
|
29
|
+
if (roles === undefined) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
if (!Array.isArray(roles)) {
|
|
33
|
+
throw new TypeError(`Invalid AWS::IAM::ManagedPolicy ${resource.logicalId}: Roles must be an array`);
|
|
34
|
+
}
|
|
35
|
+
return roles.map((roleName) => this.roleName(resource, roleName));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Attach the created Managed Policy to each of the Roles.
|
|
39
|
+
*/
|
|
40
|
+
async attach(policyArn, roleNames) {
|
|
41
|
+
await Promise.all(roleNames.map(async (roleName) => this.iam.attachRolePolicy({
|
|
42
|
+
input: { RoleName: roleName, PolicyArn: policyArn },
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
roleName(resource, roleName) {
|
|
46
|
+
if (typeof roleName !== "string") {
|
|
47
|
+
throw new TypeError(`Invalid AWS::IAM::ManagedPolicy ${resource.logicalId}: Roles entries must be strings`);
|
|
48
|
+
}
|
|
49
|
+
const simRoleName = roleName;
|
|
50
|
+
if (!this.iam.roles.has(simRoleName)) {
|
|
51
|
+
throw new SimIamNoSuchEntity(`No IAM Role with name ${roleName}`);
|
|
52
|
+
}
|
|
53
|
+
return simRoleName;
|
|
54
|
+
}
|
|
55
|
+
rejectUnsimulatedPrincipals(resource, properties) {
|
|
56
|
+
for (const principalProperty of ["Users", "Groups"]) {
|
|
57
|
+
// oxlint-disable-next-line security/detect-object-injection -- fixed property names.
|
|
58
|
+
if (properties[principalProperty] !== undefined) {
|
|
59
|
+
throw new TypeError(`Invalid AWS::IAM::ManagedPolicy ${resource.logicalId}: ` +
|
|
60
|
+
`${principalProperty} are not simulated`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=sim-cfn-iam-managed-policy-attacher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-iam-managed-policy-attacher.js","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAMlE;;;;;;;;;GASG;AACH,MAAM,OAAO,8BAA8B;IACxB,GAAG,CAAS;IAE7B,YAAY,UAAoD;QAC9D,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CACP,QAAwB,EACxB,UAAqC;QAErC,IAAI,CAAC,2BAA2B,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAEvD,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QAElC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CACjB,mCAAmC,QAAQ,CAAC,SAAS,0BAA0B,CAChF,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,SAAiB,EACjB,SAAoC;QAEpC,MAAM,OAAO,CAAC,GAAG,CACf,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAC/B,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC;YACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE;SACpD,CAAC,CACH,CACF,CAAC;IACJ,CAAC;IAEO,QAAQ,CACd,QAAwB,EACxB,QAAiB;QAEjB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,IAAI,SAAS,CACjB,mCAAmC,QAAQ,CAAC,SAAS,iCAAiC,CACvF,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAAG,QAA0B,CAAC;QAE/C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,kBAAkB,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,2BAA2B,CACjC,QAAwB,EACxB,UAAqC;QAErC,KAAK,MAAM,iBAAiB,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;YACpD,qFAAqF;YACrF,IAAI,UAAU,CAAC,iBAAiB,CAAC,KAAK,SAAS,EAAE,CAAC;gBAChD,MAAM,IAAI,SAAS,CACjB,mCAAmC,QAAQ,CAAC,SAAS,IAAI;oBACvD,GAAG,iBAAiB,oBAAoB,CAC3C,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -10,6 +10,7 @@ interface SimCfnIamManagedPolicyCreatorProperties {
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class SimCfnIamManagedPolicyCreator {
|
|
12
12
|
private readonly iam;
|
|
13
|
+
private readonly attacher;
|
|
13
14
|
constructor(properties: SimCfnIamManagedPolicyCreatorProperties);
|
|
14
15
|
/**
|
|
15
16
|
* Create a simulated Managed Policy from an AWS::IAM::ManagedPolicy Resource.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-iam-managed-policy-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-iam-managed-policy-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,UAAU,uCAAuC;IAC/C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAE1D,YAAY,UAAU,EAAE,uCAAuC,EAG9D;IAED;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,mBAAmB,CAAC,CAyB9B;IAED,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,IAAI;IAmBZ,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,cAAc;CAmBvB"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import { SimCfnIamManagedPolicyAttacher } from "./sim-cfn-iam-managed-policy-attacher.js";
|
|
1
2
|
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
3
|
/**
|
|
3
4
|
* Creates simulated IAM Managed Policies from CloudFormation Resources.
|
|
4
5
|
*/
|
|
5
6
|
export class SimCfnIamManagedPolicyCreator {
|
|
6
7
|
iam;
|
|
8
|
+
attacher;
|
|
7
9
|
constructor(properties) {
|
|
8
10
|
this.iam = properties.iam;
|
|
11
|
+
this.attacher = new SimCfnIamManagedPolicyAttacher({ iam: properties.iam });
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* Create a simulated Managed Policy from an AWS::IAM::ManagedPolicy Resource.
|
|
12
15
|
*/
|
|
13
16
|
async create(resource, properties) {
|
|
17
|
+
const roleNames = this.attacher.roleNames(resource, properties);
|
|
14
18
|
const policyName = this.managedPolicyName(resource, properties);
|
|
15
19
|
const path = this.path(resource, properties);
|
|
16
20
|
const description = this.description(resource, properties);
|
|
@@ -25,6 +29,7 @@ export class SimCfnIamManagedPolicyCreator {
|
|
|
25
29
|
});
|
|
26
30
|
const policy = this.iam.policies.get(policyCreation.Policy.Arn);
|
|
27
31
|
assertDefined(policy, `Sim IAM Managed Policy ${policyCreation.Policy.Arn} after CloudFormation creation`);
|
|
32
|
+
await this.attacher.attach(policy.arn, roleNames);
|
|
28
33
|
return policy;
|
|
29
34
|
}
|
|
30
35
|
managedPolicyName(resource, properties) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-iam-managed-policy-creator.js","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAMvE;;GAEG;AACH,MAAM,OAAO,6BAA6B;IACvB,GAAG,CAAS;
|
|
1
|
+
{"version":3,"file":"sim-cfn-iam-managed-policy-creator.js","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAMvE;;GAEG;AACH,M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C5B,OAAO,cAAc,KAAK,QAAQ;YAClC,cAAc,KAAK,IAAI;YACvB,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAC7B,CAAC;YACD,MAAM,IAAI,SAAS,CACjB,mCAAmC,QAAQ,CAAC,SAAS,oCAAoC,CAC1F,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -5,35 +5,26 @@ interface SimCfnIamPolicyCreatorProperties {
|
|
|
5
5
|
readonly iam: SimIam;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Creates simulated IAM inline
|
|
9
|
-
*
|
|
8
|
+
* Creates simulated IAM inline policies from AWS::IAM::Policy CloudFormation
|
|
9
|
+
* Resources.
|
|
10
10
|
*
|
|
11
11
|
* AWS::IAM::Policy is an inline policy put onto the referenced principals,
|
|
12
|
-
* which is how CDK grants such as bucket.grantRead(fn) attach permissions to
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* returns undefined and Ref resolution
|
|
12
|
+
* which is how CDK grants such as bucket.grantRead(fn) attach permissions to a
|
|
13
|
+
* function's execution role, and bucket.grantRead(user) to a user (the
|
|
14
|
+
* "DefaultPolicy" resource). Roles and Users are simulated. The policy has no
|
|
15
|
+
* standalone stored resource, so creation returns undefined and Ref resolution
|
|
16
|
+
* uses the default adapter.
|
|
16
17
|
*/
|
|
17
18
|
export declare class SimCfnIamPolicyCreator {
|
|
18
19
|
private readonly iam;
|
|
20
|
+
private readonly propsParser;
|
|
19
21
|
constructor(properties: SimCfnIamPolicyCreatorProperties);
|
|
20
22
|
/**
|
|
21
|
-
* Put the inline policy onto each referenced Role.
|
|
23
|
+
* Put the inline policy onto each referenced Role and User.
|
|
22
24
|
*/
|
|
23
25
|
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord): Promise<undefined>;
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
/**
|
|
27
|
-
* The Role names the policy attaches to. Role Refs are resolved to Role
|
|
28
|
-
* names before creation, so entries arrive as plain strings.
|
|
29
|
-
*/
|
|
30
|
-
private roleNames;
|
|
31
|
-
/**
|
|
32
|
-
* IAM Users and Groups are not simulated as CloudFormation policy
|
|
33
|
-
* principals, and silently dropping a grant would be misleading, so their
|
|
34
|
-
* presence fails creation.
|
|
35
|
-
*/
|
|
36
|
-
private rejectUnsimulatedPrincipals;
|
|
26
|
+
private putRolePolicies;
|
|
27
|
+
private putUserPolicies;
|
|
37
28
|
}
|
|
38
29
|
export {};
|
|
39
30
|
//# sourceMappingURL=sim-cfn-iam-policy-creator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-iam-policy-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/policy/sim-cfn-iam-policy-creator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-iam-policy-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/iam/cfn/policy/sim-cfn-iam-policy-creator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM/C,UAAU,gCAAgC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyC;IAErE,YAAY,UAAU,EAAE,gCAAgC,EAEvD;IAED;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,SAAS,CAAC,CASpB;YAEa,eAAe;YAgBf,eAAe;CAe9B"}
|
|
@@ -1,81 +1,49 @@
|
|
|
1
|
+
import { SimCfnIamPolicyPropertiesParser, } from "./sim-cfn-iam-policy-properties-parser.js";
|
|
1
2
|
/**
|
|
2
|
-
* Creates simulated IAM inline
|
|
3
|
-
*
|
|
3
|
+
* Creates simulated IAM inline policies from AWS::IAM::Policy CloudFormation
|
|
4
|
+
* Resources.
|
|
4
5
|
*
|
|
5
6
|
* AWS::IAM::Policy is an inline policy put onto the referenced principals,
|
|
6
|
-
* which is how CDK grants such as bucket.grantRead(fn) attach permissions to
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* returns undefined and Ref resolution
|
|
7
|
+
* which is how CDK grants such as bucket.grantRead(fn) attach permissions to a
|
|
8
|
+
* function's execution role, and bucket.grantRead(user) to a user (the
|
|
9
|
+
* "DefaultPolicy" resource). Roles and Users are simulated. The policy has no
|
|
10
|
+
* standalone stored resource, so creation returns undefined and Ref resolution
|
|
11
|
+
* uses the default adapter.
|
|
10
12
|
*/
|
|
11
13
|
export class SimCfnIamPolicyCreator {
|
|
12
14
|
iam;
|
|
15
|
+
propsParser = new SimCfnIamPolicyPropertiesParser();
|
|
13
16
|
constructor(properties) {
|
|
14
17
|
this.iam = properties.iam;
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
|
-
* Put the inline policy onto each referenced Role.
|
|
20
|
+
* Put the inline policy onto each referenced Role and User.
|
|
18
21
|
*/
|
|
19
22
|
async create(resource, properties) {
|
|
20
|
-
this.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const policyProperties = this.propsParser.parse(resource, properties);
|
|
24
|
+
await Promise.all([
|
|
25
|
+
this.putRolePolicies(policyProperties),
|
|
26
|
+
this.putUserPolicies(policyProperties),
|
|
27
|
+
]);
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
async putRolePolicies(policyProperties) {
|
|
31
|
+
await Promise.all(policyProperties.roleNames.map(async (roleName) => this.iam.putRolePolicy({
|
|
25
32
|
input: {
|
|
26
33
|
RoleName: roleName,
|
|
27
|
-
PolicyName: policyName,
|
|
28
|
-
PolicyDocument: policyDocument,
|
|
34
|
+
PolicyName: policyProperties.policyName,
|
|
35
|
+
PolicyDocument: policyProperties.policyDocument,
|
|
29
36
|
},
|
|
30
37
|
})));
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
policyName(resource, properties) {
|
|
34
|
-
const policyName = properties["PolicyName"];
|
|
35
|
-
if (typeof policyName !== "string") {
|
|
36
|
-
throw new TypeError(`Invalid AWS::IAM::Policy ${resource.logicalId}: PolicyName must be a string`);
|
|
37
|
-
}
|
|
38
|
-
return policyName;
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
return JSON.stringify(policyDocument);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* The Role names the policy attaches to. Role Refs are resolved to Role
|
|
52
|
-
* names before creation, so entries arrive as plain strings.
|
|
53
|
-
*/
|
|
54
|
-
roleNames(resource, properties) {
|
|
55
|
-
const roles = properties["Roles"];
|
|
56
|
-
if (!Array.isArray(roles) || roles.length === 0) {
|
|
57
|
-
throw new TypeError(`Invalid AWS::IAM::Policy ${resource.logicalId}: Roles must be a non-empty array`);
|
|
58
|
-
}
|
|
59
|
-
return roles.map((roleName) => {
|
|
60
|
-
if (typeof roleName !== "string") {
|
|
61
|
-
throw new TypeError(`Invalid AWS::IAM::Policy ${resource.logicalId}: Roles entries must be strings`);
|
|
62
|
-
}
|
|
63
|
-
return roleName;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* IAM Users and Groups are not simulated as CloudFormation policy
|
|
68
|
-
* principals, and silently dropping a grant would be misleading, so their
|
|
69
|
-
* presence fails creation.
|
|
70
|
-
*/
|
|
71
|
-
rejectUnsimulatedPrincipals(resource, properties) {
|
|
72
|
-
for (const principalProperty of ["Users", "Groups"]) {
|
|
73
|
-
// oxlint-disable-next-line security/detect-object-injection -- fixed property names.
|
|
74
|
-
if (properties[principalProperty] !== undefined) {
|
|
75
|
-
throw new TypeError(`Invalid AWS::IAM::Policy ${resource.logicalId}: ` +
|
|
76
|
-
`${principalProperty} are not simulated`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
39
|
+
async putUserPolicies(policyProperties) {
|
|
40
|
+
await Promise.all(policyProperties.usernames.map(async (username) => this.iam.putUserPolicy({
|
|
41
|
+
input: {
|
|
42
|
+
UserName: username,
|
|
43
|
+
PolicyName: policyProperties.policyName,
|
|
44
|
+
PolicyDocument: policyProperties.policyDocument,
|
|
45
|
+
},
|
|
46
|
+
})));
|
|
79
47
|
}
|
|
80
48
|
}
|
|
81
49
|
//# sourceMappingURL=sim-cfn-iam-policy-creator.js.map
|