Commit Graph
477 Commits
Author SHA1 Message Date
Priamo Germosen 5ed7187e28 fix(iam): read a federated assume's tags in its trust policy, and sts:TagSession from the generated tables (#9721)
Under enforcement a role whose trust policy conditions AssumeRoleWithSAML or AssumeRoleWithWebIdentity on aws:RequestTag/<key> or aws:TagKeys refused every tagged assume: neither trust policy saw the tags the assertion or the token passes, which the Service Reference gives both actions and the IAM user guide's SAML ABAC tutorial's trust policy reads. And all three assumes named sts:TagSession by hand, through AssumeRolePolicyEvaluator.TAG_SESSION_ACTION, with the assertion's PrincipalTag attributes and the token's tags claim named by hand too.

The IAM user guide's page on session tags says where an identity provider passes the tags, "include the Attribute element with the Name attribute set to https://aws.amazon.com/SAML/Attributes/PrincipalTag:{TagKey}" and "the nested claim format uses a structure within the https://aws.amazon.com/tags namespace in the JWT", and what passing them needs, "trust policies for all roles connected to the identity provider (IdP) passing tags must have the sts:TagSession permission". tools/aws/fetch_sts_session_tags.py vendors it into tools/aws/sources/sts-session-tags.json, and regen_iam_authorized_actions.py gives both operations a companion naming the attribute or the claim, sts:TagSession, and the reference's aws:RequestTag/${TagKey}, where the reference's action of the operation's name takes that key.

The SAML and web identity trust policies now read the tags as aws:RequestTag/<key> and aws:TagKeys, written as an AssumeRole's are, and check the companion's action for them; the assertion and token verifiers read the companion's attribute and claim. AssumeRole's trust check takes the tagging action the tag-on-create table gives it. TAG_SESSION_ACTION and the allowsTagging methods are gone.

Closes #6640.
2026-11-29 00:16:10 -04:00
Priamo Germosen b907da46b3 chore(deps): bump botocore to 1.44.13 (#9714)
Moves the pin from 1.44.9 to 1.44.13 and regenerates the data derived
from it.

Every request shape, route and service table the bump regenerates is
unchanged apart from its source label. partitions.json gains the
elb-proxy endpoint prefix signed as elasticloadbalancing, CloudFront
and EMR on EKS in aws-eusc, Route 53 Profiles in aws-iso and aws-iso-b,
and API Gateway in aws-iso-f; no region changes.

1.44.13 models the ELB proxy API (smithy-rpc-v2-cbor 2026-11-20), whose
operations the passed-role, tag-on-create and request-resources tables
parked as missing from the pinned botocore. They now read them:
CreateProxy passes roleArn and tags through tags{}, and each proxy
operation is checked on the proxy its proxyIdentifier or resourceArn
names. The Service Reference now also lists the tagging action for
Managed Service for Apache Flink's ImportSnapshot, so the tag-on-create
table checks its Tags.
2026-11-28 23:18:19 -04:00
Priamo Germosen 7d3049d218 fix(iam): read a federated assume's source identity from its assertion or token (#9708)
Under enforcement a role whose trust policy conditions AssumeRoleWithSAML or AssumeRoleWithWebIdentity on sts:SourceIdentity refused every assume, and one that withheld sts:SetSourceIdentity was never consulted: neither operation read the source identity its identity provider sets, so the session carried none, the response returned none and its requests carried no aws:SourceIdentity. The Service Reference gives both actions sts:SourceIdentity but lists no authorized actions for either operation, and botocore models the value only in the response.

The IAM user guide's page on source identity, which tools/aws/fetch_sts_source_identity.py already vendors, says where each carries it, "to set a SAML attribute for source identity, include the Attribute element with the Name attribute set to https://aws.amazon.com/SAML/Attributes/SourceIdentity" and "include source identity in the https://aws.amazon.com/source_identity namespace in the token", and what it needs, "trust policies for all roles connected to an identity provider (IdP) must have the sts:SetSourceIdentity permission". The fetcher now copies those sentences too, and regen_iam_authorized_actions.py gives each operation a companion naming the attribute or the claim and the key it is read as, where the reference's action of the operation's name takes sts:SourceIdentity.

STS reads the value the table names, holds it to botocore's sourceIdentityType (the shape botocore gives the response's SourceIdentity, as it does AssumeRole's member), and refuses several values or one outside it with InvalidIdentityToken. The trust policy reads it as sts:SourceIdentity, through the keys the federated trust evaluators already read in full, and is checked for sts:SetSourceIdentity before the assume, as for AssumeRole. The session records it under aws:SourceIdentity, which a session assumed from it carries on, and the response returns it.

Part of #6640.
2026-11-28 23:02:42 -04:00
Hector Ventura 09a2cc0190 fix(iam): accept the regional EUSC sign-in endpoint as a SAML recipient (#9698)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-28 22:34:31 -04:00
Priamo Germosen cc74f1c3a2 fix(iam): read an AssumeRole's source identity as the IAM user guide gives it (#9697)
Under enforcement an AssumeRole passing a SourceIdentity was neither held to sts:SetSourceIdentity nor read as sts:SourceIdentity, so a trust policy requiring a source identity refused every assume and one granting the permission was never consulted. The session kept no source identity either: the response returned none, its requests carried no aws:SourceIdentity, and a session assumed from it could set another. botocore gives the member and the Service Reference the key and the action, listing sts:SetSourceIdentity among the actions AssumeRole is authorized by, without saying when it is needed or which member carries the key.

The IAM user guide's page on source identity says both: "to pass source identity while assuming a role, use the -–source-identity AWS CLI option or the SourceIdentity AWS API parameter", "to specify a source identity, principals (IAM users and roles) must have permissions to sts:SetSourceIdentity", and when chaining it is "required in both the permissions policy of the principal who is assuming the role and in the role trust policy of the target role". tools/aws/fetch_sts_source_identity.py vendors it into tools/aws/sources/sts-source-identity.json. regen_request_condition_keys.py reads it for sts (CONDITION_SOURCES), so sts:SourceIdentity is read from AssumeRole's SourceIdentity, and regen_iam_authorized_actions.py crosses it with the reference's AuthorizedActions and botocore's request members into a new companions section of iam-authorized-actions.json: AssumeRole needs sts:SetSourceIdentity when it names SourceIdentity or its caller carries aws:SourceIdentity.

Enforcement checks the companion action on the role with the request's keys, and for a caller that is itself a role session checks it of the caller's own permissions alone too, since a trust policy naming the caller's role would otherwise stand in for them in the same account (the table's callerPolicyWhenChained, from the page's sentence on role chaining). STS checks it in the trust policy before the assume, as AWS names it where a statement granting both is conditioned on another sts:SourceIdentity. The session records the value under the key the table gives, aws:SourceIdentity, which its requests carry and a session assumed from it carries on, read there as sts:SourceIdentity too, and the response returns it. A chained request naming another value is refused with ValidationError, "The source identity is already set for this assume role session", and an AssumeRole naming a session tag key twice with InvalidParameterValue, "Duplicate tag keys found. Please note that Tag keys are case insensitive.", both as AWS's evaluation suite records them.

Part of #6640.
2026-11-28 21:09:11 -04:00
TATSUNO “Taz” Yasuhiro 96ea43959c feat(eventbridgev2): tag and untag buses, subscribers and event sources (#9686)
EventBridge V2 took tags only when a bus, a subscriber or an event source was created. TagResource, UntagResource and ListTagsForResource now add, remove and list them, and IAM reads the changed tags for aws:ResourceTag conditions.

AWS allows 50 tags on a resource, refuses keys that start with aws: in any case, and refuses to tag or untag a revoked resource. It lists the tags in the order of a HashMap copied from one filled in key order. One lookup finds the taggable resource for the tag calls and for the IAM resource tags, and each kind is tagged through a copy, so a failed write leaves its tags as they were.
2026-11-28 19:52:44 -04:00
Priamo Germosen ee3970d6c9 fix(iam): read route53:VPCs from the vendored Route 53 developer guide (#9687)
Under enforcement a VPC association call scoped by route53:VPCs was refused for every VPC, as #8367 reports: the request condition key table never filled the key, so a condition on it never saw a value. Neither botocore nor the Service Reference says where a request carries the key or in what form.

Route 53's developer guide says both, in its table of condition keys: route53:VPCs "Represents a list of VPCs in the request of AssociateVPCWithHostedZone, DisassociateVPCFromHostedZone, ListHostedZonesByVPC, CreateHostedZone, CreateVPCAssociationAuthorization, and DeleteVPCAssociationAuthorization, in the format of "VPCId=<vpc-id>,VPCRegion=<region>". A vendored source, tools/aws/sources/route53-condition-keys.json, written by tools/aws/fetch_route53_conditions.py from that page, gives each key the table gives in a format of request members, with its operations and members, and the generator reads it for route53 (CONDITION_SOURCES) beside the record keys it already reads.

The table writes a key a format composes as that format with each member's place holding where the request carries it (VPCId={VPC.VPCId},VPCRegion={VPC.VPCRegion}), and a member of the query string as ? and its name (ListHostedZonesByVPC's ?vpcid and ?vpcregion), and the request condition reader fills the format from them, read from an XML body or the query string, when each member holds one value. A request naming no VPC, as a public CreateHostedZone does, carries none.

Route 53 reads the VPC only where its schema puts it, the VPC below the request's root, where IAM reads it, and refuses a second VPC, a second VPCId or VPCRegion, or a repeated vpcid or vpcregion query parameter with InvalidInput, as it already refuses a change batch naming an element twice. It used to take the first VPC anywhere in the body, so a request naming a denied VPC beside another carried no value for the Deny to match and still acted on the denied one.

Closes #8367.
2026-11-28 18:39:20 -04:00
Priamo Germosen 1b7ddb1101 fix(iam): read EKS access entry condition keys from the vendored Service Authorization Reference (#9682)
Under enforcement a CreateAccessEntry scoped by eks:principalArn or eks:accessEntryType was refused for every entry, and an AssociateAccessPolicy scoped by eks:policyArn or eks:namespaces for every association, as #8311 reports: the request condition key table read none of these keys, so a condition on them never saw a value. Neither botocore nor the Service Reference says which request member carries them.

The Service Authorization Reference's table of the keys EKS defines says it: eks:principalArn, eks:kubernetesGroups, eks:policyArn and eks:namespaces filter on "the <member> present in the access entry requests" or in "the associate / disassociate access policy requests", and eks:accessEntryType and eks:username on "the access entry type" and "the Kubernetes username" present in them, the access entry requests' type and username. A vendored source, tools/aws/sources/eks-condition-keys.json, written by tools/aws/fetch_eks_conditions.py from that page, gives each key its member, and the generator reads it for eks (CONDITION_SOURCES) beside the cluster keys it already reads.

The page gives what a request carries, so a vendored key is read from an action's request only where the reference lists it on the action itself; one the reference gives a resource type alone is the stored resource's value. A list's values are each read (kubernetesGroups, accessScope.namespaces). A vendored member the request carries outside its body, as DisassociateAccessPolicy carries policyArn in its path, or as a structure, as accessScope is, the page not saying which of its values the key holds, is not read.

The keys the reference gives the access entry itself, its stored principal, type, groups and username on the operations acting on one, are not read yet: those requests are checked on an access entry ARN whose identity and id are left open, which names no one entry to read them from.

Closes #8311.
2026-11-28 17:12:28 -04:00
Priamo Germosen b4cc436ad0 fix(iam): read EventBridge's rule and target condition keys from the vendored user guide (#9673)
Under enforcement a PutRule scoped by events:source was refused for every event pattern, and a PutTargets scoped by events:TargetArn for every target, as #8320 reports: the request condition key table never filled either key, so a Null or ForAllValues condition on them never saw a value. The table's reader is generic, but which member carries a key comes from SERVICES in regen_request_condition_keys.py, and EventBridge was not there. Neither botocore nor the Service Reference says where a request carries these keys: botocore models EventPattern as a string ("The event pattern").

EventBridge's user guide says it, in its table of condition keys: events:source is "the literal string for the source field of the event", with events:detail-type, events:detail.service, events:detail.eventTypeCode and events:detail.userIdentity.principalId the same for their fields, which a rule's event pattern gives ("EventPattern is a mandatory argument to PutRule"), and events:TargetArn is "the ARN of the target for the rule". A vendored source, tools/aws/sources/eventbridge-condition-keys.json, written by tools/aws/fetch_eventbridge_conditions.py from that page, gives each key its member, and the generator reads it for events (CONDITION_SOURCES), each key in the one operation the page names: PutEvents, CreateEventSource and UpdateEventSource take events:source too, which the page does not describe, so they are not read there. --verify checks the file against the page.

The table writes a field of a JSON document a string member holds after #: EventPattern#source.* is each literal string of the pattern's source, read by one generic step of the JSON reader. A pattern leaving a field out names nothing, so ForAllValues allows it and a Null check refuses it, as the page's examples show. The fields are read at the pattern's top level, where every example on the page gives them, so a $or branch's names nothing, and a matcher such as {"prefix": "aws."} is no literal string and names nothing. events:TargetArn reads each target's own Arn, not its dead-letter queue's.

Closes #8320.
2026-11-28 15:50:13 -04:00
Priamo Germosen c0c60ea886 fix(iam): check AWS Backup by its generated routes, resources and passed roles (#9669)
Under enforcement a REST route no vendored model names runs unchecked, and AWS Backup was among them: a caller could start a backup job or assign resources to a backup plan with any role and no iam:PassRole, and a grant scoped to one backup vault or plan covered every one, as #6255 reports. Backup's model routes are vendored, so each request is checked as its operation's action, and Backup joins the tables of request resources, passed roles and tags on create.

The Service Reference passes most of Backup's roles to one service, which the passed-roles generator reads alone: IamRoleArn to backup.amazonaws.com, a backup plan's scan settings' ScannerRoleArn to malware-protection.guardduty.amazonaws.com, and a restore testing selection's to restore-testing.backup.amazonaws.com. It passes StartScanJob's IamRoleArn and ScannerRoleArn to both of the first two without saying which goes where, so a vendored source, tools/aws/sources/backup-roles.json, written by tools/aws/fetch_backup_roles.py from the developer guide's malware protection page, gives each: the scanner role "trusts malware-protection.guardduty.amazonaws.com", and the backup role is "the same role found in ... the BackupSelection API", linking CreateBackupSelection, whose role the Service Reference passes to backup alone. The generator reads such a role as going where the reference passes that operation's roles, when that is one service.

A backup vault is checked by its name and a backup plan by its id; BackupStoredResourceArns answers the tags Backup holds on either, which an aws:ResourceTag condition reads. A recovery point's format the Service Reference gives with a literal * account, which the reader matches as written, so a request naming a recovery point by its ARN is checked on *, as one naming a DMS endpoint is.

A namespace the table reads is served on the shared tag routes only with a method its model gives on the path, as it already was only on the paths its model gives: Backup removes tags with POST /untag/{resourceArn}, so a DELETE on its /tags/{resourceArn}, which no Backup operation is and no action checks, was let through and removed tags an aws:ResourceTag deny relies on. It is now refused with MethodNotAllowedException (405), as a tag call sent with the other verb is.

Closes #6255.
2026-11-28 14:26:04 -04:00
Priamo Germosen 0da5179612 fix(iam): check AWS AppSync by its generated routes, resources and passed roles (#9668)
Under enforcement a REST route no vendored model names runs unchecked, and AWS AppSync was among them: a caller could give a data source any service role and a GraphQL API any CloudWatch Logs or merged API execution role with no iam:PassRole, and a grant scoped to one GraphQL API covered every API, as #6255 reports. AppSync's model routes are vendored, so each request is checked as its operation's action, and AppSync joins the tables of request resources, passed roles and tags on create.

The Service Reference passes every AppSync role to appsync, so the passed-roles generator reads each member alone: a data source's serviceRoleArn, a GraphQL API's logConfig.cloudWatchLogsRoleArn and mergedApiExecutionRoleArn, and an Event API's eventConfig.logConfig.cloudWatchLogsRoleArn, each passed to appsync.amazonaws.com.

The request-resources generator now also fills a variable whose stem no member's matches with the one path label a REST route puts after the literal segment the type's format puts before that variable, or after that segment qualified by the variable's first word: AppSync's apiId in /v1/apis/{apiId} fills apis/${GraphQLAPIId}, and sourceApiIdentifier in /v1/sourceApis/{sourceApiIdentifier} a merged API association's apis/${SourceGraphQLAPIId}. No other namespace's reading changes. An operation on an API's data sources, resolvers, functions, types, API keys or schema, which the Service Reference gives no resource type, stays on *, as AWS checks it. AppSyncStoredResourceArns answers the tags AppSync holds on a GraphQL API or a custom domain name, which an aws:ResourceTag condition reads.

AppSync now mints a channel namespace's ARN as apis/<apiId>/channelNamespace/<name> and an association's as apis/<mergedApiId>/sourceApiAssociations/<associationId>, from the association's own id, as AWS returns them, so a policy naming the ARN AppSync returns names the resource the request is checked on. Floci minted channelNamespaces/<name>, and an association ARN under sourceApis/ or mergedApis/ ending in a second id.

AppSync's tag routes are served, as every namespace's the table reads, on the route its model gives, /v1/tags/{resourceArn} with the ARN encoded as an SDK sends it.

Part of #6255.
2026-11-28 13:03:05 -04:00
Priamo Germosen 739e1274bc fix(iam): check AWS Batch by its generated routes, resources and passed roles (#9660)
Under enforcement a REST route no vendored model names runs unchecked, and AWS Batch was among them: a caller could create a compute environment with any service, instance or Spot Fleet role and register a job definition with any job or execution role, as #6255 reports. Batch's model routes are vendored, so each request is checked as its operation's action, and Batch joins the table of request resources and the passed-roles table.

The passed-roles generator reads RegisterJobDefinition's roles, each passed to ecs-tasks.amazonaws.com, alone. The Service Reference passes CreateComputeEnvironment's and UpdateComputeEnvironment's roles to batch, ec2, ecs and spotfleet without saying which member's goes where, so a vendored source, tools/aws/sources/batch-roles.json, written by tools/aws/fetch_batch_roles.py from the Batch API reference and user guide, gives each: serviceRole is trusted by batch.amazonaws.com, a compute resource's instanceRole is an instance profile whose role is trusted by ec2.amazonaws.com, spotIamFleetRole by spotfleet.amazonaws.com, and a managed instances provider's infrastructureRoleArn needs "iam:PassedToService: ecs.amazonaws.com", the update's naming the same role in the same words. SubmitServiceJob, which Floci does not serve, names its role inside the SageMaker request it queues, a string the table does not read.

The request-resources generator reads a type of two variables from a member whose documentation spells it, as it does ECS's "(family:revision)", now also where a variable shares only some of its words with the type's name, so DeregisterJobDefinition's "(name:revision)" names a job definition revision whole, not only its name, and where a member lists the form among those it takes, as SubmitJob's "definition-name, definition-name:revision, or the ARN" does, naming the revision rather than the job definition its name alone fills: "the request ARN includes the revision". BatchStoredResourceArns resolves it as Batch does, a name alone being the latest active revision a job runs, and answers the tags of what Batch stores. A member of a structure documented as "The Amazon Resource Name (ARN) of the" resource is read as one, so a job queue's computeEnvironmentOrder[].computeEnvironment is checked. No other namespace's reading changes.

A role name a path prefixes, which Batch documents ("if a role with the name bar has a path of /foo/, specify /foo/bar as the role name"), is checked on the role IAM holds under that name and path.

Batch's tag routes are served, as every namespace's the table reads, on the route its model gives, /v1/tags/{resourceArn} with the ARN encoded as an SDK sends it. Its tag-on-create reading waits: CreateComputeEnvironment is checked as batch:TagResource or batch:SetCapacityTags, and nothing says which of its tag members each is for.

Part of #6255.
2026-11-28 11:14:42 -04:00
Priamo Germosen e61927b824 refactor(iam): read 12 PassRole operations from the generated table, not by hand (#9653)
PassedRoles read the role of twelve operations by hand: Lambda's CreateFunction and UpdateFunctionConfiguration (Role), CreateMicrovmImage and UpdateMicrovmImage (buildRoleArn), RunMicrovm (executionRoleArn), CreateNetworkConnector and UpdateNetworkConnector (OperatorRole), Step Functions' CreateStateMachine and UpdateStateMachine (roleArn), EventBridge's PutRule (RoleArn), Auto Scaling's PutLifecycleHook (RoleARN) and Application Auto Scaling's RegisterScalableTarget (RoleARN). The passed-roles generator reads each of them from botocore's model to the same member and the same service the role is passed to, so they leave its BY_HAND list, the regenerated table gives their members, and their cases and the two service constants only they used leave PassedRoles.
2026-11-28 09:18:36 -04:00
Priamo Germosen 5f89a2a174 refactor(iam): match a label its controller lets span slashes on the router's values alone (#9640)
The REST routes generator kept ARN_SPANNING_ROUTES, a list of the operations whose controller takes an ARN label with the slashes it was sent with unencoded (API Gateway v2's tag routes, OAM's and EKS's access entry routes), and vendored their labels greedy. IAM now matches such a request on the values the router gave the path parameters of the method it dispatched to, which covers every controller that takes a label so without a list, so the list goes and the routes keep the model's labels. A route agrees with the router when its labels, given the router's values in some order, rebuild the request's path, so a value holding one of the route's own segments (an EKS principal whose IAM path holds access-entries) is still matched, where taking the one split the spanning pattern finds would match no route.

OAM's tag requests reach the shared tags controller, which serves no OAM tagging, so an OAM ARN sent unencoded is no longer checked as OAM's before that controller refuses it. The tests give the router's values where a request is unencoded, and an API Gateway v2 tag request with an unencoded ARN is checked through the router.
2026-11-28 08:06:11 -04:00
Priamo Germosen 489a6ffc7d fix(iam): check RDS Data and Resource Groups by their generated routes, the last hand rules gone (#9636)
IamActionRegistry kept 12 hand route rules: six for RDS Data, five for Resource Groups and a catch-all for Kinesis. RDS Data and Resource Groups now have their botocore routes vendored, and RDS Data joins the namespaces whose request resources are read, its model being what kept it out. Resource Groups' requests were already read, and the routes match them on the model's own path, without the /_rg prefix its route filter moves them under.

RDS Data's rules gave the action alone, so a statement was checked on every resource and a grant scoped to a cluster refused it even on that cluster. It is checked on the cluster its resourceArn names now, as AWS does. A secret's ARN is no cluster's, and a commit, a rollback and a statement inside a transaction now read their request's secret as every other call already did, refusing one Secrets Manager cannot read (SecretsErrorException, which AWS models on them), so a cluster's ARN given as the secret cannot stand in for the database the call runs on. A statement on a DB instance, which Floci serves and AWS's Data API does not, names no resource the check reads, so it is checked on *.

The authorized actions list RDS Data and Resource Groups among the routed scopes.

The Kinesis rule checked any POST with no X-Amz-Target as kinesis:*, an action no policy grants by name. Kinesis serves no such request, so it goes, as the rule machinery does, no rule being left.
2026-11-27 22:08:21 -04:00
Priamo Germosen 5746133527 refactor(iam): check EKS by its generated routes alone (#9624)
IamActionRegistry kept 70 hand route rules for EKS. The generated REST routes, read from botocore, map every EKS route to the same action, except the access entry routes Floci's controller serves with the principal ARN unencoded: it takes the principal as {principalArn: .+} and a cluster access policy ARN after it with its slash sent as it is or encoded, where the model gives each one segment. Those six operations join ARN_SPANNING_ROUTES, as API Gateway v2's and OAM's tag routes are, so their labels span the slashes.

A DELETE on a principal whose IAM path holds an access-policies segment matches both DeleteAccessEntry's route and DisassociateAccessPolicy's, which outranks it, while EKS's router takes it as a disassociate only when a cluster access policy ARN follows. A request is now matched, of the routes it matches, to the one whose labels the path gives the values the router gave the path parameters of the method it dispatched to, when there is one: the route of the operation that runs. With that, the rules go, and none of EKS's is left.
2026-11-27 18:48:48 -04:00
Priamo Germosen a5afece703 fix(iam): check iam:PassRole on the roles an API Gateway request names (#9597)
AWS's Service Reference lists iam:PassRole for twelve API Gateway
operations, each passing its roles to apigateway.amazonaws.com. Floci
checked none: API Gateway is authorized by HTTP method, the passed-roles
table left the namespace out, and no member naming a role has a name the
table's rule knows (credentials, authorizerCredentials, credentialsArn,
authorizerCredentialsArn). An update names its role as a patch
operation's value, and an import inside its OpenAPI definition.

The roles are now checked for the operation the request's route resolves
to, which the table is keyed by, from three readings. A new vendored
source, tools/aws/sources/apigateway-roles.json, written by its own
script from the API references and developer guide, gives what they
read:

- The members that take a role, by the resource type each describes:
  "To specify an IAM role for API Gateway to assume, use the role's
  Amazon Resource Name (ARN)". PutIntegration, CreateIntegration,
  CreateAuthorizer, CreateApi and UpdateApi read them, REST APIs' and
  HTTP APIs' alike.
- A REST API update's patch operation, which names the property it
  changes by its path ("the path for this property is /name"): the
  value of the one whose path names a role member of the resource the
  update returns, so UpdateIntegration reads
  patchOperations[path=/credentials].value, UpdateAuthorizer
  /authorizerCredentials and UpdateAccount /cloudwatchRoleArn. The
  table gains a list step selecting the elements whose field holds a
  value.
- An import's OpenAPI definition, JSON or YAML: the
  x-amazon-apigateway-integration credentials of each Operation object,
  the ANY method's included, and the x-amazon-apigateway-authorizer
  authorizerCredentials of each security scheme, OpenAPI 2's and 3's,
  where the guide says each extension sits. ImportRestApi and PutRestApi
  take the whole body as the definition, ImportApi and ReimportApi a
  body member. The definition is read as its service takes
  and reads it, through a new PassedRoleLookup hook given the whole body:
  API Gateway resolves a REST API definition's ${AWS::Region},
  ${AWS::AccountId} and ${AWS::Partition} before importing it, so a role
  written with them is checked too, and takes an HTTP API's from its
  body's body (the REST route's envelope) or Body (the JSON 1.1
  handler's), or else the whole body, which the REST route also takes.

A REST JSON model's member is also read by its botocore name where its
wire name differs: Floci serves HTTP APIs over JSON 1.1 too
(AmazonApiGatewayV2.*), whose bodies name members as botocore does
(CredentialsArn, Body), and its handler takes either spelling as the
same member.

apigateway joins the passed-roles namespaces with all twelve operations
read and nothing added to the hand lists.
2026-11-27 14:21:56 -04:00
Priamo Germosen 1a91dbda76 fix(iam): check iam:PassRole on the roles an EMR RunJobFlow request names (#9587)
AWS's Service Reference lists iam:PassRole for RunJobFlow, passing its
roles to application-autoscaling.amazonaws.com, ec2.amazonaws.com and
elasticmapreduce.amazonaws.com without saying which member's role goes
where, and JobFlowRole names an instance profile rather than a role.
The passed-roles table left the operation unread, so a caller allowed
elasticmapreduce:RunJobFlow could launch a cluster with any service role
and any instance profile.

A new vendored source, tools/aws/sources/emr-roles.json, written by its
own script from the EMR API reference, management guide and AWS CLI
reference, gives each member's role. The guide's page of each role names
its default role ("The default role name is EMR_EC2_DefaultRole"), and
the full access policy it gives users passes each default role to one
service ("iam:PassedToService": "ec2.amazonaws.com*"). The API reference
calls JobFlowRole an instance profile ("Also called instance profile and
Amazon EC2 role"), and the CLI reference's create-cluster examples give
the roles by name (--service-role EMR_DefaultRole). The steps' runtime
role, StepExecutionRoleArn, is not passed: "You can control access to
the runtime role with the condition key elasticmapreduce:ExecutionRoleArn."

The generator reads the source through ROLE_SOURCES, as it reads EKS's,
now taking a documented iam:PassedToService over a trust policy, a member
by name or as an instance profile where the source says so, and leaving
out a member whose role a condition key controls. RunJobFlow moves out of
notRead: ServiceRole to elasticmapreduce.amazonaws.com and AutoScalingRole
to application-autoscaling.amazonaws.com, each by name or ARN, and the
roles of the instance profile JobFlowRole names, by name or ARN, to
ec2.amazonaws.com, found with the instance-profile lookup RunInstances
already uses. A profile IAM does not hold passes no role, as Floci's EMR
already reads JobFlowRole. An instance-profile member is not read for a
call with no request of its own, which has no such lookup.

The instance profile is now found one way everywhere it is used
(IamService.instanceProfileNamed): by its name, or by its own ARN, path
and account included. IAM's passed-role check, EMR's step role and an
EC2 instance's credentials each read it their own way, and EMR kept only
the name after an ARN's last slash. A JobFlowRole ARN of another account
or path then found no role to check but ran the steps as the local
profile's role.

A member's JSON value is now read as the text a handler reads it as, a
number or a Boolean included, as the request resources and condition
keys already read a body's values. The passed-roles reader took strings
alone, while EMR takes "JobFlowRole":123456 as the profile 123456, so a
role named by a number went unchecked.
2026-11-27 08:11:04 -04:00
Kenshin Okinaka b981d0916d fix(ses): check a v2 templated send on the template it names (#9582)
A v2 SendEmail or SendBulkEmail naming a stored template was not checked
on that template, so a policy granting or denying ses:SendEmail on one
template did not reach a v2 send with it. The request-resources generator
now reads, from botocore's shapes, the name and ARN members of a structure
named after a resource type inside a request structure
(Content.Template.TemplateName and TemplateArn, DefaultContent.Template
for bulk sends), and the table and its reader accept a field of a
structure inside a structure.
2026-11-27 07:13:10 -04:00
Priamo Germosen fb0e72c96a fix(iam): check iam:PassRole on an EKS Auto Mode cluster's node role (#9576)
CreateCluster and UpdateClusterConfig take EKS Auto Mode's node role in
computeConfig.nodeRoleArn. AWS's Service Reference lists iam:PassRole
for both operations, with iam:PassedToService ec2.amazonaws.com and
eks.amazonaws.com, but not which member's role goes to which service.
Floci never checked the node role: CreateCluster read only its cluster
role, by hand, and UpdateClusterConfig was left out of the table.

A new vendored source, tools/aws/sources/eks-roles.json, written by its
own script from the EKS API reference and user guide, gives each member's
role and the service its trust policy is for. CreateCluster's roleArn is
the cluster IAM role ("provides permissions for the Kubernetes control
plane"), whose page links from the member and whose trust policy names
eks.amazonaws.com. nodeRoleArn is "the IAM Role EKS will assign to EC2
Managed Instances", whose description names the EKS Auto Mode IAM
reference, whose node IAM role section links the guide's page of that
role, whose trust policy names ec2.amazonaws.com. The generator reads
the source (ROLE_SOURCES) to choose, among the services the Service
Reference names for an operation, the one each member's role is for. It
fails on a vendored role for a service the reference does not name, and
on one no operation reads. --verify checks the source against the live
pages.

So CreateCluster now needs iam:PassRole on roleArn for eks.amazonaws.com
and on computeConfig.nodeRoleArn for ec2.amazonaws.com, and
UpdateClusterConfig on its node role for ec2.amazonaws.com. Both move
into the generated table. So do CreateNodegroup, CreateFargateProfile,
CreateAddon and UpdateAddon, whose roles PassedRoles read by hand, the
same members to eks.amazonaws.com the generator gives from botocore and
the Service Reference. Their hand readers are gone, and Step Functions'
EKS tasks now check them as a direct request does.
2026-11-27 01:00:33 -04:00
Priamo Germosen 6ba4970877 fix(iam): check iam:PassRole on the role an S3 replication configuration names (#9570)
PutBucketReplication passes the Role of its ReplicationConfiguration to
S3, and AWS's Service Reference lists iam:PassRole for it with
iam:PassedToService s3.amazonaws.com. Floci never checked it: the
passed-roles table recorded the operation as not read, because its
request body is XML, so a caller allowed s3:PutReplicationConfiguration
could name any role.

PassedRoles now reads a REST-XML body the way the condition keys of a
REST-XML request are read (XmlParser.valuesAt): each member at the
elements botocore serializes it as, below the document element, a
list's elements under the name its shape gives them or as member. The
text is read without surrounding whitespace, which S3 keeps in a Role it
accepts. The generator reads rest-xml models too, and fails on a role
member reached through a map or a flattened list, which an XML body
does not nest as the table's paths do. Two operations move from notRead
into the table: S3's PutBucketReplication (Role, to s3) and S3 Access
Grants' CreateAccessGrantsLocation (IAMRoleArn, with no named service).

Form parameters are now read only from a request the Query controller
dispatches (IamActionRegistry.isQueryRequest: a form posted to the root
path), as formParameters already documented. A request to another
protocol's route is read as its handler reads it, whatever Content-Type
it is sent with: an S3 replication configuration sent as
application/x-www-form-urlencoded was parsed as one form key, so its role
went unchecked while S3 stored the XML. The same held for tag-on-create
and request resources reading a REST request's JSON body.

S3's PutBucketReplication now refuses with MalformedXML a document that
is not well-formed as a whole, or whose configuration does not hold
exactly one Role with text, as it already counts each rule's Destination
and Bucket. It read the first Role anywhere in the document from a parse
that stopped where the configuration ended, so a second Role holding an
element, or content after the configuration, left IAM reading no role
while S3 stored the document.

The table is keyed by operation, as the Service Reference lists it, but
the enforcement filter and the Step Functions request checks looked it
up by the IAM action. The two differ for PutBucketReplication, which is
authorized as s3:PutReplicationConfiguration, so its entry would never
have been found. Both now look roles up by the request's operation, as
tag-on-create already does. DMS's ModifyDataProvider and
ModifyMigrationProject, authorized as UpdateDataProvider and
UpdateMigrationProject, are found the same way once Floci serves them.
2026-11-26 23:27:51 -04:00
TATSUNO “Taz” Yasuhiro c24cb12811 feat(eventbridgev2): revoke event sources and subscribers (#9528)
RevokeResource answered UnsupportedOperation. It now revokes a webhook event source or a subscriber for good. A revoked source answers 403 on its webhook URL and refuses UpdateEventSource and RotateWebhookCredentials with InvalidStateException. A revoked subscriber receives no more events and refuses UpdateSubscriber the same way. Both can still be described, listed and deleted, and report Revoked once revoked while leaving the member out before.

DeleteEventBus ignores revoked sources and subscribers, which outlive their bus under a key a new bus of the same name cannot reach. ListSubscribers pages by bus name, subscriber name and ARN, so an orphan and its namesake on the recreated bus both show.
2026-11-26 18:47:36 -04:00
Priamo Germosen e6a9092be8 feat(iam): check AppConfig, CodeArtifact and CodeGuru Reviewer by their REST routes (#9530)
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. AWS AppConfig with its data plane, AWS CodeArtifact and
Amazon CodeGuru Reviewer were among those: Floci serves each and no rule
mapped them.

Vendors the appconfig, appconfigdata, codeartifact and codeguru-reviewer
models' routes, 120 operations, so each request is checked as its
operation's action: a caller holding no grant for one is now refused
where the request used to pass. A request signed with a vendored model's
own name, which Floci also serves (appconfigdata), is checked under the
signing name the routes file records for that model (appconfig).

The three namespaces join the table of request resources. CodeArtifact's
48 operations and CodeGuru Reviewer's 14 read every type the Service
Authorization Reference marks required. Nine of AppConfig's 58 act on a
required type the table reads no member for (a deployment, a hosted
configuration version, an experiment run, a configuration profile named
as Configuration), so those are checked on the types it does read.
AppConfig Data's StartConfigurationSession is checked on the application
its ApplicationIdentifier names by its id or its name, from a measured
entry quoting AWS's own refusal of it on application/<app_id>, and
GetLatestConfiguration on the configuration of the session its
ConfigurationToken names: a reading gives a request's token that a
create of its service answers as naming what that create's session is
on, which the service finds.

A request member whose botocore shape is an account id now gives the
account of what the request names wherever a REST request carries it,
its path and query too, as the generator's own rule says, not only in
its body: CodeArtifact's domain-owner, QuickSight's AwsAccountId path
label on 196 operations, and Signer's GetSigningProfile profileOwner.
Such a resource in another account than the caller's is named as an ARN
of another account already is, in that account and as the caller's of
that name too, unless its service acts on it in that account. Signer,
ECR, CodeArtifact and Redshift do and say so, so each is checked on that
account's resource alone, as AWS checks it: Signer now reads the profile
or job its profileOwner or jobOwner names in that account, as AWS does,
where it read the caller's own, and saves a job it revokes there. Such a
request needs the owner's grant beside the caller's own policy, as AWS
requires of a cross-account request: CodeArtifact gives IAM a domain's
and a repository's policy, and Signer the profile permissions
AddProfilePermission adds, as the resource's policy (ResourcePolicyProvider),
a permission of one profile version holding for that version alone: a
job's, the version that signed it.
A resource a request names by another spelling than its service stores
it under is checked as the service reads it (resolveStoredArn, now also
for an ARN the reader builds from members): an AppConfig environment or
configuration profile by its id when named by its name, a CodeArtifact
PyPI or NuGet package by its normalized name, as AWS writes it in ARNs.

AppConfig, CodeArtifact and CodeGuru Reviewer give IAM the tags they hold
on the resource a request names (an application, a domain, repository or
package group, an association), so a grant conditioned on aws:ResourceTag
reaches a tagged resource; Signer reads a profile's tags in the profile's
own account, another account's included. A tagged create is checked for tagging on what
it makes where botocore's response gives it: CreateEnvironment answers
an Environment whose Id is the new environment's, AssociateRepository
the RepositoryAssociation whose AssociationArn is the association it
makes. A tagged StartDeployment's tags go on the deployment it makes,
its DeploymentNumber AppConfig's to mint, open. AppConfig stays out of
the passed-roles table: CreateExtension and UpdateExtension pass a role
in Actions{}[].RoleArn, a map of lists that file does not read.

A new vendored source, tools/aws/sources/codeartifact-permissions.json,
written by its own script from the CodeArtifact user guide, gives what
neither botocore nor the Service Reference says: CopyPackageVersions is
checked as ReadFromRepository on its source repository and as
CopyPackageVersions on its destination repository, and a package with
no namespace has an empty one in its ARN (package/my_domain/my_repo/
npm//react), so a request leaving namespace out is checked on that ARN.
A variable the reference names Encoded and a botocore shape's name is
filled from the member of that shape and encoded as its service encodes
it, through StoredResourceArns: CodeArtifact's package group pattern,
percent-encoded in lower case, which CodeArtifact now writes into the
group's own ARN as AWS does (/npm/team/* is /npm/team/%2a). A tag call
spelling a group's pattern otherwise (%2A), which CodeArtifact reads as
the same group, is checked on the group's own ARN, which CodeArtifact
resolves it to, so a deny on that ARN holds.

With AppConfig in the table, a tag call naming one of its ARNs with the
slash unencoded is refused as a path its model does not give, as for
every namespace the table reads; AppConfig's tests now send the ARN
encoded, as an SDK does. AppConfig Data's GetLatestConfiguration, which
a route filter moves off GET /configuration so S3's bucket of that name
keeps its route, is moved under an internal prefix the request records,
as every such route is, so IAM matches it on its modeled path. The table
tests place a create's members where the table locates them, expect a
member holding the type's own ARN to name it as it is, and expect each
resource in the account its own account member gives.
2026-11-26 18:45:59 -04:00
Priamo Germosen 5c1e8b8110 feat(iam): check Amazon SES by its generated routes and request resources (#9504)
SES v2 was checked by 118 hand-written rules in IamActionRegistry, one
per route of the model, and no SES request, v1 or v2, was checked on
the resource it names: the ses namespace waited in the table of request
resources' NOT_COVERED, as the generator refused it while its REST
clients had no vendored routes to tell their requests apart.

Vendors the sesv2 and pinpoint-email models' routes under the ses
credential scope, so each v2 request is checked as its operation's
action by the route botocore gives it, and removes the hand rules. The
ses namespace joins the table of request resources, 231 operations over
the ses, sesv2, pinpoint-email and mailmanager clients: an identity, a
configuration set, a template or a contact list by the member naming it,
an ARN member by the ARN it holds, as the Service Reference gives their
formats; an operation naming none of its action's types stays on "*".
Floci mints the same identity/<name> and configuration-set/<name> ARNs.

SES v1 and v2 share the operation names of the table, and the generator
merged the rows of clients that share an endpoint prefix, holding that a
request cannot tell them apart: a v2 SendEmail was read for v1's
SourceArn, so a grant on one identity sent from another by adding one.
Every row of the table now names the APIs it is read for, each a
protocol botocore gives a client of the operation with its API version
(SourceArn is query/2010-12-01), and the reader reads a request for the
rows of its own API alone: a Query request's by the Version its handler
dispatches it by, its form's on a POST and never its URL's, a REST
request's by the version of the model whose route it matched, never by
a member a caller adds. A request whose API neither gives, or
one no row names, is read for every row, as before. 68 rows are read
for some of their operation's APIs only, over SES, Elastic Load
Balancing's classic and v2 APIs, EventBridge, Lambda and Bedrock.

botocore now gives ListConfigurationSets and ListEmailIdentities as
POST /v2/email/list-configuration-sets and POST /v2/email/list-identities.
The GET /v2/email/configuration-sets and GET /v2/email/identities routes
an SDK built before that still sends stay served and match no route of
the model, so they are not checked. The hand-kept copy of the SES v2
model's routes the registry test read is removed: the route coverage
test checks every vendored route.
2026-11-26 10:08:17 -04:00
Priamo Germosen b0116a298c chore(iam): fail a table's --check when its namespaces part from its generator's (#9496)
The offline --check of the request-resources, passed-roles and
tag-on-create tables re-derives only what a table holds, from the
namespaces the table itself records. A namespace taken out of a
generator's NAMESPACES, or moved into NOT_COVERED, without the table
regenerated passed it: the stale table kept the namespace's operations
and the old reason, and only an integration test caught the result.

Each --check now also holds the table to its generator's constants
(namespace_problems, shared from regen_iam_passed_roles): every
operation is one the generator reads, the table's namespaces are the
ones it reads, its reasons for the namespaces it does not read are the
generator's, and none of its other namespaces is one the generator
reads or names as not read. The three vendored tables hold today.
2026-11-26 00:20:33 -04:00
Priamo GermosenandJames McMahon 05b77db069 feat(ssm): support agent-backed Session Manager sessions (#9492)
Session Manager for Linux EC2 guests running the stock SSM agent and the Session Manager plugin: interactive shells, SSH and port forwarding, with StartSession, ResumeSession, TerminateSession, DescribeSessions and GetConnectionStatus, and session document validation. Direct SendCommand execution on instances without the agent is unchanged.

StartSession and GetConnectionStatus are checked on the EC2 target, and StartSession on the selected or default session document, read from the Session Manager guide and API reference pages vendored in tools/aws/sources/ssm-session-permissions.json.

Replaces #9366, rebased onto main with the generated IAM table refreshed. On top of it, GetConnectionStatus echoes the Target it was asked about, as AWS answers. The agent's OpenDataChannel is checked on the session ARN, as the client's is, so a deny on one session reaches the instance role. Starting a session deletes the account's history older than the 30 days DescribeSessions lists.

Closes #9365

Co-authored-by: James McMahon <james@jamesmcmahon.co.uk>
2026-11-26 00:04:57 -04:00
Priamo Germosen 6196543370 feat(iam): check Amazon EFS by its REST routes (#9483)
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. Amazon EFS was among those: Floci serves it and no rule
mapped it.

Vendors the efs model's routes, so each request is checked as its
operation's action: a caller holding no grant for one is now refused
where the request used to pass.

EFS joins the table of request resources: a file system by its id, an
access point by its, and a mount target's operations and the tag calls
by what EfsStoredResourceArns answers their MountTargetId or ResourceId
reaches, the file system or the access point EFS stores. All 31 of its
operations read every type the Service Authorization Reference marks
required, so every route is checked on the resources AWS checks. Its
two creates join the tag-on-create table, and
CreateReplicationConfiguration's Destinations[].RoleArn is checked for
iam:PassRole.

A tagged create of a type its action does not act on tags the resource
it makes where its request names every variable of it; a variable the
service mints, which the create's response answers and its request
carries none of, now counts as named there, staying open as it does in
every resource a create makes. So CreateAccessPoint, which acts on its
file system, has its tags checked on access-point/* rather than on the
file system, and so do five creates of other namespaces whose made
resource was named but for a minted id: CloudFormation's
CreateChangeSet, EMR's StartNotebookExecution, Textract's
CreateAdapterVersion and Transfer Family's CreateAgreement and
CreateConnector.
2026-11-25 22:46:23 -04:00
TATSUNO “Taz” Yasuhiro aeb4593696 feat(eventbridgev2): rotate webhook credentials (#9443) 2026-11-25 21:56:53 -04:00
Priamo Germosen fbd71963e8 chore(iam): refresh the generated tables from the Service Reference (#9481)
Regenerates iam-authorized-actions.json, iam-passed-roles.json,
iam-tag-on-create.json and iam-request-resources.json from the live
Service Reference, which has changed since they were vendored: Bedrock's
data retention storage actions and Elastic Load Balancing's proxies and
certificate associations are new, Bedrock's ListInferenceProfiles now has a
resource type, RestoreDBClusterFromS3 no longer passes its
role to rds-preview, and Redshift's two IdC application creates read their
request tags. Nothing else changes.

Elastic Load Balancing's new CreateProxy passes a role, so the passed-roles
generator now reads elasticloadbalancing, as PassedRoleNamespacesIntegrationTest
requires of a namespace Floci serves: CreateProxy is recorded as not read,
the pinned botocore not having the operation yet.
2026-11-25 19:23:29 -04:00
Priamo GermosenandAndre Kurait b012f4d6bf fix(iam): check VPC endpoint IDs in EC2 tag calls on their endpoint ARN (#9467)
CreateTags and DeleteTags checked a vpce- ID in their Resources list on `*`, because the generated table learns
each ID prefix from botocore's examples and botocore gives none for VPC endpoints. A grant on one endpoint was
refused and a deny on it never applied.

fetch_ec2_id_examples.py copies the identifier examples of the EC2 API reference's CreateVpcEndpoint page into
tools/aws/sources/ec2-id-examples.json, and the generator matches their XML paths to botocore's output shapes,
which gives VpcEndpointId the vpce- prefix. That prefix joins botocore's in the one prefix map and reads only the
tagging calls' generic list, so DeleteVpcEndpoints keeps its typed reader. The source names its namespace and
pages, and the shared source verifier checks it against the live page.

The regenerated table also takes in what the Service Reference added on 2026-11-25: CloudWatch's omni-slo,
experiment and lookup types, which its tag operations now act on, Elastic Load Balancing's proxy type and the
amplifygen3 namespace.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-25 17:22:55 -04:00
Priamo Germosen 215e37eb48 fix(cloudtrail): name S3 denials as CloudTrail records the operation's data event (#9460)
IamEnforcementFilter named the CloudTrail data event of a denied S3 request
from a hand-written table keyed by the IAM action, so a request checked
under another operation's action took that operation's name: HeadBucket
was recorded as ListObjects, CopyObject, UploadPart and UploadPartCopy as
PutObject, GetObjectTorrent as GetObject, ListBuckets as a data event,
and ListObjectVersions, ListParts, DeleteObjects, AbortMultipartUpload and
the legal hold and retention calls were not recorded.

A denial is now recorded under the data event of the operation the request
matched, from src/main/resources/aws/cloudtrail-s3-data-events.json, which
tools/aws/regen_cloudtrail_s3_data_events.py generates from botocore's S3
model, the S3 user guide's data events table and its sentence naming the
event a call is recorded with (vendored by
tools/aws/fetch_cloudtrail_s3_data_events.py), and AWS's S3 service
reference. An operation the table for general purpose buckets lists is
recorded under its name or the one the guide gives it (PutObjectRetention
as PutObjectLockRetention), a versioned one under the version-less name
the table lists (ListObjectsV2 as ListObjects), and an operation it does
not list records no data event. readOnly is the service reference's, by
the reading iam-action-resources.json's readOnlyActions are vendored by,
in place of CloudTrailService's hand-written list.

The IAM data drift workflow runs on a pull request touching any of the six
new files, so the online check covers a change to the table alone.
2026-11-25 15:10:24 -04:00
James McMahon d5fdfbaa63 refactor: share data-channel routing with ECS Exec (#9432)
Move /v1/data-channel/:sessionId routing out of ECS Exec into a shared
DataChannelRouter in the ssmmessages package, with ECS Exec as a
DataChannelHandler behind it. Plain HTTP requests still fall through, an
unknown session still returns 404, and ECS Exec keeps its session token check
and streaming. AgentMessage moves with the route, and the service inventory
notes the new package.
2026-11-25 14:38:49 -04:00
James McMahon 66f80b6a26 fix(ssm): match the agent ec2messages wire format (#9431)
The stock SSM Agent polls ec2messages with the EC2WindowsMessageDeliveryService target prefix, which Floci answered with UnknownOperationException, and it reads a command payload and writes its reply as JSON text, where Floci added a Base64 layer. Floci now accepts that prefix alongside its existing one and exchanges the payload and reply as JSON text, so a stock agent can poll, run a command and report it.

Closes #9370
2026-11-25 07:52:39 -04:00
Priamo Germosen c9a4443f50 feat(iam): read Transfer Family from the generated tables (#9420)
Move `transfer` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Transfer Family requests are checked on
the resources they name instead of `*`: a server by its ServerId, as
server/<id>, and a user by its ServerId and UserName, as
user/<server-id>/<name>, the ARNs the service mints, and a tag call on its
Arn. No other namespace's rows change.

The resource a create makes now leaves open a variable its response
answers when its request carries no member of that name, an id the service
mints: ImportCertificate's certificate took its CertificateId from the
certificate body it imports, and ImportHostKey's host key its HostKeyId
from the key body. Across the table only those two rows change.
2026-11-25 07:24:59 -04:00
Priamo Germosen 74430d7d40 feat(iam): read Transcribe from the generated tables (#9388)
Move `transcribe` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Transcribe requests are checked on the
resources they name instead of `*`: a transcription job by its
TranscriptionJobName and a vocabulary by its VocabularyName, each by name.
The Service Reference lists no resource type for StartTranscriptionJob or
CreateVocabulary, which stay on `*`. No other namespace's rows change.
2026-11-24 22:26:15 -04:00
TATSUNO “Taz” Yasuhiro c1fdd98a6d feat(eventbridgev2): manage webhook event sources (#9321)
Adds CreateEventSource, DescribeEventSource, ListEventSources,
UpdateEventSource and DeleteEventSource for EventBridge V2 webhook event
sources. Each source gets a webhook URL and a Secrets Manager secret owned by
events-webhook; DeleteEventSource schedules it for deletion, and
DeleteEventBus refuses a bus that still has event sources. UpdateEventSource
replaces the whole webhook configuration and stores a new source.

Requests are checked against the generated eventbridgev2 request shapes, with
the violation wording and order AWS answers in us-east-1. A ListEventSources
token belongs to its Region, EventBusArn and NamePrefix, and the stored
configuration keeps only the members the model declares. The webhook URL does
not accept requests yet.
2026-11-24 20:35:04 -04:00
Jackson PriceandAndre Kurait 33d873b705 feat(apigateway): generate REST and WebSocket model templates (#9089)
GetModelTemplate now answers for REST and WebSocket models with sample VTL:
the $inputRoot line, two-space indented typed placeholders ("foo", 3.1415),
and an editable ##TODO / #foreach skeleton for arrays, generated from the
latest stored schema. A top-level scalar model is refused with 400
"Unsupported data type for mapping template", a missing WebSocket model with
404 "Invalid model identifier specified: <id>", and HTTP APIs refuse models
at CreateModel.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-24 16:42:19 -04:00
Niels Kootstra bc6a2279d4 fix(cloudformation): apply SSESpecification to a DynamoDB table on create (#9379) 2026-11-24 16:41:13 -04:00
Priamo Germosen 08b6339a6a feat(iam): read SageMaker from the generated tables (#9373)
Move `sagemaker` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so SageMaker requests are checked on the
resources they name instead of `*`: a model, an endpoint configuration, an
endpoint, a training job or any other resource by its name, as
<type>/<name>, the ARN Floci mints, and a tag call on its ResourceArn.
CreateEndpoint and UpdateEndpoint are checked on the endpoint and the
endpoint configuration they name. No other namespace's rows change.

The reading of a member that names a type's variable gains its mirror: for
the type an operation is about, a name or id with a word of its own that the
variable's name ends in names it, also where a create leaves its id open, so
SageMaker's JobName names the inference recommendations job
(${InferenceRecommendationsJobName}) of CreateInferenceRecommendationsJob,
DescribeInferenceRecommendationsJob and StopInferenceRecommendationsJob.
Over the whole table it changes these three operations.

CreateEndpoint marked neither of its rows as what it makes, as the stem of
`endpoint-config` is `endpoint` too, so a tagged create needed
sagemaker:AddTags on the configuration it runs as well as on the endpoint.
A create's type is now matched by its whole name before its stem, so the
endpoint alone is made; over the whole table this changes CreateEndpoint.
2026-11-24 16:16:17 -04:00
Jackson PriceandAndre Kurait f5849990e4 fix(cfn): show changed rows when schema verification fails (#9380)
Print a unified diff of the committed schema surface and the document
already used for verification. Keep verification read-only and retain its
nonzero result for changed or missing inventory files. Line endings are
kept in the diff and a missing final newline is marked explicitly.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-24 16:12:40 -04:00
Priamo Germosen 464aaaf734 feat(iam): read Route 53 Resolver from the generated tables (#9368)
Move `route53resolver` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Route 53 Resolver requests are checked on
the resources they name instead of `*`: a resolver rule, an endpoint or a
firewall domain list by its id, as <type>/<id>, the ARN the service mints,
and a tag call on its ResourceArn. The reference's DNSSEC configuration
format takes a ResourceId, which the request gives as the VPC's id, so the
DNSSEC calls are checked under the VPC's id.

A member whose botocore pattern is another service's ARN now holds nothing
of the namespace, read where every rule first reads the request's members:
CreateOutpostResolver's OutpostArn, an outposts ARN whose name begins the
outpost resolver's, had taken the place of the resolver it makes, which is
now checked as outpost-resolver/*. Over the whole table that rule changes
this one operation. No other namespace's rows change.

A managed firewall domain list, which AWS owns, was checked under the
caller's account, though the service gives it an ARN of its own, so a grant
on the ARN ListFirewallDomainLists returns was refused. Route 53 Resolver's
request-resource lookup now answers a managed list's ARN for its id, which
the reader already asks a service for for a resource filled from one
member; a custom list stays in the caller's account.
2026-11-24 12:36:27 -04:00
Priamo Germosen c24686a17d feat(iam): read MemoryDB from the generated tables (#9362)
Move `memorydb` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so MemoryDB requests are checked on the
resources they name instead of `*`: a cluster, an ACL or a user by its name,
as <type>/<name>, the ARN MemoryDB mints, and a tag call on its ResourceArn.

A cluster and a multi-Region cluster both call their format's variable
${ClusterName}, so the generator could not tell DeleteCluster's ClusterName
from its MultiRegionClusterName and read no cluster, and filled
CreateCluster's multi-Region cluster from the new cluster's ClusterName. One
generic reading fixes both: a type of one variable is read from the one
top-level member named after the type and ending in the variable's name,
where nothing reads it yet or instead of a member named after something
else, and only when no other type the action acts on could take that member
alone. Over the whole table it changes these two MemoryDB operations and no
other.

CreateCluster marked the multi-Region cluster it may join as what it makes,
so its tags were checked on that, or on its ACL when it names none, not on
the new cluster. Where the namespace has a type named as a create is, that
type, and one whose format's leading word is that name, is what it makes; a
type whose name merely ends in the same word is not, and a related type the
request names by a member of its own is one it joins, so the cluster it
makes is recorded for its tags. Over the whole table this also stops
ElastiCache's CreateReplicationGroup from marking the global replication
group it may join as made, and marks the global replication group
CreateGlobalReplicationGroup makes.
2026-11-24 10:56:22 -04:00
Priamo Germosen 0c4fa969e3 refactor(tools): run the ECR, Resource Groups and Logs delivery generators through request_shapes.main (#9356)
Three constraint generators still repeated the driver request_shapes.main provides: their own
argparse block, the strip_source comparison for --check and the write. They now hand it their
model, output and operations, the two-line delegation regen_sts_shapes.py and the other
constraint generators use.

The vendored files regenerate byte for byte, _source included. Resource Groups and Logs delivery
gain what the driver gives the rest: main() takes argv, so a test can drive it, --check names the
stale file instead of exiting 1 silently, and a write says where it wrote. The three join the test
that pins each constraint generator's call to the driver.

The driver's module docstring no longer says the three call build_constraints() themselves, and says
which generators take that path through main() rather than naming IAM and STS alone.
2026-11-24 09:42:55 -04:00
Priamo Germosen 3fbb0ced10 feat(iam): read Identity Store from the generated tables (#9315)
Move `identitystore` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Identity Store requests are checked on
the resources they name instead of `*`: the identity store its
IdentityStoreId names, and the group, user or membership its id names, whose
ARNs have no Region and no account; the list calls also on every group,
user or membership, as the Service Reference gives them.

A type an action requires that its request does not name is now read too.
Which types an action requires is what the Service Authorization Reference
marks with an asterisk, which neither botocore nor the Service Reference
says, so fetch_required_resource_types.py vendors that page's actions table
as it stands into tools/aws/sources/required-resource-types.json, granted
for Identity Store alone. Two generic readings use it: a required type the
record of the resource the request names holds is read through that
resource's id (DescribeGroupMembership and DeleteGroupMembership, the
membership's group and user), and a required type whose id a lookup returns
is found by the members its request gives, each way it may give them apart
(GetGroupMembershipId, GetGroupId, GetUserId). The reader lets a find name a
field of a structure at any depth and gives the service the members' paths
with their values, and Identity Store answers both as its handlers find
them. No other namespace's rows change.
2026-11-24 08:25:52 -04:00
TATSUNO “Taz” Yasuhiro 924040aaa1 chore(eventbridgev2): vendor event source request constraints (#9333) 2026-11-24 06:52:30 -04:00
Priamo Germosen 39290aa8be feat(iam): read ElastiCache from the generated tables (#9303)
Move `elasticache` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so ElastiCache requests are checked on the
resources they name instead of `*`: a cache cluster, a replication group, a
parameter or subnet group, a snapshot, a user, a user group or a serverless
cache by the identifier its request names, as <type>:<name>, the ARN
ElastiCache mints. The tag calls name their resource in ResourceName, which
the table does not read, and stay on `*`.

ModifyUserGroup is also checked on each user its UserIdsToAdd and
UserIdsToRemove name, as the Service Reference lists the user type for it:
a type the action acts on that no resource names yet takes its one variable
from a list named after it with ToAdd or ToRemove. Over the whole table this
changes ModifyUserGroup and no other operation.
2026-11-23 20:07:23 -04:00
mrfelek ad651873d6 feat(cloudformation): create and update AWS::EKS::Cluster with EKS Auto Mode (#9284) 2026-11-23 20:04:50 -04:00
Priamo Germosen d1ccad9344 feat(iam): read AWS DMS from the generated tables (#9302)
Move `dms` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py. The Service Reference gives every DMS type
an ARN format ending in a literal `*`, which the reader matches as written:
a request naming a subnet group by its identifier, or creating a
replication instance, is checked on that pattern (subgrp:*, rep:*), where
it was checked on `*`, and a request naming an endpoint, an instance or a
task by its ARN matches no format and stays on `*`.

The generator's rule for an optional ARN member a request leaves out took a
format with no variable for a single resource, so a CreateEndpoint or
ModifyEndpoint with no CertificateArn was also checked on cert:*. It now
skips a format ending in a wildcard, every resource of its type: of the
whole table, four DMS operations change and no other.
2026-11-23 18:54:51 -04:00
Priamo Germosen 422c78866d feat(iam): read AWS Config from the generated tables (#9296)
Move `config` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Config requests are checked on the
resources they name instead of `*`. A config rule's, configuration
recorder's and conformance pack's ARN ends in an id Config mints, which a
request naming one by its name does not carry, so ConfigStoredResourceArns
answers the table's lookups with the ARN Config stores it under; one Config
holds none of is checked on its name with the id open. The tag calls are
read from ResourceArn.

Two generic readings are added to the generator, changing Config's
PutAggregationAuthorization and PutConfigurationRecorder rows and no other
operation's: a format naming an account or a Region of its own beside the
ARN's takes them from the request's one account id member and its one
Region member, and a member filling one of the format's variables is no
longer also the ARN's account; and a type the request names but fills no
variable of takes its one name variable from the request's structure named
after the type (ConfigurationRecorder.name).

PutConfigRule now updates the rule its ConfigRuleArn names, else its
ConfigRuleId, else its ConfigRuleName, as the PutConfigRule reference lets
an update name its rule by any of the three, and refuses an ARN or id that
names no rule with InvalidParameterValueException. Finding the rule by name
alone let a request carrying one rule's id and another rule's name be
checked on the first and change the second.
2026-11-23 17:28:33 -04:00
Priamo Germosen 8a0903f42b feat(iam): read Comprehend from the generated tables (#9290)
Move `comprehend` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so its requests are read from the generated
request-resources table like the other namespaces'. The detection actions
Floci serves act on no resource type and stay on `*`, as AWS authorizes them;
the classifier, recognizer and endpoint operations are read by their ARN
members. No other namespace's rows change.
2026-11-23 14:10:49 -04:00