Repository navigation
Closed
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
Parent
What to build
Settle the AWS facts the spec could not verify, before any template changes.
-
Quotas. Read the four vCPU quotas in
zeroae-code/us-east-1:- EC2 Spot (
L-34B43A08) - EC2 On-Demand standard (
L-1216C47A) - Fargate Spot (
L-36FBB829) - Fargate On-Demand (
L-3032A538)
The Fargate quotas default to 6, so request increases where a quota doesn't cover the default budgets (24 / 8 / 24 / 8 vCPUs) plus what other workloads use.
- EC2 Spot (
-
OIDC permissions. Find out which permission set can create what the image push needs: GitHub's IAM OIDC provider, a role trusted by it, and an ECR repo.
- Check the three ZAE permission sets the owner named:
ZAEFederation,ZAEKeyManagementandZAEPowerUserAccess. Onlyzeroae-code/ZAEPowerUserAccesshas a profile in the owner's AWS config today, so add profiles for the other two. - Also record each one's naming and permissions-boundary rules for roles, as the
PowerUserPB-*rule is recorded forAWSPowerUserAccess. - Check whether
zeroae-codealready has a provider fortoken.actions.githubusercontent.com.
- Check the three ZAE permission sets the owner named:
-
Prior art. For the OIDC setup, use zeroae/foresight's
infra/cloudformation/github-deploy-zae.json: it creates the provider only whenExistingOidcProviderArnis empty.
Acceptance criteria
- The four quota values and any increase requests (with case ids) are recorded on this ticket and in the runbook's "Measured numbers".
- For each ZAE permission set: whether it can create an OIDC provider, a role and an ECR repo, and its naming and boundary rules. Recorded on this ticket.
- Whether
zeroae-codealready has GitHub's OIDC provider, and its ARN if so. - A recommendation, recorded here, of which permission set deploys the stack from ticket "Image to ECR" on. The owner confirms it before that ticket starts.
- Read-only apart from the quota requests. Log in through
aws sso login --use-device-code, which the owner approves.
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity
sodre commentedon Nov 14, 2026
Gate passed (2026-11-13), with one recommendation for the owner to confirm. All checks were read-only, in
zeroae-code(733153035800) /us-east-1, on the live SSO session. Nothing was created. The only change outside this repo: profileszeroae-code/ZAEFederationandzeroae-code/ZAEKeyManagementwere added to the owner's~/.aws/config, in the same shape aszeroae-code/ZAEPowerUserAccess. All four permission sets are assigned to the account, and each profile'ssts get-caller-identityworks.Quotas: no increase needed
L-34B43A08L-1216C47AL-36FBB829L-3032A538The Fargate quotas were already raised to 140, not left at the default of 6. The peak is the
AWS/UsageResourceCountdaily maximum, and it includes this stack's own runners. The account has three other ECS clusters (load-test-load,securevector-dev,svdb-qps-fargate), with no tasks running today. Neither service has a quota request in its history, and no request was filed, so there are no case ids. The numbers are in the runbook's "Measured numbers" (branchticket/19-gate).GitHub's OIDC provider: it already exists
arn:aws:iam::733153035800:oidc-provider/token.actions.githubusercontent.com. Its client id issts.amazonaws.com, and it is taggedApplication=zae-limiter,Purpose=github-e2e.Caveat: another stack owns it. It is the resource
GitHubOIDCProviderof the CloudFormation stackzael-github-e2e, which CloudTrail shows was created 2026-11-07 underAWSAdministratorAccess. If that stack is ever deleted, the provider goes with it, and the ci-runner image push breaks. Pass this ARN asExistingOidcProviderArn. The owner may also want to retain that resource (DeletionPolicy: Retain) in zae-limiter's template.The three ZAE permission sets, plus
AWSPowerUserAccessI read each set's inline policy (
AwsSSOInlinePolicy) on itsAWSReservedSSO_*role, then confirmed it withiam simulate-principal-policyagainst that role, with theiam:PermissionsBoundarycontext key set.PowerUserPB-*with boundaryiam:UpdateAssumeRolePolicyZAEFederationoidc-provider/*(also SAML providers)ZAEKeyManagementZAEPowerUserAccessPowerUserAccessAWSPowerUserAccess(today's)PowerUserAccessNaming and boundary rules:
ZAEFederation: it can't create roles or policies at all, so it has no naming rule. It manages OIDC and SAML providers on any name, and reads IAM (iam:Get*,iam:List*).ZAEKeyManagement: it has no IAM write access. It manages KMS keys, aliases and key policies, and explicitly denies every use of a key (encrypt, decrypt, sign, data keys, grants).ZAEPowerUserAccess: roles, managed policies and instance profiles must be namedPowerUserPB*.iam:CreateRole,iam:PutRolePolicy,iam:AttachRolePolicy,iam:PutRolePermissionsBoundaryandiam:UpdateAssumeRolePolicyrequire a permissions boundary of eitherarn:aws:iam::aws:policy/PowerUserAccessorarn:aws:iam::<account>:policy/ZAEPowerUserBoundary. That second policy exists inzeroae-code(v1, no attachments). Removing a boundary is denied, and so is changing either boundary policy.iam:PassRoleis allowed onPowerUserPB*.AWSPowerUserAccess: the samePowerUserPB*names. The boundary must be exactlyPowerUserAccess. It also explicitly deniesiam:PutRolePermissionsBoundary, and it has noiam:UpdateAssumeRolePolicy.No one set can create all three things. That doesn't matter here, because the provider already exists.
Recommendation for #27: deploy with
zeroae-code/ZAEPowerUserAccessPowerUserPB-${stack}-image-push, with boundaryarn:aws:iam::aws:policy/PowerUserAccess, and the ECR repo with its lifecycle rule.iam:UpdateAssumeRolePolicy, whichAWSPowerUserAccesslacks. UnderAWSPowerUserAccess, the first deploy would work, but any later change to the role's trust (thesubpin, say) would fail.AWSPowerUserAccess: the same managedPowerUserAccess, plus the inline statements above. So the existing stack keeps deploying under it. Keep the existing boundary,PowerUserAccess, on every role; nothing needsZAEPowerUserBoundary.ExistingOidcProviderArn=arn:aws:iam::733153035800:oidc-provider/token.actions.githubusercontent.com. The stack then creates no provider, and needs noZAEFederation.zael-github-e2edeleted), create it once withZAEFederation, outside the stack, and pass its ARN. Don't deploy the stack underZAEFederation: it can't touch CloudFormation, roles or ECR.The runbook's
AWS=line andmake deploy'sPROFILEdefault nameAWSPowerUserAccesstoday. #27 should switch them toZAEPowerUserAccess, once the owner confirms.Unverified
simulate-principal-policydoesn't evaluate Organizations SCPs, andorganizations:ListPoliciesForTargetis denied to this set. The account already holds 16+ ECR repos, and Gate: AWS deploy permissions and EC2 vCPU quotas #2's live probe created aPowerUserPB-*role, so no SCP blocks those.iam:UpdateAssumeRolePolicyunderZAEPowerUserAccessis unproven live.Merge ticket #19: gate (quotas, OIDC permission sets)
sodre commentedon Nov 14, 2026
Owner decisions (2026-11-13): #27 onward deploys the stack with
zeroae-code/ZAEPowerUserAccess, which becomesmake deploy's default profile. Reuse the existing GitHub OIDC provider throughExistingOidcProviderArn, and record in the runbook's traps table that the provider is owned by thezael-github-e2estack.Deploy and operate under zeroae-code/ZAEPowerUserAccess by default