mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 06:47:41 -05:00
feat(iam): check lambda:PassNetworkConnector from a table generated from the Service Reference (#6699)
* feat(lambdaweb): check lambda:PassNetworkConnector as AWS does A revision that sets egressNetworkConnectorArn needs lambda:PassNetworkConnector on the connector version ARN as given. Lambda checks it after the connector ARN checks and before it looks the connector up. A refusal names the first policy type that refuses, in the order identity policies, permissions boundary, session policy. An explicit deny in a managed policy or a boundary also names that policy's ARN. * fix(lambdaweb): apply service control policies to the account root when passing a connector * fix(lambdaweb): name the managed policy that denies a session token caller * feat(iam): check lambda:PassNetworkConnector from a generated table Move the check out of Lambda Web into the IAM enforcement filter, where iam:PassRole is checked. tools/aws/regen_iam_passed_network_connectors.py joins AWS's Service Reference and botocore's models into src/main/resources/aws/iam-passed-network-connectors.json, and the filter reads it for Web Functions, MicroVM images and MicroVMs. A MicroVM request that names no egress connector, or an empty list, passes the Lambda-managed INTERNET_EGRESS connector, and RunMicrovm with no ingress connector passes HTTP_INGRESS, as AWS checks them. AppSync's data source operations are listed too, but botocore's model has no member for their connector, so they are not read. The refusal text now comes from AccessDeniedMessages, which LambdaTaskAuthorizer and GetStackOutputRoleAuthorizer use as well.
This commit is contained in:
1 parent
8a3d769c70
commit
b0cd70401b
20 files changed
+1405
-85
No files matched your search
@@ -51,6 +51,7 @@ Two AWS service models, not one. `Lambda Microvms` (apiVersion 2025-09-09) carri
|
||||
- **Per-operation projections:** an image is returned in four different shapes and a connector in four. Create and Update carry full detail, Get is a smaller summary, and only the list summaries carry `Type`. Absent members are absent rather than null — a connector that has never been updated has no `LastUpdateStatus` at all.
|
||||
- **Members the model marks optional but the service enforces:** a connector requires `ClientToken`, `OperatorRole`, `NetworkProtocol` and `AssociatedComputeResourceTypes`. A client written from the Smithy model alone receives four validation errors in turn.
|
||||
- **ARN or bare identifier:** images, MicroVMs and connectors resolve by either in URI paths.
|
||||
- **Passing a connector:** when IAM enforcement is on, `CreateMicrovmImage`, `UpdateMicrovmImage` and `RunMicrovm` need `lambda:PassNetworkConnector` on each connector the request names, and on the Lambda-managed `INTERNET_EGRESS` connector, or `HTTP_INGRESS` for ingress, when it names none, as on AWS (see [IAM](iam.md)).
|
||||
- **Connector versions:** a connector starts at version 1. As on AWS, an update that changes the subnets, the security groups, the network protocol or the operator role makes the next version, and one that only lists the subnets in another order changes nothing. A connector also resolves by its name, and `:<version>` after an id, a name or an ARN names one version. The latest version cannot be deleted on its own, and `AssociatedComputeResourceTypes` cannot change. Errors use the AWS wording.
|
||||
- **Builds per generation:** each version is built once per Graviton generation the service targets, so a version has more than one build.
|
||||
- **Not emulated:** auth tokens, the per-VM endpoint, idle and suspend timers, and suspend/resume. Those belong to a full-fidelity MicroVMs emulator rather than to CloudFormation provisioning; see [m80](https://github.com/INTENTIUS/m80).
|
||||
|
||||
Reference in new issue
Block a user