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:
TATSUNO “Taz” Yasuhiro authored and GitHub committed 2026-10-26 23:26:25 -04:00
1 parent 8a3d769c70
commit b0cd70401b
20 files changed
+1405 -85

No files matched your search

+5 -1
View File
@@ -1,9 +1,10 @@
name: IAM Data Drift
# Checks the six vendored files that come from AWS's live service reference rather than from a
# Checks the seven vendored files that come from AWS's live service reference rather than from a
# pinned dependency: the IAM service namespace list, the map of which resource each IAM action is
# authorized against, the map of operations AWS authorizes as an action of another name, the
# table of the operations that pass a role and the services they pass it to, the table of the
# operations that pass a Lambda network connector, the table of the
# tagging actions operations that tag what they create need, and the table of the resources each
# operation's request names. That
# needs the live service reference index, so unlike every other check here it can
@@ -45,6 +46,9 @@ on:
- 'src/main/resources/aws/iam-passed-roles.json'
- 'tools/aws/regen_iam_passed_roles.py'
- 'tools/aws/test_regen_iam_passed_roles.py'
- 'src/main/resources/aws/iam-passed-network-connectors.json'
- 'tools/aws/regen_iam_passed_network_connectors.py'
- 'tools/aws/test_regen_iam_passed_network_connectors.py'
- 'src/main/resources/aws/iam-tag-on-create.json'
- 'tools/aws/regen_iam_tag_on_create.py'
- 'tools/aws/test_regen_iam_tag_on_create.py'