@continuous-excellence/ze-great-dashboard-aws 0.11.0 → 0.12.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/README.md CHANGED
@@ -21,12 +21,12 @@ AWS to try it.
21
21
 
22
22
  The included deployment works out of the box with public GitHub repositories and HTTP endpoints
23
23
  that do not require credentials. For private GitHub sources, `SecretReference` is the ARN of one
24
- consumer-owned Secrets Manager JSON map (for example, `{"GITHUB_TOKEN":"github_pat_…"}`). The
25
- runtime resolves configured `token_env` names only at Lambda cold start and never exposes token
26
- values to the browser, API responses, logs, CloudFormation parameters, or Lambda environment.
27
- This is the one added runtime dependency: AWS's Secrets Manager client supplies IAM-authenticated
28
- `GetSecretValue` support in the bundled Lambda, at the cost of its bundled SDK code and a single
29
- cold-start request when private sources are configured.
24
+ consumer-owned Secrets Manager JSON map or Parameter Store `SecureString` (for example,
25
+ `{"GITHUB_TOKEN":"github_pat_…"}`). The runtime resolves configured `token_env` names only at
26
+ Lambda cold start and never exposes token values to the browser, API responses, logs,
27
+ CloudFormation parameters, or Lambda environment. The two added AWS SDK clients provide
28
+ IAM-authenticated `GetSecretValue` and decrypted `GetParameter` support in the bundled Lambda, at
29
+ the cost of their bundled code and one cold-start request when private sources are configured.
30
30
 
31
31
  ## Deployment map
32
32
 
@@ -14,7 +14,7 @@ Parameters:
14
14
  RuntimeSecretArn:
15
15
  Type: String
16
16
  Default: ''
17
- Description: Optional explicitly configured Secrets Manager secret ARN
17
+ Description: Optional explicitly configured Secrets Manager secret or Parameter Store SecureString ARN
18
18
  ArtifactKmsKeyArn:
19
19
  Type: String
20
20
  Default: ''
@@ -97,15 +97,33 @@ Resources:
97
97
  Condition: { StringEquals: { 'iam:PassedToService': lambda.amazonaws.com } }
98
98
  - !If
99
99
  - HasRuntimeSecret
100
- - Sid: ReadConfiguredRuntimeSecret
100
+ - Sid: ReadConfiguredRuntimeCredentials
101
101
  Effect: Allow
102
102
  Action: [secretsmanager:DescribeSecret, secretsmanager:GetSecretValue]
103
103
  Resource: !Ref RuntimeSecretArn
104
104
  - !Ref AWS::NoValue
105
+ - !If
106
+ - HasRuntimeSecret
107
+ - Sid: ReadConfiguredRuntimeParameter
108
+ Effect: Allow
109
+ Action: ssm:GetParameter
110
+ Resource: !Ref RuntimeSecretArn
111
+ - !Ref AWS::NoValue
112
+ - !If
113
+ - HasRuntimeSecret
114
+ - Sid: DecryptConfiguredRuntimeParameter
115
+ Effect: Allow
116
+ Action: kms:Decrypt
117
+ Resource: '*'
118
+ Condition:
119
+ StringEquals:
120
+ 'kms:ViaService': !Sub 'ssm.${AWS::Region}.amazonaws.com'
121
+ 'kms:EncryptionContext:PARAMETER_ARN': !Ref RuntimeSecretArn
122
+ - !Ref AWS::NoValue
105
123
 
106
124
  Outputs:
107
125
  BootstrapContractVersion: { Value: '1' }
108
- BootstrapTemplateRevision: { Value: '1.1' }
126
+ BootstrapTemplateRevision: { Value: '1.2' }
109
127
  ArtifactBucketName: { Value: !Ref ArtifactBucket }
110
128
  ArtifactBucketArn: { Value: !GetAtt ArtifactBucket.Arn }
111
129
  CloudFormationExecutionRoleArn: { Value: !GetAtt CloudFormationExecutionRole.Arn }
package/dist/cli.js CHANGED
@@ -820,7 +820,7 @@ async function assembleRelease(input) {
820
820
  const board = await validateBoardConfig(input.boardConfigPath);
821
821
  if (board.usesCredentials && !input.secretReference)
822
822
  throw new Error(
823
- "Board config uses token_env; SecretReference must name the Secrets Manager credential-map ARN"
823
+ "Board config uses token_env; SecretReference must name a Secrets Manager credential-map or Parameter Store SecureString ARN"
824
824
  );
825
825
  const outputDir = resolve(input.outputDir);
826
826
  await mkdir(outputDir, { recursive: true });
package/dist/index.js CHANGED
@@ -807,7 +807,7 @@ async function assembleRelease(input) {
807
807
  const board = await validateBoardConfig(input.boardConfigPath);
808
808
  if (board.usesCredentials && !input.secretReference)
809
809
  throw new Error(
810
- "Board config uses token_env; SecretReference must name the Secrets Manager credential-map ARN"
810
+ "Board config uses token_env; SecretReference must name a Secrets Manager credential-map or Parameter Store SecureString ARN"
811
811
  );
812
812
  const outputDir = resolve(input.outputDir);
813
813
  await mkdir(outputDir, { recursive: true });