Class OperatorProvisioningPermissionMatrix
deploy:create target application's synthesized CloudFormation template
describes (VPC, EFS, ALB, ECS cluster/service/task definition).
This is a different layer than PermissionMatrix. PermissionMatrix
defines what a deployed app's own task role can do once it's running (pull its image,
read SSM params, put CloudWatch metrics). This class defines what Manager's own role
needs to bring that app's infrastructure into existence and tear it back down in the first
place — CloudFormation issues every one of these calls under Manager's identity, not the
deployed app's. A stack's own workload permissions being perfectly correct (which PermissionMatrix already ensures) says nothing about whether Manager was ever allowed to
create that stack's VPC/EFS/ALB/ECS resources at all.
Tiered by the same IAMProfile enum PermissionMatrix uses, not a parallel
concept — MINIMAL is read-only (inventory/troubleshooting, no condition since Describe- and
List-family actions don't accept a Tags parameter to condition on), STANDARD is full lifecycle
for the
single Fargate+ALB+EFS shape every catalog app in this platform actually deploys today, and
EXTENDED adds the NAT/EIP/flow-log surface a private-with-egress network topology needs.
ManagerOperatorIamSupport.deployStatements(SystemContext) currently bakes in EXTENDED unconditionally
for Manager's own task role, since there is no per-user AWS-level distinction yet — see the
design note below for where that's headed.
Future direction, not built yet: Manager already has a real, working per-user RBAC
policy catalog (ManagerPolicyCatalog, manager_user_policy) with a
deploy:create capability gating this exact feature today, and a real sts:AssumeRole
pathway (AssumeRoleOperations/StsAssumeRoleService) already built for
cross-account connections. The intended seam: instead of a deploy:create request
running directly under Manager's task role credentials, Manager assumes its own (or a
dedicated operator) role with a session policy scoped to the IAMProfile tier this
matrix says that request needs — so a Manager user without the deploy:create RBAC
capability can never reach AWS-level infrastructure-creation capability even if something
upstream misbehaves, because the session policy would never carry those actions to begin with.
This class is written so that seam only ever needs one source of truth on the AWS side — never
two independently-maintained action lists drifting apart.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<IAMProfile, List<String>> static final Map<IAMProfile, List<String>> ComplianceFactory/GuardDutyFactory/WafFactory-- deliberately its own dimension, not a fourthIAMProfiletier, since compliance mode is an independent boolean toggle onDeploymentConfig(complianceMode/awsConfigEnabled/guardDutyEnabled), orthogonal to which IAMProfile tier an app's own workload role runs under.static final Map<IAMProfile, List<String>> RdsFactory'sDatabaseInstance/ParameterGroup/SubnetGroupL2 constructs, plus the KMS key and Secrets Manager secret every encrypted instance provisions alongside it -- grouped together, not split into three separate maps, sinceRdsFactoryalways creates the three together for any app whoseDatabaseSpecrequests a database (there is no "RDS without its own secret and key" shape in this codebase to scope more narrowly than that).static final Map<IAMProfile, List<String>> FargateFactory'sCluster/FargateService/FargateTaskDefinitionL2 constructs -- registering and running the task definition, not the workload permissions the running task itself needs (that'sPermissionMatrix).static final Map<IAMProfile, List<String>> Flow logs and custom network ACLs -- not part of VpcFactory's default topology, only relevant for a compliance-driven or hardened network profile.static final Map<IAMProfile, List<String>> Manager creating the target app's ownAWS::Logs::LogGroupas part of its infrastructure -- separate fromPermissionMatrix.CORE_PERMISSIONS, which is what the deployed app's own task role needs to write into that log group at runtime.static final Map<IAMProfile, List<String>> VpcFactory'sVpcL2 construct — every underlying EC2 networking resource type it can synthesize depending on subnet configuration (VpcFactory always creates public+private-with-egress subnet pairs across 2 AZs for every app in this catalog, hence NAT/EIP/route-table actions live at STANDARD, not EXTENDED, despite the class javadoc's general EXTENDED-adds-NAT framing above -- seeEXTENDED_ONLY_VPC_PERMISSIONSfor what genuinely is EXTENDED-only: flow logs and custom network ACLs, neither of which VpcFactory enables by default). -
Method Summary
Modifier and TypeMethodDescriptiongetComputeAndDataPermissions(IAMProfile tier, boolean includeCompliance) SeegetNetworkPermissions(IAMProfile)-- the other half of the same split.getRequiredPermissions(IAMProfile, boolean)'s full action list, split roughly in half by measured JSON byte size rather than by category count --VPC_PERMISSIONS/ALB_PERMISSIONS/EFS_PERMISSIONS("network") on one side,ECS_PERMISSIONS/LOGS_PERMISSIONS/DATABASE_PERMISSIONS/COMPLIANCE_PERMISSIONS("compute/data") on the other.getRequiredPermissions(IAMProfile tier, boolean includeCompliance) All actions needed at or below the given tier, across every provisioning category, for a single flat action list -- mirrorsPermissionMatrix.getRequiredPermissions(TopologyType, RuntimeType, IAMProfile)' additive-tier shape (STANDARD includes MINIMAL, EXTENDED includes STANDARD).
-
Field Details
-
VPC_PERMISSIONS
VpcFactory'sVpcL2 construct — every underlying EC2 networking resource type it can synthesize depending on subnet configuration (VpcFactory always creates public+private-with-egress subnet pairs across 2 AZs for every app in this catalog, hence NAT/EIP/route-table actions live at STANDARD, not EXTENDED, despite the class javadoc's general EXTENDED-adds-NAT framing above -- seeEXTENDED_ONLY_VPC_PERMISSIONSfor what genuinely is EXTENDED-only: flow logs and custom network ACLs, neither of which VpcFactory enables by default). -
EXTENDED_ONLY_VPC_PERMISSIONS
-
EFS_PERMISSIONS
-
ALB_PERMISSIONS
-
ECS_PERMISSIONS
FargateFactory'sCluster/FargateService/FargateTaskDefinitionL2 constructs -- registering and running the task definition, not the workload permissions the running task itself needs (that'sPermissionMatrix). -
LOGS_PERMISSIONS
Manager creating the target app's ownAWS::Logs::LogGroupas part of its infrastructure -- separate fromPermissionMatrix.CORE_PERMISSIONS, which is what the deployed app's own task role needs to write into that log group at runtime. -
DATABASE_PERMISSIONS
RdsFactory'sDatabaseInstance/ParameterGroup/SubnetGroupL2 constructs, plus the KMS key and Secrets Manager secret every encrypted instance provisions alongside it -- grouped together, not split into three separate maps, sinceRdsFactoryalways creates the three together for any app whoseDatabaseSpecrequests a database (there is no "RDS without its own secret and key" shape in this codebase to scope more narrowly than that).kms:CreateKey's own tagging step fails with "UnauthorizedTaggingOperation" withoutkms:TagResourcegranted alongside it (seeManagerOperatorIamSupport'siamRoleCreatefor the same CloudFormation error-classification label on a different action -- it denotes any denied create-with-tags call, not a tag-condition mismatch specifically). -
COMPLIANCE_PERMISSIONS
ComplianceFactory/GuardDutyFactory/WafFactory-- deliberately its own dimension, not a fourthIAMProfiletier, since compliance mode is an independent boolean toggle onDeploymentConfig(complianceMode/awsConfigEnabled/guardDutyEnabled), orthogonal to which IAMProfile tier an app's own workload role runs under. AWS Config and GuardDuty are both account-level singletons, and enabling either for the very first time in an account requiresiam:CreateServiceLinkedRolefor that service's own service-linked role -- a step with no equivalent in the VPC/EFS/ALB/ECS categories above, easy to miss because it's only needed exactly once per account, not once per deployment.
-
-
Method Details
-
getRequiredPermissions
All actions needed at or below the given tier, across every provisioning category, for a single flat action list -- mirrorsPermissionMatrix.getRequiredPermissions(TopologyType, RuntimeType, IAMProfile)' additive-tier shape (STANDARD includes MINIMAL, EXTENDED includes STANDARD).includeCompliancepulls inCOMPLIANCE_PERMISSIONSat the same tier, kept as a separate parameter rather than a fourth tier value for the reason documented on that map. -
getNetworkPermissions
getRequiredPermissions(IAMProfile, boolean)'s full action list, split roughly in half by measured JSON byte size rather than by category count --VPC_PERMISSIONS/ALB_PERMISSIONS/EFS_PERMISSIONS("network") on one side,ECS_PERMISSIONS/LOGS_PERMISSIONS/DATABASE_PERMISSIONS/COMPLIANCE_PERMISSIONS("compute/data") on the other. Exists because of a hard AWS ceiling: an IAM role's combined inline-policy size across every inline policy document it carries is capped at 10,240 bytes total, not a separate budget per document -- this class's flat list (212 actions, ~6.3KB on its own) exceeds that cap alongside the role's other inline policies.ManagerOperatorIamSupportattaches each half as its own customer-managed policy instead of inline specifically to sidestep that combined-inline ceiling (a managed policy's size budget is independent of it), so the split point here only needs to keep each half comfortably under a managed policy's own (smaller, ~6,144-byte default) size limit, measured against the real synthesized byte counts per AWS service prefix. -
getComputeAndDataPermissions
SeegetNetworkPermissions(IAMProfile)-- the other half of the same split.
-