@empire-builder-kit/nx 1.0.0-rc.31 → 1.0.0-rc.33
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/package.json +7 -3
- package/src/aws/identity.js +1 -1
- package/src/aws/identity.js.map +1 -1
- package/src/aws-authority/stage-authority.d.ts +2 -0
- package/src/aws-authority/stage-authority.js +152 -20
- package/src/aws-authority/stage-authority.js.map +1 -1
- package/src/cli/main.d.ts +2 -0
- package/src/cli/main.js +11 -0
- package/src/cli/main.js.map +1 -1
- package/src/developer-agent/model.d.ts +1 -1
- package/src/developer-agent/operation-registry.js +25 -3
- package/src/developer-agent/operation-registry.js.map +1 -1
- package/src/developer-agent/planning.js +9 -4
- package/src/developer-agent/planning.js.map +1 -1
- package/src/developer-agent/validation.js +5 -1
- package/src/developer-agent/validation.js.map +1 -1
- package/src/developer-agent/workspace-inspection.js +11 -2
- package/src/developer-agent/workspace-inspection.js.map +1 -1
- package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +1 -0
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js +4 -2
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +1 -1
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/github-bootstrap/schema.json +7 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +2 -0
- package/src/executors/infrastructure-plan/infrastructure-plan.js +18 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
- package/src/executors/local-deploy/local-deploy.d.ts +11 -0
- package/src/executors/local-deploy/local-deploy.js +62 -1
- package/src/executors/local-deploy/local-deploy.js.map +1 -1
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +2 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +2 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
- package/src/executors/secret-initialize/secret-initialize.d.ts +4 -0
- package/src/executors/secret-initialize/secret-initialize.js +71 -3
- package/src/executors/secret-initialize/secret-initialize.js.map +1 -1
- package/src/executors/secret-metadata/secret-metadata.d.ts +2 -0
- package/src/executors/secret-metadata/secret-metadata.js +14 -0
- package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +4 -0
- package/src/executors/sst-lifecycle/run-sst-command.js +21 -2
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
- package/src/foundation/index.d.ts +1 -0
- package/src/foundation/index.js +8 -0
- package/src/foundation/index.js.map +1 -1
- package/src/foundation/private-smoke-access.d.ts +23 -0
- package/src/foundation/private-smoke-access.js +127 -0
- package/src/foundation/private-smoke-access.js.map +1 -0
- package/src/foundation/private-smoke-admission.d.ts +43 -0
- package/src/foundation/private-smoke-admission.js +158 -0
- package/src/foundation/private-smoke-admission.js.map +1 -0
- package/src/foundation/private-smoke-control-plane.d.ts +18 -0
- package/src/foundation/private-smoke-control-plane.js +173 -0
- package/src/foundation/private-smoke-control-plane.js.map +1 -0
- package/src/foundation/provision-logical-database.js +2 -0
- package/src/foundation/provision-logical-database.js.map +1 -1
- package/src/generators/preset/dependency-overrides.d.ts +8 -0
- package/src/generators/preset/dependency-overrides.js +55 -0
- package/src/generators/preset/dependency-overrides.js.map +1 -0
- package/src/generators/preset/generator.js +6 -1
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +3 -0
- package/src/generators/preset/schema.json +5 -5
- package/src/generators/preset/tool-versions.d.ts +2 -0
- package/src/generators/preset/tool-versions.js +3 -1
- package/src/generators/preset/tool-versions.js.map +1 -1
- package/src/generators/preset/workspace-files-developer-agent.js +19 -6
- package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
- package/src/generators/preset/workspace-files-performance-load.js +21 -12
- package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
- package/src/generators/preset/workspace-files-stage-authority.d.ts +2 -0
- package/src/generators/preset/workspace-files-stage-authority.js +264 -60
- package/src/generators/preset/workspace-files-stage-authority.js.map +1 -1
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +8 -1
- package/src/generators/preset/workspace-files-thin-deploy.js +162 -36
- package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -1
- package/src/generators/preset/workspace-files-thin-docs.js +44 -10
- package/src/generators/preset/workspace-files-thin-docs.js.map +1 -1
- package/src/generators/preset/workspace-files.d.ts +2 -0
- package/src/generators/preset/workspace-files.js +128 -496
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +149 -19
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/repository-policy/schema.d.ts +2 -0
- package/src/generators/repository-policy/schema.json +12 -2
- package/src/generators/repository-policy/tree-policy.d.ts +3 -0
- package/src/generators/repository-policy/tree-policy.js +25 -0
- package/src/generators/repository-policy/tree-policy.js.map +1 -0
- package/src/generators/slice/built-in-plan-async-work-files.js +41 -0
- package/src/generators/slice/built-in-plan-async-work-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +2 -0
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-background-work-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-background-work-files.js +89 -0
- package/src/generators/slice/built-in-plan-background-work-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +19 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +21 -3
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +20 -4
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +20 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +10 -9
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-operations-files.js +30 -12
- package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-performance-files.js +60 -0
- package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.js +13 -0
- package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +20 -0
- package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
- package/src/generators/slice/built-in-plan.js +3 -0
- package/src/generators/slice/built-in-plan.js.map +1 -1
- package/src/generators/slice/slice.js +3 -3
- package/src/generators/slice/slice.js.map +1 -1
- package/src/generators/upgrade/upgrade.js +41 -37
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/generators/workload/performance-registration.js +4 -8
- package/src/generators/workload/performance-registration.js.map +1 -1
- package/src/generators/workload/workload.js +1 -1
- package/src/git-policy/github-bootstrap.d.ts +10 -2
- package/src/git-policy/github-bootstrap.js +109 -13
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/local-dev/tls.js +5 -1
- package/src/local-dev/tls.js.map +1 -1
- package/src/performance/model.d.ts +1 -1
- package/src/repository-policy/capacity-migration.d.ts +3 -0
- package/src/repository-policy/capacity-migration.js +21 -0
- package/src/repository-policy/capacity-migration.js.map +1 -0
- package/src/repository-policy/foundation-profile.js +10 -0
- package/src/repository-policy/foundation-profile.js.map +1 -1
- package/src/repository-policy/policy.d.ts +17 -2
- package/src/repository-policy/policy.js +231 -12
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/repository-policy-v1.json +47 -3
- package/src/secrets/adapters.d.ts +2 -1
- package/src/secrets/adapters.js +12 -2
- package/src/secrets/adapters.js.map +1 -1
- package/src/supply-chain/generated-container-release-command.js +41 -18
- package/src/supply-chain/generated-container-release-command.js.map +1 -1
- package/src/supply-chain/generated-files.js +11 -0
- package/src/supply-chain/generated-files.js.map +1 -1
- package/src/supply-chain/generated-scanner-command.js +1 -1
- package/src/supply-chain/scanner.js +3 -0
- package/src/supply-chain/scanner.js.map +1 -1
- package/src/workspace-deployment/identity.d.ts +3 -0
- package/src/workspace-deployment/identity.js +22 -0
- package/src/workspace-deployment/identity.js.map +1 -0
- package/src/workspace-deployment/index.d.ts +3 -0
- package/src/workspace-deployment/index.js +7 -0
- package/src/workspace-deployment/index.js.map +1 -0
- package/src/workspace-deployment/migration-evidence.d.ts +29 -0
- package/src/workspace-deployment/migration-evidence.js +83 -0
- package/src/workspace-deployment/migration-evidence.js.map +1 -0
- package/src/workspace-deployment/migration.d.ts +27 -0
- package/src/workspace-deployment/migration.js +109 -0
- package/src/workspace-deployment/migration.js.map +1 -0
- package/src/workspace-deployment/ownership.d.ts +81 -0
- package/src/workspace-deployment/ownership.js +381 -0
- package/src/workspace-deployment/ownership.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empire-builder-kit/nx",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.33",
|
|
4
4
|
"description": "Nx generators, executors, and Blueprint contracts for Empire Builder Kit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
"types": "./src/workload-roles/index.d.ts",
|
|
104
104
|
"default": "./src/workload-roles/index.js"
|
|
105
105
|
},
|
|
106
|
+
"./workspace-deployment": {
|
|
107
|
+
"types": "./src/workspace-deployment/index.d.ts",
|
|
108
|
+
"default": "./src/workspace-deployment/index.js"
|
|
109
|
+
},
|
|
106
110
|
"./schemas/blueprint-v1.json": "./src/schemas/blueprint-v1.json",
|
|
107
111
|
"./schemas/aggregate-count-evidence-v1.json": "./src/schemas/aggregate-count-evidence-v1.json",
|
|
108
112
|
"./schemas/blueprint-input-schema-v1.json": "./src/schemas/blueprint-input-schema-v1.json",
|
|
@@ -126,7 +130,7 @@
|
|
|
126
130
|
"provenance": false
|
|
127
131
|
},
|
|
128
132
|
"dependencies": {
|
|
129
|
-
"@empire-builder-kit/runtime": "1.0.0-rc.
|
|
133
|
+
"@empire-builder-kit/runtime": "1.0.0-rc.33",
|
|
130
134
|
"@aws-sdk/client-cloudfront": "^3.700.0",
|
|
131
135
|
"@aws-sdk/client-cloudwatch": "^3.700.0",
|
|
132
136
|
"@aws-sdk/client-cloudwatch-logs": "^3.700.0",
|
|
@@ -157,5 +161,5 @@
|
|
|
157
161
|
"engines": {
|
|
158
162
|
"node": ">=22.13.0"
|
|
159
163
|
},
|
|
160
|
-
"gitHead": "
|
|
164
|
+
"gitHead": "98e000230d1affdd188a64aa2cdcd30075a270b4"
|
|
161
165
|
}
|
package/src/aws/identity.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.canonicalStsEndpoint = canonicalStsEndpoint;
|
|
|
5
5
|
exports.matchesExpectedAssumedRoleArn = matchesExpectedAssumedRoleArn;
|
|
6
6
|
const IAM_ROLE_ARN = /^arn:([^:]+):iam::(\d{12}):role\/(.+)$/u;
|
|
7
7
|
const STS_ASSUMED_ROLE_ARN = /^arn:([^:]+):sts::(\d{12}):assumed-role\/(.+)\/([^/]+)$/u;
|
|
8
|
-
const AWS_REGION = /^[a-z]{2}(?:-gov)?-[a-z]
|
|
8
|
+
const AWS_REGION = /^[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-\d$/u;
|
|
9
9
|
/** Bind security-sensitive AWS SDK reads to the canonical regional service
|
|
10
10
|
* endpoint rather than an ambient or shared-config endpoint override. */
|
|
11
11
|
function canonicalAwsRegionalEndpoint(service, region) {
|
package/src/aws/identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../../packages/nx/src/aws/identity.ts"],"names":[],"mappings":";;AAUA,oEAYC;AAID,oDAEC;AAOD,sEAgBC;AAnDD,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAC/D,MAAM,oBAAoB,GACxB,0DAA0D,CAAC;AAC7D,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../../packages/nx/src/aws/identity.ts"],"names":[],"mappings":";;AAUA,oEAYC;AAID,oDAEC;AAOD,sEAgBC;AAnDD,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAC/D,MAAM,oBAAoB,GACxB,0DAA0D,CAAC;AAC7D,MAAM,UAAU,GAAG,4CAA4C,CAAC;AAKhE;yEACyE;AACzE,SAAgB,4BAA4B,CAC1C,OAAoC,EACpC,MAAc;IAEd,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,GAAG,OAAO,CAAC,WAAW,EAAE,6CAA6C,CACtE,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;QAC7B,CAAC,CAAC,WAAW,OAAO,IAAI,MAAM,mBAAmB;QACjD,CAAC,CAAC,WAAW,OAAO,IAAI,MAAM,gBAAgB,CAAC;AACnD,CAAC;AAED;yDACyD;AACzD,SAAgB,oBAAoB,CAAC,MAAc;IACjD,OAAO,4BAA4B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAC3C,eAAuB,EACvB,SAAiB,EACjB,eAAuB;IAEvB,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACvC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,CACL,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;QACzB,QAAQ,CAAC,CAAC,CAAC,KAAK,eAAe;QAC/B,MAAM,CAAC,CAAC,CAAC,KAAK,eAAe;QAC7B,gBAAgB,KAAK,SAAS;QAC9B,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,CAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -5,6 +5,7 @@ export declare const STAGE_AUTHORITY_DEPLOYMENT_POLICY_KINDS: readonly ["read",
|
|
|
5
5
|
export declare const STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_LIMIT = 6144;
|
|
6
6
|
export declare const STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_HEADROOM = 200;
|
|
7
7
|
export declare const STAGE_AUTHORITY_TEMPLATE_BODY_BYTE_LIMIT = 51200;
|
|
8
|
+
export declare const STAGE_AUTHORITY_BOUND_TEMPLATE_BODY_MINIMUM_HEADROOM = 1024;
|
|
8
9
|
export type StageAuthorityStage = (typeof STAGE_AUTHORITY_STAGES)[number];
|
|
9
10
|
export type StageAuthorityPartition = (typeof STAGE_AUTHORITY_PARTITIONS)[number];
|
|
10
11
|
export type StageAuthorityDeploymentPolicyKind = (typeof STAGE_AUTHORITY_DEPLOYMENT_POLICY_KINDS)[number];
|
|
@@ -226,6 +227,7 @@ export declare const STAGE_AUTHORITY_SERVICE_LINKED_ROLES: readonly (Readonly<{
|
|
|
226
227
|
export declare function createStageAuthorityIdentity(input: Pick<StageAuthorityInput, 'accountId' | 'partition' | 'region' | 'stage'>): StageAuthorityIdentity;
|
|
227
228
|
export declare function canonicalStageAuthorityTemplate(template: Readonly<Record<string, unknown>>): string;
|
|
228
229
|
export declare function digestStageAuthorityTemplate(template: Readonly<Record<string, unknown>>): string;
|
|
230
|
+
export declare function assertBoundStageAuthorityTemplateFitsBodyLimit(template: Readonly<Record<string, unknown>>): number;
|
|
229
231
|
export declare function createStageAuthorityPlan(input: StageAuthorityInput): StageAuthorityPlan;
|
|
230
232
|
export declare function createStageIamBoundaryTransformContract(input: Pick<StageAuthorityInput, 'accountId' | 'partition' | 'stage'>): StageIamBoundaryTransformContract;
|
|
231
233
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.STAGE_AUTHORITY_SERVICE_LINKED_ROLES = exports.STAGE_AUTHORITY_UNSUPPORTED_WORKFLOW_EXECUTION_ACTIONS = exports.STAGE_AUTHORITY_NON_DEPLOYMENT_ACCOUNT_AND_DATA_ACTIONS = exports.STAGE_AUTHORITY_UNREVIEWED_PERMISSION_MANAGEMENT_ACTION_PATTERNS = exports.STAGE_AUTHORITY_REVIEWED_PERMISSION_MANAGEMENT_ACTIONS = exports.STAGE_AUTHORITY_S3_BUCKET_POLICY_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_KNOWN_STAGE_MUTATION_ACTIONS = void 0;
|
|
3
|
+
exports.STAGE_AUTHORITY_CROSS_STAGE_DESTRUCTIVE_ACTIONS = exports.STAGE_AUTHORITY_CROSS_ACCOUNT_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_CROSS_ACCOUNT_EC2_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_SST_417_EXTERNAL_AMI_OWNERS_BY_PARTITION = exports.STAGE_AUTHORITY_SCOPE_GUARD_MUTATION_FAMILIES = exports.STAGE_AUTHORITY_WORKLOAD_IDENTITY_POLICY_ACTIONS = exports.STAGE_AUTHORITY_APPROVED_AWS_MANAGED_POLICIES = exports.STAGE_RUNTIME_REGIONAL_SERVICE_FAMILIES = exports.STAGE_AUTHORITY_LOGS_MUTATION_FAMILIES = exports.STAGE_AUTHORITY_REGIONAL_MUTATION_FAMILIES = exports.STAGE_RUNTIME_GLOBAL_ACTIONS = exports.STAGE_RUNTIME_REGIONAL_ACTIONS = exports.STAGE_AUTHORITY_ACCOUNT_SCOPED_GLOBAL_WRITE_ACTIONS = exports.STAGE_AUTHORITY_GLOBAL_WRITE_ACTIONS = exports.STAGE_AUTHORITY_UNSUPPORTED_REPLICATION_AND_TOPOLOGY_ACTIONS = exports.STAGE_AUTHORITY_WAF_EDGE_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_S3_REGIONAL_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_UNSCOPED_CLOUDFRONT_CREATE_ACTIONS = exports.STAGE_AUTHORITY_REGIONAL_WRITE_ACTIONS = exports.STAGE_AUTHORITY_LAMBDA_INFRASTRUCTURE_ACTIONS = exports.STAGE_AUTHORITY_KMS_INFRASTRUCTURE_ACTIONS = exports.STAGE_AUTHORITY_EC2_INFRASTRUCTURE_ACTIONS = exports.STAGE_AUTHORITY_BACKUP_INFRASTRUCTURE_ACTIONS = exports.STAGE_AUTHORITY_BROAD_REGIONAL_SERVICE_ACTIONS = exports.STAGE_AUTHORITY_EDGE_OBSERVABILITY_READ_ACTIONS = exports.STAGE_AUTHORITY_GLOBAL_READ_ACTIONS = exports.STAGE_AUTHORITY_REGIONAL_READ_ACTIONS = exports.STAGE_AUTHORITY_COST_ANOMALY_WRITE_ACTIONS = exports.STAGE_AUTHORITY_COST_ANOMALY_RESOURCE_WRITE_ACTIONS = exports.STAGE_AUTHORITY_COST_ANOMALY_CREATE_ACTIONS = exports.STAGE_AUTHORITY_COST_ANOMALY_READ_ACTIONS = exports.STAGE_AUTHORITY_KMS_ROTATION_ACTIONS = exports.STAGE_AUTHORITY_RDS_EVENT_SUBSCRIPTION_SOURCE_ACTIONS = exports.STAGE_AUTHORITY_BUDGET_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_EDGE_WAF_LOG_DELIVERY_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_EDGE_WAF_LOG_GROUP_ACTIONS = exports.STAGE_AUTHORITY_WAF_LOGGING_ACTIONS = exports.STAGE_AUTHORITY_CLOUDFRONT_INVALIDATION_ACTIONS = exports.STAGE_AUTHORITY_LAMBDA_DEPLOYMENT_INVOKE_ACTIONS = exports.STAGE_AUTHORITY_EVENT_ARCHIVE_RESOURCE_ACTIONS = exports.STAGE_AUTHORITY_EVENT_ARCHIVE_CREATE_ACTIONS = exports.STAGE_AUTHORITY_CLOUDFORMATION_LIFECYCLE_ACTIONS = exports.STAGE_AUTHORITY_BOUND_TEMPLATE_BODY_MINIMUM_HEADROOM = exports.STAGE_AUTHORITY_TEMPLATE_BODY_BYTE_LIMIT = exports.STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_HEADROOM = exports.STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_LIMIT = exports.STAGE_AUTHORITY_DEPLOYMENT_POLICY_KINDS = exports.STAGE_AUTHORITY_PARTITIONS = exports.STAGE_AUTHORITY_STAGES = exports.STAGE_AUTHORITY_SCHEMA_VERSION = void 0;
|
|
4
|
+
exports.STAGE_AUTHORITY_SERVICE_LINKED_ROLES = exports.STAGE_AUTHORITY_UNSUPPORTED_WORKFLOW_EXECUTION_ACTIONS = exports.STAGE_AUTHORITY_NON_DEPLOYMENT_ACCOUNT_AND_DATA_ACTIONS = exports.STAGE_AUTHORITY_UNREVIEWED_PERMISSION_MANAGEMENT_ACTION_PATTERNS = exports.STAGE_AUTHORITY_REVIEWED_PERMISSION_MANAGEMENT_ACTIONS = exports.STAGE_AUTHORITY_S3_BUCKET_POLICY_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_KNOWN_STAGE_MUTATION_ACTIONS = exports.STAGE_AUTHORITY_UNTAGGED_DESTRUCTIVE_ACTIONS = void 0;
|
|
5
5
|
exports.createStageAuthorityIdentity = createStageAuthorityIdentity;
|
|
6
6
|
exports.canonicalStageAuthorityTemplate = canonicalStageAuthorityTemplate;
|
|
7
7
|
exports.digestStageAuthorityTemplate = digestStageAuthorityTemplate;
|
|
8
|
+
exports.assertBoundStageAuthorityTemplateFitsBodyLimit = assertBoundStageAuthorityTemplateFitsBodyLimit;
|
|
8
9
|
exports.createStageAuthorityPlan = createStageAuthorityPlan;
|
|
9
10
|
exports.createStageIamBoundaryTransformContract = createStageIamBoundaryTransformContract;
|
|
10
11
|
exports.installStageIamBoundaryTransforms = installStageIamBoundaryTransforms;
|
|
@@ -33,13 +34,14 @@ exports.STAGE_AUTHORITY_DEPLOYMENT_POLICY_KINDS = [
|
|
|
33
34
|
exports.STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_LIMIT = 6_144;
|
|
34
35
|
exports.STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_HEADROOM = 200;
|
|
35
36
|
exports.STAGE_AUTHORITY_TEMPLATE_BODY_BYTE_LIMIT = 51_200;
|
|
37
|
+
exports.STAGE_AUTHORITY_BOUND_TEMPLATE_BODY_MINIMUM_HEADROOM = 1_024;
|
|
36
38
|
const STAGE_AUTHORITY_MAX_AWS_PRINCIPALS = 16;
|
|
37
39
|
const STAGE_AUTHORITY_MAX_AWS_PRINCIPAL_ARN_BYTES = 2_048;
|
|
38
40
|
const ACCOUNT_ID = /^\d{12}$/u;
|
|
39
41
|
const REGION = /^(?:(?:af|ap|ca|cn|eu|il|me|mx|sa|us)(?:-(?:gov|iso|isob|isoe|isof))?|eusc-[a-z]{2})-[a-z]+-\d$/u;
|
|
40
42
|
const AWS_PRINCIPAL_ARN = /^arn:(aws|aws-cn|aws-us-gov):iam::(\d{12}):role\/[A-Za-z0-9+=,.@_/-]+$/u;
|
|
41
43
|
const GITHUB_OIDC_PROVIDER_ARN = /^arn:(aws|aws-cn|aws-us-gov):iam::(\d{12}):oidc-provider\/token[.]actions[.]githubusercontent[.]com$/u;
|
|
42
|
-
const GITHUB_SUBJECT = /^repo:
|
|
44
|
+
const GITHUB_SUBJECT = /^repo:[A-Za-z0-9_.-]+@[1-9][0-9]{0,19}\/[A-Za-z0-9_.-]+@[1-9][0-9]{0,19}:environment:(development|staging|production)$/u;
|
|
43
45
|
/** Native lifecycle required by the generated machine-authorization nested
|
|
44
46
|
* stack. Recovery-only and stack-policy mutation APIs remain ungranted. */
|
|
45
47
|
exports.STAGE_AUTHORITY_CLOUDFORMATION_LIFECYCLE_ACTIONS = Object.freeze([
|
|
@@ -922,10 +924,13 @@ exports.STAGE_AUTHORITY_NON_DEPLOYMENT_ACCOUNT_AND_DATA_ACTIONS = Object.freeze(
|
|
|
922
924
|
const SECRET_BATCH_VALUE_READ_ACTIONS = Object.freeze([
|
|
923
925
|
'secretsmanager:BatchGetSecretValue',
|
|
924
926
|
]);
|
|
925
|
-
const GENERATED_FOUNDATION_DATABASE_VALUE_ACTIONS = Object.freeze([
|
|
926
|
-
|
|
927
|
-
'secretsmanager:PutSecretValue',
|
|
927
|
+
const GENERATED_FOUNDATION_DATABASE_VALUE_ACTIONS = Object.freeze(['secretsmanager:GetSecretValue', 'secretsmanager:PutSecretValue'].sort(compareStrings));
|
|
928
|
+
const STAGE_SECRET_CONTAINER_METADATA_UPDATE_ACTIONS = Object.freeze([
|
|
928
929
|
'secretsmanager:UpdateSecret',
|
|
930
|
+
]);
|
|
931
|
+
const GENERATED_FOUNDATION_DATABASE_RECONCILIATION_ACTIONS = Object.freeze([
|
|
932
|
+
...GENERATED_FOUNDATION_DATABASE_VALUE_ACTIONS,
|
|
933
|
+
...STAGE_SECRET_CONTAINER_METADATA_UPDATE_ACTIONS,
|
|
929
934
|
].sort(compareStrings));
|
|
930
935
|
const SSM_HISTORY_AND_RECURSIVE_VALUE_READ_ACTIONS = Object.freeze(['ssm:GetParameterHistory', 'ssm:GetParametersByPath'].sort(compareStrings));
|
|
931
936
|
const WORKFLOW_EXECUTION_MUTATION_ACTIONS = Object.freeze([
|
|
@@ -1013,6 +1018,46 @@ function omitPolicyStatementSids(document) {
|
|
|
1013
1018
|
}),
|
|
1014
1019
|
};
|
|
1015
1020
|
}
|
|
1021
|
+
function replaceExactTemplateString(value, expected, replacement) {
|
|
1022
|
+
if (value === expected)
|
|
1023
|
+
return replacement;
|
|
1024
|
+
if (Array.isArray(value)) {
|
|
1025
|
+
return value.map((entry) => replaceExactTemplateString(entry, expected, replacement));
|
|
1026
|
+
}
|
|
1027
|
+
if (!value || typeof value !== 'object')
|
|
1028
|
+
return value;
|
|
1029
|
+
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [
|
|
1030
|
+
key,
|
|
1031
|
+
replaceExactTemplateString(entry, expected, replacement),
|
|
1032
|
+
]));
|
|
1033
|
+
}
|
|
1034
|
+
function compactExactTemplatePolicyStrings(documents, values) {
|
|
1035
|
+
const constants = {};
|
|
1036
|
+
const replacements = new Map();
|
|
1037
|
+
for (const value of [...new Set(values)].sort(compareStrings)) {
|
|
1038
|
+
const key = `A${replacements.size}`;
|
|
1039
|
+
const replacement = Object.freeze({
|
|
1040
|
+
'Fn::FindInMap': Object.freeze(['A', 'V', key]),
|
|
1041
|
+
});
|
|
1042
|
+
constants[key] = value;
|
|
1043
|
+
replacements.set(value, replacement);
|
|
1044
|
+
}
|
|
1045
|
+
if (replacements.size === 0)
|
|
1046
|
+
return Object.freeze({ documents });
|
|
1047
|
+
const compactedDocuments = Object.fromEntries(Object.entries(documents).map(([logicalId, document]) => [
|
|
1048
|
+
logicalId,
|
|
1049
|
+
[...replacements.entries()].reduce((current, [arn, replacement]) => replaceExactTemplateString(current, arn, replacement), document),
|
|
1050
|
+
]));
|
|
1051
|
+
return Object.freeze({
|
|
1052
|
+
documents: Object.freeze(compactedDocuments),
|
|
1053
|
+
// These short, template-private identifiers avoid repeating long exact
|
|
1054
|
+
// ARNs in policy documents. Fn::FindInMap resolves to the original literal
|
|
1055
|
+
// before IAM sees the policy; the executable policy model stays literal.
|
|
1056
|
+
mappings: Object.freeze({
|
|
1057
|
+
A: Object.freeze({ V: Object.freeze(constants) }),
|
|
1058
|
+
}),
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1016
1061
|
function statement(input) {
|
|
1017
1062
|
if ((input.Resource === undefined) === (input.NotResource === undefined)) {
|
|
1018
1063
|
throw new Error('Stage authority statements require exactly one Resource or NotResource scope.');
|
|
@@ -1293,22 +1338,43 @@ function deploymentPolicy(options) {
|
|
|
1293
1338
|
`arn:${options.partition}:sqs:${options.region}:${options.accountId}:*-${options.stage}-*`,
|
|
1294
1339
|
];
|
|
1295
1340
|
const stageReadableSsmValueResources = [
|
|
1341
|
+
`arn:${options.partition}:ssm:${options.region}:${options.accountId}:parameter/ebk/${options.stage}/workspace-owner`,
|
|
1296
1342
|
`arn:${options.partition}:ssm:${options.region}:${options.accountId}:parameter/ebk/${options.stage}/foundation/*`,
|
|
1297
1343
|
`arn:${options.partition}:ssm:${options.region}:${options.accountId}:parameter/sst/bootstrap`,
|
|
1298
1344
|
`arn:${options.partition}:ssm:${options.region}:${options.accountId}:parameter/sst/passphrase/*/${options.stage}`,
|
|
1299
1345
|
`arn:${options.partition}:ssm:${options.region}:${options.accountId}:parameter/sst/vpc/vpc-*/private-key-value`,
|
|
1300
1346
|
].sort(compareStrings);
|
|
1347
|
+
const immutableWorkspaceOwnerResources = [
|
|
1348
|
+
'development',
|
|
1349
|
+
'production',
|
|
1350
|
+
'staging',
|
|
1351
|
+
]
|
|
1352
|
+
.map((stage) => `arn:${options.partition}:ssm:${options.region}:${options.accountId}:parameter/ebk/${stage}/workspace-owner`)
|
|
1353
|
+
.sort(compareStrings);
|
|
1301
1354
|
// SST 4.17.1 models the generated Aurora credential as a managed
|
|
1302
|
-
// SecretVersion. The pinned AWS provider needs PutSecretValue to create it
|
|
1303
|
-
// GetSecretValue to reconcile its AWSCURRENT version during removal
|
|
1304
|
-
//
|
|
1305
|
-
//
|
|
1306
|
-
//
|
|
1307
|
-
// operator/generated paths and every other secret value remain explicitly
|
|
1308
|
-
// outside this exception.
|
|
1355
|
+
// SecretVersion. The pinned AWS provider needs PutSecretValue to create it
|
|
1356
|
+
// and GetSecretValue to reconcile its AWSCURRENT version during removal.
|
|
1357
|
+
// Keep those value operations bound to the one Foundation-owned
|
|
1358
|
+
// physical-name and stage-tag contract; operator/generated paths and every
|
|
1359
|
+
// other secret value remain explicitly outside this exception.
|
|
1309
1360
|
const generatedFoundationDatabaseCredentialResources = [
|
|
1310
1361
|
`arn:${options.partition}:secretsmanager:${options.region}:${options.accountId}:secret:foundation-${options.stage}-FoundationDatabaseProxySecret-*`,
|
|
1311
1362
|
];
|
|
1363
|
+
// Native providers reconcile an EBK-owned Secret container through
|
|
1364
|
+
// UpdateSecret regardless of whether it holds a generated database
|
|
1365
|
+
// credential, a machine credential, or operator-supplied material. Bind that
|
|
1366
|
+
// metadata lifecycle to the stable stage-owned namespace instead of
|
|
1367
|
+
// enumerating today's generated container purposes. UpdateSecret can itself
|
|
1368
|
+
// carry plaintext, so reviewed generated source, temporary deployer
|
|
1369
|
+
// credentials, and CloudTrail remain the honest controls. GetSecretValue and
|
|
1370
|
+
// PutSecretValue stay excluded from every Slice container.
|
|
1371
|
+
const stageOwnedSecretContainerResources = [
|
|
1372
|
+
`arn:${options.partition}:secretsmanager:${options.region}:${options.accountId}:secret:ebk/${options.stage}/*`,
|
|
1373
|
+
];
|
|
1374
|
+
const stageSecretContainerMetadataUpdateResources = [
|
|
1375
|
+
...generatedFoundationDatabaseCredentialResources,
|
|
1376
|
+
...stageOwnedSecretContainerResources,
|
|
1377
|
+
].sort(compareStrings);
|
|
1312
1378
|
const machineAuthorizationStackResources = [
|
|
1313
1379
|
`arn:${options.partition}:cloudformation:${options.region}:${options.accountId}:stack/*MachineAuthorization*/*`,
|
|
1314
1380
|
];
|
|
@@ -1606,7 +1672,7 @@ function deploymentPolicy(options) {
|
|
|
1606
1672
|
Sid: 'DenySecretValueAccessOutsideGeneratedFoundationDatabase',
|
|
1607
1673
|
}),
|
|
1608
1674
|
statement({
|
|
1609
|
-
Action:
|
|
1675
|
+
Action: GENERATED_FOUNDATION_DATABASE_RECONCILIATION_ACTIONS,
|
|
1610
1676
|
Condition: {
|
|
1611
1677
|
StringNotEquals: {
|
|
1612
1678
|
'aws:ResourceTag/ebk:stage': options.stage,
|
|
@@ -1616,6 +1682,12 @@ function deploymentPolicy(options) {
|
|
|
1616
1682
|
Resource: generatedFoundationDatabaseCredentialResources,
|
|
1617
1683
|
Sid: 'DenyGeneratedDatabaseValueAccessWithWrongStageTag',
|
|
1618
1684
|
}),
|
|
1685
|
+
statement({
|
|
1686
|
+
Action: STAGE_SECRET_CONTAINER_METADATA_UPDATE_ACTIONS,
|
|
1687
|
+
Effect: 'Deny',
|
|
1688
|
+
NotResource: stageSecretContainerMetadataUpdateResources,
|
|
1689
|
+
Sid: 'DenySecretMetadataUpdateOutsideStageContainers',
|
|
1690
|
+
}),
|
|
1619
1691
|
statement({
|
|
1620
1692
|
Action: ['ssm:GetParameter', 'ssm:GetParameters'],
|
|
1621
1693
|
Effect: 'Deny',
|
|
@@ -1628,6 +1700,20 @@ function deploymentPolicy(options) {
|
|
|
1628
1700
|
Resource: ['*'],
|
|
1629
1701
|
Sid: 'DenySsmHistoryAndRecursiveValueReads',
|
|
1630
1702
|
}),
|
|
1703
|
+
statement({
|
|
1704
|
+
Action: [
|
|
1705
|
+
'ssm:AddTagsToResource',
|
|
1706
|
+
'ssm:DeleteParameter',
|
|
1707
|
+
'ssm:DeleteParameters',
|
|
1708
|
+
'ssm:LabelParameterVersion',
|
|
1709
|
+
'ssm:PutParameter',
|
|
1710
|
+
'ssm:RemoveTagsFromResource',
|
|
1711
|
+
'ssm:UnlabelParameterVersion',
|
|
1712
|
+
],
|
|
1713
|
+
Effect: 'Deny',
|
|
1714
|
+
Resource: immutableWorkspaceOwnerResources,
|
|
1715
|
+
Sid: 'DenyOwnerMutation',
|
|
1716
|
+
}),
|
|
1631
1717
|
statement({
|
|
1632
1718
|
Action: exports.STAGE_AUTHORITY_NON_DEPLOYMENT_ACCOUNT_AND_DATA_ACTIONS,
|
|
1633
1719
|
Effect: 'Deny',
|
|
@@ -2494,6 +2580,7 @@ function deploymentPolicy(options) {
|
|
|
2494
2580
|
'DenyEdgeControlMutationOutsideEdgeRegion',
|
|
2495
2581
|
'DenyMutationOutsideStageRegion',
|
|
2496
2582
|
'DenyS3MutationOutsideStageRegion',
|
|
2583
|
+
'DenySecretMetadataUpdateOutsideStageContainers',
|
|
2497
2584
|
'DenyUnscopedWorkflowExecutionMutation',
|
|
2498
2585
|
'InvokeOnlyStageLambdaFunctions',
|
|
2499
2586
|
'MutateEdgeCertificates',
|
|
@@ -2554,6 +2641,7 @@ function deploymentPolicy(options) {
|
|
|
2554
2641
|
'InvalidateOnlyStageCloudFrontDistributions',
|
|
2555
2642
|
'MutateNamedFoundationEventArchive',
|
|
2556
2643
|
'MutateTaggedMachineAuthorizationStacks',
|
|
2644
|
+
'DenyOwnerMutation',
|
|
2557
2645
|
...(options.stage !== 'production'
|
|
2558
2646
|
? ['RetireOnlyTaggedNonProductionKmsKeys']
|
|
2559
2647
|
: []),
|
|
@@ -2618,6 +2706,7 @@ function deploymentPolicy(options) {
|
|
|
2618
2706
|
'DenyMutationOutsideStageRegion',
|
|
2619
2707
|
'DenyNonDeploymentControlOperations',
|
|
2620
2708
|
'DenyNonPrivateServiceDiscoveryNamespaces',
|
|
2709
|
+
'DenyOwnerMutation',
|
|
2621
2710
|
'DenyNonProductionDatabaseEventSubscriptionSourceMutation',
|
|
2622
2711
|
'DenyProductionCostScopeRemoval',
|
|
2623
2712
|
'DenyProductionCostScopeSubstitution',
|
|
@@ -2626,6 +2715,7 @@ function deploymentPolicy(options) {
|
|
|
2626
2715
|
'DenyRuntimeBoundaryRemoval',
|
|
2627
2716
|
'DenyRuntimeTrustPolicyMutation',
|
|
2628
2717
|
'DenySecretsManagerBatchValueReads',
|
|
2718
|
+
'DenySecretMetadataUpdateOutsideStageContainers',
|
|
2629
2719
|
'DenySecretValueAccessOutsideGeneratedFoundationDatabase',
|
|
2630
2720
|
'DenySsmHistoryAndRecursiveValueReads',
|
|
2631
2721
|
'DenyStageAccountBudgetStageTagRemoval',
|
|
@@ -2691,6 +2781,13 @@ function digestStageAuthorityTemplate(template) {
|
|
|
2691
2781
|
.update(canonicalStageAuthorityTemplate(template), 'utf8')
|
|
2692
2782
|
.digest('hex');
|
|
2693
2783
|
}
|
|
2784
|
+
function assertBoundStageAuthorityTemplateFitsBodyLimit(template) {
|
|
2785
|
+
const templateBytes = Buffer.byteLength(canonicalStageAuthorityTemplate(template), 'utf8');
|
|
2786
|
+
if (templateBytes > exports.STAGE_AUTHORITY_TEMPLATE_BODY_BYTE_LIMIT) {
|
|
2787
|
+
throw new Error(`Workspace-bound stage authority template has ${templateBytes} bytes; the direct CloudFormation TemplateBody limit is ${exports.STAGE_AUTHORITY_TEMPLATE_BODY_BYTE_LIMIT}.`);
|
|
2788
|
+
}
|
|
2789
|
+
return templateBytes;
|
|
2790
|
+
}
|
|
2694
2791
|
function createStageAuthorityPlan(input) {
|
|
2695
2792
|
const target = requireIdentity(input);
|
|
2696
2793
|
const identity = createStageAuthorityIdentity(target);
|
|
@@ -2712,6 +2809,33 @@ function createStageAuthorityPlan(input) {
|
|
|
2712
2809
|
region: target.region,
|
|
2713
2810
|
stage: target.stage,
|
|
2714
2811
|
});
|
|
2812
|
+
const renderedDeploymentPolicyDocuments = Object.fromEntries(deployment.map((entry) => {
|
|
2813
|
+
let document = replaceExactTemplateString(replaceExactTemplateString(omitPolicyStatementSids(entry.document), identity.boundaryArn, { Ref: 'StageRuntimeBoundary' }), identity.deploymentRoleArn, { 'Fn::GetAtt': ['StageDeploymentRole', 'Arn'] });
|
|
2814
|
+
if (entry.logicalId === 'StageDeploymentGlobalIamMutationPolicy') {
|
|
2815
|
+
for (const sibling of deployment) {
|
|
2816
|
+
if (sibling.logicalId === entry.logicalId)
|
|
2817
|
+
continue;
|
|
2818
|
+
document = replaceExactTemplateString(document, sibling.arn, {
|
|
2819
|
+
Ref: sibling.logicalId,
|
|
2820
|
+
});
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
return [entry.logicalId, document];
|
|
2824
|
+
}));
|
|
2825
|
+
const edgeRegion = edgeControlRegion(target.partition, target.region);
|
|
2826
|
+
const templatePolicyDocuments = compactExactTemplatePolicyStrings({
|
|
2827
|
+
...renderedDeploymentPolicyDocuments,
|
|
2828
|
+
StageRuntimeBoundary: omitPolicyStatementSids(boundary),
|
|
2829
|
+
}, [
|
|
2830
|
+
identity.workloadRoleArnPattern,
|
|
2831
|
+
`arn:${target.partition}:cloudformation:${target.region}:${target.accountId}:stack/*MachineAuthorization*/*`,
|
|
2832
|
+
`arn:${target.partition}:events:${target.region}:${target.accountId}:archive/ebk-${target.stage}-foundation-events`,
|
|
2833
|
+
`arn:${target.partition}:events:${target.region}:${target.accountId}:event-bus/foundation-${target.stage}-FoundationEventBusBus-*`,
|
|
2834
|
+
`arn:${target.partition}:lambda:${target.region}:${target.accountId}:function:*`,
|
|
2835
|
+
`arn:${target.partition}:logs:${edgeRegion}:${target.accountId}:log-group:aws-waf-logs-foundation-${target.stage}-FoundationRouter-*`,
|
|
2836
|
+
`arn:${target.partition}:secretsmanager:${target.region}:${target.accountId}:secret:foundation-${target.stage}-FoundationDatabaseProxySecret-*`,
|
|
2837
|
+
`arn:${target.partition}:states:${target.region}:${target.accountId}:execution:*:*`,
|
|
2838
|
+
]);
|
|
2715
2839
|
const deploymentPolicyResources = Object.fromEntries(deployment.map((entry) => [
|
|
2716
2840
|
entry.logicalId,
|
|
2717
2841
|
{
|
|
@@ -2723,7 +2847,12 @@ function createStageAuthorityPlan(input) {
|
|
|
2723
2847
|
// in the executable policy model while omitting them from the direct
|
|
2724
2848
|
// CloudFormation body so every supported partition retains bounded
|
|
2725
2849
|
// TemplateBody headroom without changing effective permissions.
|
|
2726
|
-
|
|
2850
|
+
// Ref on AWS::IAM::ManagedPolicy resolves to its exact ARN. Use the
|
|
2851
|
+
// runtime-boundary resource identity in rendered policy documents
|
|
2852
|
+
// instead of repeating its long partition/account/path ARN. The
|
|
2853
|
+
// executable policy model retains the literal ARN for simulation;
|
|
2854
|
+
// this is representation-only direct-TemplateBody compaction.
|
|
2855
|
+
PolicyDocument: templatePolicyDocuments.documents[entry.logicalId],
|
|
2727
2856
|
Roles: [{ Ref: 'StageDeploymentRole' }],
|
|
2728
2857
|
},
|
|
2729
2858
|
Type: 'AWS::IAM::ManagedPolicy',
|
|
@@ -2731,11 +2860,14 @@ function createStageAuthorityPlan(input) {
|
|
|
2731
2860
|
]));
|
|
2732
2861
|
const template = {
|
|
2733
2862
|
AWSTemplateFormatVersion: '2010-09-09',
|
|
2734
|
-
|
|
2735
|
-
|
|
2863
|
+
...(templatePolicyDocuments.mappings
|
|
2864
|
+
? { Mappings: templatePolicyDocuments.mappings }
|
|
2865
|
+
: {}),
|
|
2736
2866
|
Outputs: {
|
|
2737
|
-
DeploymentRoleArn: {
|
|
2738
|
-
|
|
2867
|
+
DeploymentRoleArn: {
|
|
2868
|
+
Value: { 'Fn::GetAtt': ['StageDeploymentRole', 'Arn'] },
|
|
2869
|
+
},
|
|
2870
|
+
RuntimeBoundaryArn: { Value: { Ref: 'StageRuntimeBoundary' } },
|
|
2739
2871
|
},
|
|
2740
2872
|
Resources: {
|
|
2741
2873
|
...deploymentPolicyResources,
|
|
@@ -2758,7 +2890,7 @@ function createStageAuthorityPlan(input) {
|
|
|
2758
2890
|
Description: `Stable maximum permissions for ${target.stage} workload roles.`,
|
|
2759
2891
|
ManagedPolicyName: identity.boundaryName,
|
|
2760
2892
|
Path: identity.boundaryPath,
|
|
2761
|
-
PolicyDocument:
|
|
2893
|
+
PolicyDocument: templatePolicyDocuments.documents['StageRuntimeBoundary'],
|
|
2762
2894
|
},
|
|
2763
2895
|
Type: 'AWS::IAM::ManagedPolicy',
|
|
2764
2896
|
},
|