@kensio/yulin 1.20.17 → 1.21.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.
Files changed (171) hide show
  1. package/dist/service/athena/engine/sim-athena-comparison-shims.d.ts +13 -0
  2. package/dist/service/athena/engine/sim-athena-comparison-shims.js +68 -0
  3. package/dist/service/athena/engine/sim-athena-shims.js +2 -0
  4. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js +8 -0
  5. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-orp-cfn.d.ts +24 -0
  6. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-orp-cfn.js +31 -0
  7. package/dist/service/cloudfront/behaviour/sim-cloud-front-behavior.d.ts +12 -1
  8. package/dist/service/cloudfront/cache/sim-cf-accept-encoding.d.ts +11 -0
  9. package/dist/service/cloudfront/cache/sim-cf-accept-encoding.js +27 -0
  10. package/dist/service/cloudfront/cache/sim-cf-cache-control.d.ts +28 -0
  11. package/dist/service/cloudfront/cache/sim-cf-cache-control.js +49 -0
  12. package/dist/service/cloudfront/cache/sim-cf-cache-entry-key-path.d.ts +11 -0
  13. package/dist/service/cloudfront/cache/sim-cf-cache-entry-key-path.js +22 -0
  14. package/dist/service/cloudfront/cache/sim-cf-cache-entry-key.d.ts +32 -0
  15. package/dist/service/cloudfront/cache/sim-cf-cache-entry-key.js +112 -0
  16. package/dist/service/cloudfront/cache/sim-cf-cache-status.d.ts +27 -0
  17. package/dist/service/cloudfront/cache/sim-cf-cache-status.js +53 -0
  18. package/dist/service/cloudfront/cache/sim-cf-cache-ttl.d.ts +28 -0
  19. package/dist/service/cloudfront/cache/sim-cf-cache-ttl.js +50 -0
  20. package/dist/service/cloudfront/cache/sim-cf-cacheable-request.d.ts +35 -0
  21. package/dist/service/cloudfront/cache/sim-cf-cacheable-request.js +32 -0
  22. package/dist/service/cloudfront/cache/sim-cf-distribution-cache.d.ts +57 -0
  23. package/dist/service/cloudfront/cache/sim-cf-distribution-cache.js +115 -0
  24. package/dist/service/cloudfront/cache/sim-cf-edge.d.ts +37 -0
  25. package/dist/service/cloudfront/cache/sim-cf-edge.js +34 -0
  26. package/dist/service/cloudfront/cache/sim-cf-error-cache-ttl.d.ts +36 -0
  27. package/dist/service/cloudfront/cache/sim-cf-error-cache-ttl.js +28 -0
  28. package/dist/service/cloudfront/cache/sim-cf-http-date.d.ts +15 -0
  29. package/dist/service/cloudfront/cache/sim-cf-http-date.js +40 -0
  30. package/dist/service/cloudfront/cache-policy/sim-cf-cache-key.d.ts +63 -0
  31. package/dist/service/cloudfront/cache-policy/sim-cf-cache-key.js +70 -0
  32. package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.d.ts +13 -3
  33. package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.js +31 -3
  34. package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.d.ts +8 -3
  35. package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.js +96 -12
  36. package/dist/service/cloudfront/cff/sim-cff-search-distribution.fixture.js +4 -0
  37. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.d.ts +9 -8
  38. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.js +40 -11
  39. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-key.d.ts +10 -0
  40. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-key.js +50 -0
  41. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-section.d.ts +28 -0
  42. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-section.js +29 -0
  43. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-behavior-policy-kinds.d.ts +16 -0
  44. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-behavior-policy-kinds.js +23 -0
  45. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-behavior-policies.d.ts +3 -2
  46. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-behavior-policies.js +3 -2
  47. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +6 -6
  48. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +6 -6
  49. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-policy-drops.js +8 -23
  50. package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-config.d.ts +28 -0
  51. package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-config.js +46 -0
  52. package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-creator.d.ts +24 -0
  53. package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-creator.js +32 -0
  54. package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-forwarding.d.ts +10 -0
  55. package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-forwarding.js +51 -0
  56. package/dist/service/cloudfront/cfn/policy/sim-cfn-cf-policy-section.d.ts +22 -0
  57. package/dist/service/cloudfront/cfn/policy/sim-cfn-cf-policy-section.js +54 -0
  58. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +1 -0
  59. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +12 -0
  60. package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +1 -0
  61. package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts +2 -0
  62. package/dist/service/cloudfront/command/invalidation/sim-cf-create-invalidation.d.ts +28 -0
  63. package/dist/service/cloudfront/command/invalidation/sim-cf-create-invalidation.js +59 -0
  64. package/dist/service/cloudfront/command/invalidation/sim-cf-get-invalidation.d.ts +19 -0
  65. package/dist/service/cloudfront/command/invalidation/sim-cf-get-invalidation.js +32 -0
  66. package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-access.d.ts +36 -0
  67. package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-access.js +45 -0
  68. package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-command.types.d.ts +80 -0
  69. package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-command.types.js +1 -0
  70. package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-commands.d.ts +39 -0
  71. package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-commands.js +35 -0
  72. package/dist/service/cloudfront/command/invalidation/sim-cf-list-invalidations.d.ts +23 -0
  73. package/dist/service/cloudfront/command/invalidation/sim-cf-list-invalidations.js +39 -0
  74. package/dist/service/cloudfront/command/update-distribution/update-distribution.handler.d.ts +2 -0
  75. package/dist/service/cloudfront/controller/content/sim-cf-content-stage.d.ts +51 -0
  76. package/dist/service/cloudfront/controller/content/sim-cf-content-stage.js +65 -0
  77. package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.d.ts +2 -3
  78. package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.js +4 -4
  79. package/dist/service/cloudfront/controller/error/sim-cf-custom-error-responder.d.ts +4 -0
  80. package/dist/service/cloudfront/controller/error/sim-cf-custom-error-responder.js +12 -8
  81. package/dist/service/cloudfront/controller/origin/sim-cf-origin-stage.d.ts +2 -2
  82. package/dist/service/cloudfront/controller/origin/sim-cf-origin-stage.js +2 -2
  83. package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.d.ts +6 -6
  84. package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js +35 -20
  85. package/dist/service/cloudfront/custom-error/sim-cloudfront-custom-error-response.d.ts +23 -5
  86. package/dist/service/cloudfront/custom-error/sim-cloudfront-custom-error-response.js +8 -0
  87. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-origin-request-policy.d.ts +18 -0
  88. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-origin-request-policy.js +30 -0
  89. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.d.ts +7 -5
  90. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.js +8 -5
  91. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js +4 -1
  92. package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.d.ts +2 -0
  93. package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.js +6 -2
  94. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-custom-error-configurator.d.ts +13 -3
  95. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-custom-error-configurator.js +27 -6
  96. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.d.ts +3 -1
  97. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.js +4 -1
  98. package/dist/service/cloudfront/distribution/sim-cf-distribution-configuration-state.d.ts +5 -3
  99. package/dist/service/cloudfront/distribution/sim-cf-distribution-reconfigurer.d.ts +2 -0
  100. package/dist/service/cloudfront/distribution/sim-cf-distribution-view.js +1 -1
  101. package/dist/service/cloudfront/distribution/sim-cloudfront-distribution.d.ts +25 -2
  102. package/dist/service/cloudfront/distribution/sim-cloudfront-distribution.js +24 -0
  103. package/dist/service/cloudfront/error/sim-cf-invalidation.error.d.ts +22 -0
  104. package/dist/service/cloudfront/error/sim-cf-invalidation.error.js +26 -0
  105. package/dist/service/cloudfront/error/sim-cf-origin-request-policy.error.d.ts +22 -0
  106. package/dist/service/cloudfront/error/sim-cf-origin-request-policy.error.js +26 -0
  107. package/dist/service/cloudfront/index.d.ts +2 -0
  108. package/dist/service/cloudfront/index.js +1 -0
  109. package/dist/service/cloudfront/invalidation/sim-cf-invalidation-path.d.ts +22 -0
  110. package/dist/service/cloudfront/invalidation/sim-cf-invalidation-path.js +32 -0
  111. package/dist/service/cloudfront/invalidation/sim-cf-invalidation-view.d.ts +43 -0
  112. package/dist/service/cloudfront/invalidation/sim-cf-invalidation-view.js +33 -0
  113. package/dist/service/cloudfront/invalidation/sim-cf-invalidation.d.ts +55 -0
  114. package/dist/service/cloudfront/invalidation/sim-cf-invalidation.js +56 -0
  115. package/dist/service/cloudfront/invalidation/sim-cf-invalidations.d.ts +41 -0
  116. package/dist/service/cloudfront/invalidation/sim-cf-invalidations.js +58 -0
  117. package/dist/service/cloudfront/invalidation/sim-cf-repeated-invalidation.d.ts +15 -0
  118. package/dist/service/cloudfront/invalidation/sim-cf-repeated-invalidation.js +23 -0
  119. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-forwarding.d.ts +19 -0
  120. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-forwarding.js +116 -0
  121. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +15 -5
  122. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js +13 -8
  123. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.js +8 -5
  124. package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.d.ts +13 -0
  125. package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js +8 -0
  126. package/dist/service/cloudfront/origin-request-policy/sim-cf-behavior-forwarded.d.ts +24 -0
  127. package/dist/service/cloudfront/origin-request-policy/sim-cf-behavior-forwarded.js +21 -0
  128. package/dist/service/cloudfront/origin-request-policy/sim-cf-forwarded-to-origin.d.ts +57 -0
  129. package/dist/service/cloudfront/origin-request-policy/sim-cf-forwarded-to-origin.js +129 -0
  130. package/dist/service/cloudfront/origin-request-policy/sim-cf-managed-origin-request-policies.d.ts +30 -0
  131. package/dist/service/cloudfront/origin-request-policy/sim-cf-managed-origin-request-policies.js +121 -0
  132. package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-forwarding.d.ts +56 -0
  133. package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-forwarding.js +67 -0
  134. package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy-registry.d.ts +38 -0
  135. package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy-registry.js +51 -0
  136. package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy.d.ts +32 -0
  137. package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy.js +30 -0
  138. package/dist/service/cloudfront/registry/sim-cloud-front-registry.d.ts +25 -0
  139. package/dist/service/cloudfront/registry/sim-cloud-front-registry.js +23 -0
  140. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js +12 -0
  141. package/dist/service/cloudfront/sim-cloudfront-caching.d.ts +31 -0
  142. package/dist/service/cloudfront/sim-cloudfront-caching.js +38 -0
  143. package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +12 -0
  144. package/dist/service/cloudfront/sim-cloudfront-commands.js +12 -0
  145. package/dist/service/cloudfront/sim-cloudfront-distributions.d.ts +21 -0
  146. package/dist/service/cloudfront/sim-cloudfront-distributions.js +23 -0
  147. package/dist/service/cloudfront/sim-cloudfront-origin-access-controls.d.ts +30 -0
  148. package/dist/service/cloudfront/sim-cloudfront-origin-access-controls.js +35 -0
  149. package/dist/service/cloudfront/sim-cloudfront-policies.d.ts +22 -5
  150. package/dist/service/cloudfront/sim-cloudfront-policies.js +27 -5
  151. package/dist/service/cloudfront/sim-cloudfront.d.ts +15 -31
  152. package/dist/service/cloudfront/sim-cloudfront.js +23 -41
  153. package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.d.ts +6 -5
  154. package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.js +6 -5
  155. package/dist/service/iam/authorize/context/sim-iam-auth-z-input.d.ts +6 -4
  156. package/dist/service/kms/command/sim-kms-request-options.d.ts +9 -5
  157. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts +6 -4
  158. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js +13 -4
  159. package/dist/service/logs/delivery/cloudfront/sim-logs-vended-log-delivery.d.ts +23 -0
  160. package/dist/service/logs/delivery/cloudfront/sim-logs-vended-log-delivery.js +28 -0
  161. package/dist/service/ssm/parameter/sim-ssm-kms-crypto.d.ts +7 -10
  162. package/dist/service/ssm/parameter/sim-ssm-parameter-kms.d.ts +10 -11
  163. package/dist/service/ssm/parameter/sim-ssm-parameter-kms.js +11 -16
  164. package/docs/services/athena/README.md +7 -1
  165. package/docs/services/cloudformation/README.md +2 -1
  166. package/docs/services/cloudfront/README.md +903 -25
  167. package/docs/services/ecs/README.md +5 -2
  168. package/docs/services/kms/README.md +9 -5
  169. package/docs/services/logs/README.md +6 -0
  170. package/docs/services/ssm/README.md +26 -33
  171. package/package.json +1 -1
@@ -706,8 +706,11 @@ real ECS accepts for a parameter in the task's own region. A Secrets Manager ARN
706
706
  key, a version stage and a version id after the secret id, in the form
707
707
  `...:secret:orders/db-AbCdEf:password::` that a CDK construct given a field writes. The key selects
708
708
  one field of a secret holding a JSON object. A `SecureString` parameter is decrypted, as it is for a
709
- real task. The decryption is made with the execution role's own permissions, and that role needs
710
- `kms:Decrypt` on top of `ssm:GetParameter`.
709
+ real task. The decryption is made with the execution role's own permissions. Under the `aws/ssm`
710
+ managed key that role needs `ssm:GetParameter` and nothing on KMS, since the key's policy allows the
711
+ decryption itself (see
712
+ [Sim SSM](../ssm/README.md#the-awsssm-managed-key-allows-the-read-itself)). Under a customer managed
713
+ key it needs `kms:Decrypt` as well.
711
714
 
712
715
  A secret that cannot be resolved stops the task before any container runs, with a
713
716
  `ResourceInitializationError` reason naming the variable:
@@ -357,11 +357,15 @@ That is why a role holding `kms:Decrypt` on such a key cannot use it by calling
357
357
  `SecureString` parameters. Code calling simulated KMS directly sets it with the `viaService` request
358
358
  option, naming the service on its own (`ssm`), since the region is the key's.
359
359
 
360
- A service passing on the caller's own KMS permissions sets `withCallerPermissions` alongside it.
361
- What the policy above admits is the service a request came through. A request carrying this option
362
- is allowed only where IAM allows the caller the KMS action too, and a key policy naming the caller
363
- allows it on its own. Sim SSM sets the option when it decrypts a `SecureString`. A role holding
364
- `ssm:GetParameter` and no `kms:Decrypt` is refused the decrypted value.
360
+ The first statement above allows the request outright, so nothing further is asked of the caller. A
361
+ role holding `ssm:GetParameter` and nothing on KMS reads a decrypted `SecureString` under `aws/ssm`,
362
+ because Parameter Store supplies the `kms:ViaService` value the policy wants (see
363
+ [Sim SSM](../ssm/README.md#the-awsssm-managed-key-allows-the-read-itself)).
364
+
365
+ A service that passes the caller's own KMS permissions on rather than its own sets
366
+ `withCallerPermissions` alongside `viaService`. A request carrying that option is allowed only where
367
+ IAM allows the caller the KMS action too, and a key policy naming the caller still allows it on its
368
+ own. No simulated service sets it.
365
369
 
366
370
  ```typescript sim-kms-aws-managed-key
367
371
  /**
@@ -749,6 +749,12 @@ the three listing operations an SDK caller reaches, and a deployment goes near n
749
749
  CloudFormation execution Role therefore carries the same policy here that a real deploy of the
750
750
  template needs.
751
751
 
752
+ A delivery source over a CloudFront distribution takes one CloudFront permission on top of those.
753
+ CloudWatch Logs checks the caller for `cloudfront:AllowVendedLogDeliveryForResource` against the
754
+ distribution's ARN as the source is put, and a caller holding every `logs:` action and no CloudFront
755
+ permission is refused. A policy naming another distribution is refused the same way. A delivery
756
+ source over a resource of any other service asks for nothing outside `logs:`.
757
+
752
758
  ```typescript sim-logs-permissions
753
759
  /**
754
760
  * A simulated IAM policy allowing a Role to write one function's logs.
@@ -472,9 +472,10 @@ recorded the same way.
472
472
  references use, so a reference can sit inside a longer value and inside `Fn::Sub`.
473
473
 
474
474
  Decryption goes to simulated KMS under the key the parameter was written with, as the caller
475
- deploying the stack. A caller lacking `kms:Decrypt` on that key fails the resource with the
476
- `AccessDenied` a decrypting `GetParameter` raises (see
475
+ deploying the stack. A caller lacking `kms:Decrypt` on a customer managed key fails the resource with
476
+ the `AccessDenied` a decrypting `GetParameter` raises (see
477
477
  [A customer managed key needs its own permission](#a-customer-managed-key-needs-its-own-permission)).
478
+ A parameter under the `aws/ssm` managed key needs no KMS permission of the caller.
478
479
 
479
480
  CDK writes one of these from `SecretValue.ssmSecure`, from
480
481
  `ssm.StringParameter.fromSecureStringParameterAttributes` and from the deprecated
@@ -915,24 +916,27 @@ try {
915
916
  }
916
917
  ```
917
918
 
918
- ### The aws/ssm managed key needs kms:Decrypt too
919
+ ### The aws/ssm managed key allows the read itself
919
920
 
920
- A parameter naming no key is encrypted under the `aws/ssm` AWS managed key. Parameter Store supplies
921
- `kms:ViaService`, and that key's policy allows the account's principals to use it through Systems
922
- Manager. What the policy admits is whoever the request came from. Parameter Store decrypts with the
923
- caller's own permissions, and a decrypting read needs `kms:Decrypt` on top of `ssm:GetParameter`. A
924
- role holding the parameter permission alone reads the ciphertext and is refused when it asks for
925
- decryption, as it is in a real account.
921
+ A parameter naming no key is encrypted under the `aws/ssm` AWS managed key. That key's policy allows
922
+ the cryptographic actions to a wildcard principal under `kms:ViaService` and `kms:CallerAccount`
923
+ conditions, and Parameter Store satisfies both. A grant of that shape delegates nothing to IAM. A
924
+ role holding `ssm:GetParameter` and nothing on KMS reads the decrypted value, as it does in an
925
+ account, and withholding that access takes an explicit `Deny`.
926
926
 
927
- The managed key's id is unknown when a template is synthesized. A policy scopes the grant with a
928
- `kms:ViaService` condition naming `ssm.<region>.amazonaws.com`, and simulated IAM evaluates that
929
- condition against the region the parameter belongs to.
927
+ `GetParameters` and `GetParametersByPath` decrypt through the same path and on the same permission.
928
+ A `SecureString` write under the managed key asks for no KMS permission either.
930
929
 
931
- `GetParameters` and `GetParametersByPath` decrypt through the same path, and refuse the same way for
932
- a caller without the key permission.
930
+ A `kms:Decrypt` grant scoped with a `kms:ViaService` condition (the shape a stack writes when the
931
+ key is chosen after synthesis) still works, and it is what a customer managed key wants.
933
932
 
934
- The same role cannot take the ciphertext to KMS itself, because the managed key's policy applies
935
- only to a request that reached KMS through Systems Manager.
933
+ The key stays out of reach of anything calling KMS directly. The same role handed the stored
934
+ ciphertext cannot decrypt it through `Decrypt`, because the policy's `kms:ViaService` condition
935
+ matches only a request that arrived through Systems Manager. A caller in another account is refused
936
+ by the `kms:CallerAccount` condition.
937
+
938
+ An ECS task resolves a `secrets` entry through this path. An execution role holding
939
+ `ssm:GetParameter` alone reads a managed key `SecureString` into a container's environment.
936
940
 
937
941
  ```typescript sim-ssm-secure-string-managed-key
938
942
  /**
@@ -969,26 +973,14 @@ const role = await simAws.iam().createRole(
969
973
  }),
970
974
  );
971
975
 
972
- // The parameter, and the key through Systems Manager.
976
+ // The parameter, and nothing on KMS.
973
977
  await simAws.iam().putRolePolicy(
974
978
  new PutRolePolicyCommand({
975
979
  RoleName: "ConfigReader",
976
980
  PolicyName: "ReadDbPassword",
977
981
  PolicyDocument: JSON.stringify({
978
982
  Version: "2012-10-17",
979
- Statement: [
980
- { Effect: "Allow", Action: "ssm:GetParameter", Resource: "*" },
981
- {
982
- Effect: "Allow",
983
- Action: "kms:Decrypt",
984
- Resource: "*",
985
- Condition: {
986
- StringEquals: {
987
- "kms:ViaService": `ssm.${simAws.defaultRegionName}.amazonaws.com`,
988
- },
989
- },
990
- },
991
- ],
983
+ Statement: { Effect: "Allow", Action: "ssm:GetParameter", Resource: "*" },
992
984
  }),
993
985
  }),
994
986
  );
@@ -1052,9 +1044,10 @@ Current documented limitations:
1052
1044
  without complaint.
1053
1045
  - `KeyId` on a `String` or `StringList` parameter is refused, since nothing would encrypt a value
1054
1046
  stored in the clear.
1055
- - Writing a `SecureString` under the `aws/ssm` managed key asks the caller for no KMS permission,
1056
- where AWS documents `kms:Encrypt` for a standard tier write. A write under a customer managed key
1057
- does need it.
1047
+ - Reading and writing a `SecureString` under the `aws/ssm` managed key ask the caller for no KMS
1048
+ permission, which follows that key's policy and the Parameter Store setup page. AWS's SecureString
1049
+ encryption page documents `kms:Encrypt` and `kms:Decrypt` for either kind of key, and the two
1050
+ disagree. A parameter under a customer managed key does need them.
1058
1051
  - `DataType` other than `text` is refused. Real Parameter Store validates an `aws:ec2:image` value
1059
1052
  against EC2, which this simulation cannot do.
1060
1053
  - Filters are refused outright. `GetParametersByPath` refuses `ParameterFilters`, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kensio/yulin",
3
- "version": "1.20.17",
3
+ "version": "1.21.0",
4
4
  "description": "AWS system behaviour simulation for isolated unit testing",
5
5
  "repository": "https://github.com/KensioSoftware/yulin",
6
6
  "homepage": "https://yulinsim.dev/",