@@ -188,7 +188,7 @@ Resources:
188188 "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Maven-GPG-Keys-CI-xjAvTM",
189189 "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Maven-GPG-Keys-CI-Credentials-eBrSNB",
190190 "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Github/aws-crypto-tools-ci-bot-AGUB3U",
191- "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Sonatype-Team-Account-0tWvZm ",
191+ "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Sonatype-User-Token-zK61bM ",
192192 "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Maven-GPG-Keys-Release-haLIjZ",
193193 "arn:aws:secretsmanager:us-west-2:${AWS::AccountId}:secret:Maven-GPG-Keys-Release-Credentials-WgJanS"
194194 ],
@@ -214,7 +214,7 @@ Resources:
214214 "arn:aws:kms:*:658956600833:alias/*"
215215 ],
216216 "Action": [
217- "kms:Encrypt",
217+ "kms:Encrypt",
218218 "kms:Decrypt",
219219 "kms:GenerateDataKey"
220220 ]
@@ -308,25 +308,26 @@ Resources:
308308 S3ECReleaseTestKMSKeyPolicy :
309309 Type : ' AWS::IAM::ManagedPolicy'
310310 Properties :
311+ ManagedPolicyName : S3EC-Release-Test-KMS-Key-Policy
311312 PolicyDocument :
312313 Version : " 2012-10-17"
313314 Statement :
314315 - Effect : " Allow"
315316 Resource :
316- - Sub! "arn:aws:kms:*:${AWS::AccountId}:key/${S3ECReleaseTestingKMSKeyID}"
317- - Sub! "arn:aws:kms:*:${AWS::AccountId}:${S3ECReleaseKMSKeyAlias}"
317+ - !Sub " arn:aws:kms:*:${AWS::AccountId}:key/${S3ECReleaseTestingKMSKeyID}"
318+ - !Sub " arn:aws:kms:*:${AWS::AccountId}:${S3ECReleaseKMSKeyAlias}"
318319 Action :
319320 - " kms:Encrypt"
320321 - " kms:Decrypt"
321322 - " kms:GenerateDataKey"
322323 - " kms:GenerateDataKeyPair"
324+ # This effect may need to be commented out for a new deployment.
325+ # There is a relationship between the alternate role,
326+ # and the Codebuild service role.
327+ # By turning this into a 2-stage deployment, this simplifies things.
323328 - Effect : Allow
324329 Action : sts:AssumeRole
325- Resource :
326- Fn::GetAtt : [ S3ECReleaseTestRoleAlternate, Arn ]
327-
328-
329- ManagedPolicyName : S3EC-Release-Test-KMS-Key-Policy
330+ Resource : !Sub "arn:aws:iam::${AWS::AccountId}:role/service-role/S3EC-Release-test-role-alternate"
330331
331332 S3ECReleaseKMSKeyPolicyAlternate :
332333 Type : ' AWS::IAM::ManagedPolicy'
@@ -360,7 +361,7 @@ Resources:
360361 Statement :
361362 - Effect : " Allow"
362363 Principal :
363- Service : codebuild.amazonaws.com
364+ AWS : !GetAtt CodeBuildServiceRoleRelease.Arn
364365 Action :
365366 - " sts:AssumeRole"
366367 Description : >-
0 commit comments