You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port the three IaCRole-ABCA policy JSON blobs from DEPLOYMENT_ROLES.md into typed TypeScript modules with semver and SHA256 hash generation. This is the heaviest review in the stack — IAM actions require careful line-by-line validation.
Deliverables
Create cdk/src/bootstrap/policies/infrastructure.ts — typed IAM policy document (CloudFormation, IAM, VPC, DNS Firewall)
Create cdk/src/bootstrap/policies/application.ts — typed IAM policy document (DynamoDB, Lambda, API Gateway, Cognito, WAFv2, EventBridge, Secrets Manager)
Parent
Sub-issue 2 of #120 (RFC: Least-privilege CDK bootstrap policies as code)
Branch strategy
feat/bootstrap-policies→ targetsfeat/bootstrap-adrEstimated review time: ~40 min
Summary
Port the three IaCRole-ABCA policy JSON blobs from
DEPLOYMENT_ROLES.mdinto typed TypeScript modules with semver and SHA256 hash generation. This is the heaviest review in the stack — IAM actions require careful line-by-line validation.Deliverables
cdk/src/bootstrap/policies/infrastructure.ts— typed IAM policy document (CloudFormation, IAM, VPC, DNS Firewall)cdk/src/bootstrap/policies/application.ts— typed IAM policy document (DynamoDB, Lambda, API Gateway, Cognito, WAFv2, EventBridge, Secrets Manager)cdk/src/bootstrap/policies/observability.ts— typed IAM policy document (Bedrock AgentCore, Guardrails, CloudWatch, X-Ray, S3, ECR, KMS, SSM, STS)cdk/src/bootstrap/policies/index.ts— barrel export, combines all three policiescdk/src/bootstrap/version.ts—BOOTSTRAP_VERSIONsemver constant,computeBootstrapHash()function (SHA256 of deterministically-sorted policy JSON)cdk/src/bootstrap/index.ts— barrel exportcdk/test/bootstrap/policies.test.ts:cdk/test/bootstrap/version.test.ts:cdk/bootstrap/policies/infrastructure.json,application.json,observability.json— rendered human-readable JSON for auditcdk/bootstrap/BOOTSTRAP_VERSIONandcdk/bootstrap/BOOTSTRAP_HASH— machine-readable filesKey design decisions
PolicyDocument/PolicyStatementclasses for type safety and CDK interopACCOUNT_IDandREGIONremain as substitution placeholders — resolved at bootstrap time via CF pseudo-parameters (AWS::AccountId,AWS::Region)JSON.stringify()of sorted, normalized policy output (keys sorted, no whitespace variance)Acceptance criteria
mise //cdk:compilepasses with new filesmise //cdk:test)DEPLOYMENT_ROLES.mdcontent (validates port correctness)