aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
chore(compute): re-tighten MicroVM-facing IAM if AWS exposes usable condition keys
- Lingua principale
- TypeScript
- Stelle
- 143
- Fork
- 46
- Merge medio
- 3g 9h
- PR unite (30g)
- 20
Descrizione
### Context
ADR-021's Lambda MicroVMs backend runs with deliberately relaxed IAM in two places, both proven necessary by controlled live experiments (evidence: ADR-021 §4 + `docs/verification/645-p2-smoke-runbook.md`):
1. **Role trust**: the build, execution, and connector-operator roles trust `lambda.amazonaws.com` with **no** `aws:SourceAccount`/`aws:SourceArn` condition — the service presents no source key when assuming them (conditioned trust → deterministic `CREATE_FAILED` / unassumable role).
2. **PassRole**: the orchestrator's grant on the execution role and the bootstrap `MicrovmPassRoles` statement carry **no** `iam:PassedToService` condition — the condition is denied on the `RunMicrovm` and CloudFormation paths (two-arm experiments, verbatim denials in the ADR). Candidate service principals (`microvms.lambda.amazonaws.com` etc.) were all `implicitDeny`, and CloudTrail emits no `lambda-microvms` events, so the value the authorizer would match cannot currently be observed.
Compensating controls in place: exact-ARN / name-prefix resource scoping, backend-conditional bootstrap policy, orchestrator-only pass path for the execution role.
### Ask
When AWS documents (or the service starts presenting) usable condition keys for Lambda MicroVMs role assumption and PassRole:
- add the trust conditions back to all three roles
- restore `iam:PassedToService` on both PassRole grants
- delete the compensating-control prose from ADR-021 §4 / SECURITY.md / DEPLOYMENT_ROLES.md
The ADR says "revisit if AWS documents it" — this issue is that revisit's handle. Consider also raising via internal AWS channels: the service team may simply need to publish the authorization-context documentation.
Refs #645, PR #733, ADR-021.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da ADR-021 §4 e docs/verification/645-p2-smoke-runbook.md, quindi esamina le tre policy di trust dei ruoli e le due concessioni PassRole descritte nell’issue. Procedi solo dopo che AWS avrà documentato o esposto condition key utilizzabili di Lambda MicroVM; il lavoro è completo quando vengono ripristinate le condizioni trust e iam:PassedToService e viene rimosso il testo sui controlli compensativi da ADR-021 §4, SECURITY.md e DEPLOYMENT_ROLES.md.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws
- Ambito
- authorization, cloud, security
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100