Commit Graph
2906 Commits
Author SHA1 Message Date
mrfelek 3909e10e2e fix(eks): accept a cluster's unchanged ipFamily and serviceIpv4Cidr in UpdateClusterConfig (#9715)
UpdateClusterConfig refused every kubernetesNetworkConfig member other
than elasticLoadBalancing, so turning EKS Auto Mode on through the
Terraform AWS provider failed: its update carries the cluster's current
ipFamily and serviceIpv4Cidr beside elasticLoadBalancing. The cluster's
own values are now accepted unchanged, ipFamily in any case. Another
value for either is still refused, as EKS sets both only when it creates
a cluster and Floci doesn't change them.
2026-11-29 07:46:07 -04:00
Vũ Thế Huy 2e707b4b4b feat(redshift): enforce UNLOAD access-key credentials (#9713) 2026-11-29 07:46:02 -04:00
Priamo Germosen adf1dced94 docs(sts): a transitive tag overrides the chained role's tag after its trust policy (#9733)
sts.md said Floci did not implement "transitive session tags replace matching ResourceTag values after the evaluation
of the role trust policy". It does, and the IAM user guide's own chain spells out what the rule means: "the inherited
Star = 1 session tag overrides the role Star = 3 tag". The role's trust policy is read with the role's own tag,
aws:ResourceTag/Star of 3, and the session it mints carries the inherited 1 as aws:PrincipalTag/Star, a session tag of
a key shadowing the role's tag of that key as any session tag does.

PrincipalTagEnforcementIntegrationTest now runs the guide's chain: a trust policy requiring aws:ResourceTag/Star = 3
allows the chained assume, and the session is allowed by aws:PrincipalTag/Star = 1 and not denied by = 3. The guide's
"if you try to pass the Sun = 2 session tag, the operation fails" does not follow from the published rule and is
still not refused.
2026-11-29 02:21:16 -04:00
Priamo Germosen 6f22b84977 fix(iam): read federated trust policies with the shared condition engine (#9728)
The trust policies of AssumeRoleWithSAML and AssumeRoleWithWebIdentity were read by two condition evaluators of their own, each taking only StringEquals, StringNotEquals, StringLike and StringNotLike: a statement using a set operator (ForAllValues on aws:TagKeys, ForAnyValue on an audience), an IfExists operator or Null never allowed the assume, a negated operator never matched a key the request does not carry, and SAML read a claim under any prefix, so other:sub read the assertion's sub.

Both now read each statement's Condition with IamPolicyEvaluator.conditionMatches, as AssumeRolePolicyEvaluator does, against a context holding the claims under their full keys (the Service Authorization Reference's saml: keys for an assertion, the issuer's prefix for a token), sts:RoleSessionName, the role's tags, the request tags and the source identity. Each keeps its own Federated principal and action matching; the hand condition code is gone.

A token's <issuer>:aud holds the one audience the token was accepted for, the one the response returns as Audience, wherever the token's list names it: the Service Authorization Reference types the key String, a single value. A multivalued key such as aws:TagKeys takes a set operator, as in every other policy, and a negated operator over an empty list of values holds, the NOR of no values.
2026-11-29 01:19:38 -04:00
Chang Liu fd6fff87be fix(ec2): log user data output to /var/log/cloud-init-output.log (#9433)
EC2 user data now appends each part's stdout and stderr to /var/log/cloud-init-output.log in the guest, as cloud-init does on AWS. The guest log keeps the full output; Floci's own 2048-byte summary line is unchanged.

The script still runs as a command, so its shebang selects the interpreter. A POSIX shell wrapper merges stderr into stdout, tees both into the log, and carries the script's exit status on a dedicated file descriptor, so Floci reports the script's code rather than tee's. The script runs with those descriptors closed, so a background service it starts cannot keep the status pipe or the exec stream open. If the guest has no tee or a read-only /var/log, the wrapper falls back to running the script directly and warns on stderr. The EKS caller of the shared UserDataPipeline keeps its current path.

Closes #9386
2026-11-29 00:16:55 -04:00
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
mrfelek f30e649c7f fix(eks): leave an existing cluster's node unlabelled when EKS Auto Mode turns on, as AWS does (#9716) 2026-11-28 23:17:07 -04:00
Vũ Thế Huy 3c97fbe849 feat(redshift): support COPY FORMAT AS PARQUET (#9637) 2026-11-28 23:12:22 -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
Jackson PriceandAndre Kurait 91b29ccdd6 fix(lambda): protect versions referenced by weighted aliases (#9711)
DeleteFunction with a Qualifier refused a version only when an alias
named it as its FunctionVersion, so the second version of a weighted
alias, listed in its RoutingConfig's AdditionalVersionWeights, could
be deleted from under it. A version an alias references either way now
answers ResourceConflictException (409), as the API reference says a
version an alias references can't be deleted, and deleting it succeeds
once the alias no longer routes to it.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-28 22:39:46 -04:00
TATSUNO “Taz” Yasuhiro e92bbf66dc feat(eventbridgev2): refuse reserved tag keys and more than 50 tags on create (#9709)
#9686 refused tag keys with the reserved aws: prefix, and more than 50
tags, on TagResource only. CreateEventBus, CreateSubscriber and
CreateEventSource, and a CloudFormation update of a bus or a
subscriber, now refuse them too, in the order measured on AWS: a
reserved key answers AccessDeniedException (403) right after the
request constraints, ahead of the name clash, the ClientToken replay
and the bus lookup, and more than 50 tags answers
LimitExceededException (400) after those checks, and before a
ClientToken mismatch when the token named another resource. A refused
create stores nothing and makes no secret or managed rule.
2026-11-28 22:38:53 -04:00
Matheus André 10855b0023 fix(transcribe): keep tags on create and serve the tag operations (#9700) 2026-11-28 22:37:05 -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 75f5ec3136 fix(iam): read the tags an AssumeRole passes in the role's trust policy (#9689)
Under enforcement a role whose trust policy conditions the assume or sts:TagSession on aws:RequestTag/<key> or aws:TagKeys refused every tagged AssumeRole, and a Deny keyed on them never applied: STS built the trust policy's context by hand, with the session name and external ID alone. The Service Reference gives sts:AssumeRole both keys, and the IAM user guide's session tags page has a trust policy reading them: with aws:RequestTag "you can allow the principal to pass the specified session tags, but only with the specified values", and with aws:TagKeys "pass only session tags with the specified tag keys".

The trust policy's context now takes the request's keys from the generated tables, as the caller's own policies do: the members request-condition-keys.json gives sts:AssumeRole, its RoleSessionName and ExternalId, and the tags iam-tag-on-create.json reads from its Tags, as aws:RequestTag/<key> and aws:TagKeys. The assume and the sts:TagSession permission are each checked once for every set of tags a reading of the list gives, past a gap in its numbering or with each value of a key sent twice, as the enforcement filter checks the caller's policies, so a Deny on a tag holds however the list is sent. The filter's per-set helper moves to IamConditionContextResolver beside requestContextsOfForm, which STS calls, and formParameters shares its first-value reading with it.

Both read the list as STS does. TagOnCreate read sts: tags under Tags.member up to the first gap, while STS reads them through AwsQueryLists, Tags.member.N or the bare Tags.N at every index, so a tag sent as Tags.1, or after a gap, reached the session and not the check, and a policy requiring it refused a call AWS allows. sts: is now read through the shared reader, as iam: is, and the shared reader takes the members in the order of their indices, as AwsQueryLists gives them, so a key sent twice keeps the value the handler keeps.

Part of #6640.
2026-11-28 19:27:26 -04:00
Jackson PriceandAndre Kurait 661854b0a7 fix(config): require a delivery channel before recording (#9684)
StartConfigurationRecorder marked a customer managed recorder as
recording, with a new start time, even when its account and Region had
no delivery channel. It now refuses that start with HTTP 400
NoAvailableDeliveryChannelException, "Delivery channel is not
available to start configuration recorder.", and leaves the recorder's
status as it was, as AWS does. A missing recorder still answers
NoSuchConfigurationRecorderException first. The start and
DeleteDeliveryChannel take the same recorder lock, so a concurrent
delete can't leave a recorder running without its channel.

Co-authored-by: Andre Kurait <akurait@amazon.com>
2026-11-28 18:39:36 -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
Jackson PriceandAndre Kurait e36c5a39e3 fix(cloudformation): reconcile API Gateway V2 credentials (#9685)
Apply integration and authorizer credential ARNs during stack creation and updates. Clear only credentials removed from previously declared template properties, preserve externally configured values, and restore integration credentials during rollback. Preserve current integration subtype defaults and rollback behavior.

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-28 18:39:09 -04:00
mrfelek eef1ccc4dc fix(ec2): write every instance's operator, and on each DescribeInstanceStatus item, as AWS does (#9683) 2026-11-28 17:55:48 -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
mrfelek 01564bd94c fix(eks): expire EKS Auto Mode NodeClaims at Auto Mode's 21-day maximum node lifetime (#9670)
An EKS Auto Mode NodeClaim whose expireAfter was Never, longer than 21
days, missing or unreadable never expired, where Auto Mode terminates
an instance once it has lived its 21-day maximum lifetime. A claim now
expires at the earlier of its expireAfter and 21 days from its
creation. A claim whose creationTimestamp can't be read still doesn't
expire, and an unreadable expireAfter is logged.
2026-11-28 16:09:47 -04:00
mrfelek faa4892239 feat(ec2): hide managed instances from list and filter calls unless IncludeManagedResources asks for them (#9501) 2026-11-28 15:50:40 -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
mrfelek f5457a2516 feat(eks): expire EKS Auto Mode NodeClaims after their expireAfter, as Karpenter does (#9634) 2026-11-28 14:32:17 -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
TATSUNO “Taz” Yasuhiro 31d2222c93 feat(eventbridgev2): encrypt the webhook secret with KmsKeyIdentifier (#9661)
#9321 stored a webhook event source's KmsKeyIdentifier without using it. The source's secret is now created with that key, an UpdateEventSource that changes it re-encrypts the secret, and one that leaves it out or sets "" returns the secret to the AWS managed key aws/secretsmanager. A key that does not exist answers AccessDeniedException with KMS_KEY_NOT_FOUND, and an AWS managed key, or a key ARN of another Region or account, answers InvalidInputException, each at the point AWS checks it.
2026-11-28 10:20:52 -04:00
Allen Sanborn 6ff7b0fdd9 fix(iam): match AWS wording for missing and duplicate entity errors (#9098)
IAM's wording for missing and duplicate entities now matches what AWS answers. A duplicate CreatePolicy is "A policy called <name> already exists. Duplicate names are not allowed.", and a permissions boundary that names no policy, on CreateUser, CreateRole, PutUserPermissionsBoundary or PutRolePermissionsBoundary, answers "Scope ARN: <arn> does not exist or is not attachable.". A version id that names nothing on a policy that exists is named inside the attach sentence on GetPolicyVersion, DeletePolicyVersion and SetDefaultPolicyVersion, inline policies read "The user|group|role policy with name <name> cannot be found.", and instance profiles read "Instance Profile <name> ...". The wording tests share IamWordingRequests, which registers every create with PartitionCleanup.
2026-11-28 09:14:58 -04:00
Oleksandr Nikolaichuk a36725ec2d feat(iam): evaluate ResourcePolicy on SimulatePrincipalPolicy for a user source (#9583)
SimulatePrincipalPolicy ignored ResourcePolicy, so a simulation answered from the identity policies alone. For an IAM user source the supplied resource policy is now evaluated through the same decide the enforcement path uses, with CallerArn, which defaults to the source user, as its principal, and its condition keys counted in MissingContextValues. Each resource's owner is the account its ARN names, otherwise ResourceOwner, otherwise the caller's account, and RoleResourceAccessAuthorizer.relationship picks the same- or cross-account rules. A role source still ignores it, as the reference says resource-based policy simulation isn't supported for roles, and CallerArn is held to its declared length.
2026-11-28 08:40:11 -04:00
mrfelek 885874f5a4 feat(eks): name EKS Auto Mode nodes by their instance ID, as AWS does (#9631)
An EKS Auto Mode node was named by its instance's private DNS name, as
managed node groups' nodes are, where AWS names Auto Mode's nodes by
their instance ID. The Ready node Floci registers for an Auto Mode
instance now takes the instance ID as its name and its
kubernetes.io/hostname label, and keeps the private DNS name as its
InternalDNS and Hostname addresses, as on AWS. Node DNS answers and
forwarding rules still use the private DNS name.

A cluster kept from before this change has its Auto Mode nodes under
their private DNS names. Once such a node registers again under its
instance ID, Auto Mode's stray-node sweep deletes the DNS-named node,
only when its provider ID is that instance's, whether the instance is
live or terminated.
2026-11-28 08:34:59 -04:00
Hector Ventura e20b3ff8dc fix(cognito): refuse user pool custom domains in the China Regions (#9644) 2026-11-28 08:27:25 -04:00
Niels Kootstra 28d6d2997f fix(cloudfront): preserve tenant parameter definitions (#9647)
CreateDistribution, GetDistribution and GetDistributionConfig dropped a
distribution's TenantConfig.ParameterDefinitions. They are now parsed,
stored and returned, with DefaultValue and Comment kept as sent and a
numeric Required (1 or 0) read as an XML boolean. The TenantConfig
subtree is read as a bounded stream: more than five definitions,
CloudFront's quota for parameters per multi-tenant distribution, or
nesting deeper than 32 levels is refused with InvalidArgument.

Closes #9580
2026-11-28 08:24:27 -04:00
TATSUNO “Taz” Yasuhiro c5dddb8c2f fix(iam): read the tags of EventBridge V2 buses, subscribers and event sources (#9627)
EventBridge's storedTags answered only event-bus and rule ARNs, so aws:ResourceTag conditions on EventBridge V2 buses, subscribers and event sources saw no tags, and a Deny keyed on a tag never matched. EventBridgeService now hands an event-busv2, subscriber or event-sourcev2 ARN to EventBridgeV2Service, which reads the tags through findEventBus, findSubscriber and EventBridgeV2EventSources.lookup in the account and Region the ARN names. With V2 disabled or absent the answer stays empty.
2026-11-28 08:15:09 -04:00
Kenshin Okinaka 0b5448e17a fix(ses): refuse the headers SES sets itself on a v2 simple send (#9633)
SES v2 SendEmail accepted any additional header on a simple message,
but SES refuses the ones it sets itself. A Content.Simple.Headers entry
named From, To, Cc, Bcc, Subject, Date, Message-ID, Reply-To,
Return-Path, MIME-Version, Content-Type or Content-Disposition, in any
case, now answers 400 BadRequestException "Header <Name> is not
supported" with the name as sent, ahead of the configuration set lookup
and the sender verification. Other headers are accepted as before.
2026-11-28 08:11:41 -04:00
Jackson Price 171f42ce6e fix(rds): acknowledge instance creation before database startup (#9599)
CreateDBInstance waited for the Docker backend before answering, so a
client with the SDK's default timeouts could retry a create that had
already succeeded and get DBInstanceAlreadyExists. It now stores the
instance and answers creating, as AWS does. DescribeDBInstances sees the
record while a background worker starts the container and proxy outside
the instance lock, and the worker publishes the backend only if the same
instance is still creating.

ModifyDBInstance and RebootDBInstance refuse a creating instance with
InvalidDBInstanceState and AWS's messages. A delete accepted during
startup keeps the record and the caller's backup choice until the worker
has torn down what it started, and after a restart Floci reopens the
PostgreSQL volume to save a retained backup before removing it. A state
reset waits up to 15 seconds for pending starts and otherwise refuses
with 503 from checkReset, before any container stops.

Signed-off-by: Jackson Price <jxnprice@amazon.com>
2026-11-27 22:48:48 -04:00
TATSUNO “Taz” Yasuhiro 904ae0203a feat(eventbridgev2): forward AWS service events to event buses (#9595) 2026-11-27 18:55:01 -04:00
mrfelek ea85a11c44 feat(eks): stop launching EKS Auto Mode nodes at a NodePool's limits, and show its nodes in its status (#9538) 2026-11-27 18:23:39 -04:00
Hector Ventura f06f1e7fd8 fix(cloudmap): answer a resource by id only in the region it was created in (#9622)
Cloud Map lists were filtered by region, but every operation that names a namespace, service or operation by id or ARN fetched it by the bare id, so a request signed for one region read, changed or deleted another region's resource. AWS keeps Cloud Map resources per account and region. GetNamespace, DeleteNamespace, CreateService, GetService, DeleteService, the instance operations, GetOperation and the tag operations now answer a record only in the region recorded for it, with the not-found error each operation declares (NamespaceNotFound, ServiceNotFound, OperationNotFound, ResourceNotFoundException). A record stored without a region is answered in every region, as it was.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-27 18:16:58 -04:00
Hector Ventura e4fa93d7c3 fix(s3): redirect a request signed for another Region than its bucket's (#9606)
S3 answers a bucket only in its own Region. A SigV4 request signed for
another Region now gets 301 PermanentRedirect with the bucket's Region in
x-amz-bucket-region and Bucket and Endpoint in the error, and a HEAD gets
the status and header with no body, which is what the SDKs' redirect
handling follows. ListBuckets, GetBucketLocation and CreateBucket are served
from every Region, and unsigned, presigned and SigV4A requests and buckets in
another partition are served as before. A bucket stored without a Region is
redirected from the default one, where ListBuckets reports it.

floci-duck now signs each bucket's requests for that bucket's Region through
temporary DuckDB secrets that end with the request, so Athena, S3 Select,
Redshift and the CUR reports keep reading and writing buckets outside the
default Region.

floci.services.s3.region-redirect (FLOCI_SERVICES_S3_REGION_REDIRECT,
default true) turns the redirect off.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-27 17:53:43 -04:00
Niels Kootstra 498986be7a fix(appconfig): apply Tags given to CreateApplication and CreateEnvironment (#9592) 2026-11-27 17:52:47 -04:00
Matheus André 661808b384 fix(apigateway): paginate GetRestApis with limit and position (#9617) 2026-11-27 17:47:21 -04:00
mrfelek 7db72767e3 feat(eks): keep a NodeClaim for each EKS Auto Mode node, as Karpenter does (#9537)
Each EKS Auto Mode node now has a karpenter.sh/v1 NodeClaim, as Karpenter
keeps one on AWS, so kubectl get nodeclaims and tools that watch claims see
Auto Mode's nodes.

The claim is named after its pool with a five-character suffix, chosen at
launch so no other instance's claim has it and kept in the instance's
karpenter.sh/nodeclaim tag. It is owned by its NodePool, held by the
karpenter.sh/termination finalizer and labelled as its node is. Its spec
carries the pool's requirements, its pods' requests, and expireAfter and
terminationGracePeriod (336h and 24h0m0s when the pool doesn't say). Its
status goes Launched, then Registered, Initialized and Ready once the node
joins.

A claim whose instance is gone loses Karpenter's finalizer and is deleted, and
a missing one is made again without a new launch. Deleting a claim drains and
removes its node and terminates its instance, as deleting a pool does. A
NodePool being deleted launches nothing more. Only claims labelled
app.kubernetes.io/managed-by: eks are touched.
2026-11-27 17:25:22 -04:00
Priamo Germosen 33ca50abe8 feat(rds): serve a DB proxy's endpoints at their own addresses in its VPC (#9598)
With floci.services.rds.endpoints-in-vpc on, a DB proxy's default endpoint
is served at its own address in the first of its subnets, under the name
RDS gives it, <proxy>.proxy-<identifier>.<region>.rds.<dnsSuffix>, and each
endpoint added to it at its own address in its own subnets, under
<endpoint>.endpoint.proxy-<identifier>. Each serves the engine family's
port, as "all proxies listen on port 5432 for PostgreSQL" and "on port
3306 for MySQL", so two proxies can both serve 5432; a relay forwards to
the proxy's listener, which takes a free port in the proxy range.

DescribeDBProxies and DescribeDBProxyEndpoints report the names, which
Floci's DNS server answers as soon as the proxy or endpoint exists. An IAM
token generated for any of a proxy's endpoints is good at the proxy, and
the proxies' certificate covers the names. A renamed endpoint answers by
its new name. Deleting an endpoint or the proxy removes its names and then
its relays; one Docker does not confirm removed stays tracked, keeping its
port from other databases, until Floci stops or restarts. A restart serves
them again at the addresses they had, and moves them in or out of the VPC
as the setting now says.

RdsEndpointAddresses gains a relay and name API for endpoints that are not
an instance's, with a best-effort discard, and reaches() replaces
namesCluster() for both clusters and proxies.

Closes #6273
2026-11-27 15:12:47 -04:00
Hector Ventura c15207b7e0 fix(apigateway): leave the regional fields off edge-optimized domains (#9605)
An edge-optimized custom domain reports only its CloudFront distribution: the AWS CLI's create-domain-name example 1 (an EDGE domain) returns distributionDomainName and distributionHostedZoneId and no regional field. Floci wrote regionalDomainName and regionalHostedZoneId, and any regional certificate, on every domain. They are now serialized for regional domains only; the stored regional name is kept, because the custom domain filter still routes on it.

The two routing tests that address a domain through its .regional.local host now create a REGIONAL domain. The GetDomainNames assertion now finds the domain under item, and a new case creates an EDGE domain with a regional certificate name and ARN and checks that CreateDomainName, GetDomainName and GetDomainNames leave all four regional fields off. The custom-domain guide no longer says every domain reports a regionalDomainName and both certificate ARNs.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-27 14:41:31 -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
Vũ Thế Huy 004ceb7b09 feat(docker): reach a daemon named by an ssh:// Docker host through an SSH tunnel (#9531) 2026-11-27 11:57:00 -04:00
Andre Devay ab71c20cda fix(apigateway): page GetUsagePlanKeys by limit and position (#9594)
GetUsagePlanKeys ignored limit and position and returned every key attached to the plan in one response. It now pages with the same id-ordered pageById helper and pageResponse envelope GetUsagePlans and GetAuthorizers use: 25 keys by default, 500 at most, limit=0 rejected, position on nonterminal pages only, and an unknown position rejected with BadRequestException. GetUsage and the data plane keep the unpaged list.

Closes #9062
2026-11-27 11:05:39 -04:00
Priamo Germosen 9c5f57808a feat(rds): serve a DB cluster's instances in its VPC and resolve its endpoint names to them (#9590)
With floci.services.rds.endpoints-in-vpc on, each instance of an Aurora DB
cluster gets its own address in its VPC, as a standalone instance does, and
serves the cluster's port, which the API reference says "is managed by the
cluster". The cluster reports the names the Aurora user guide gives its
endpoints, <cluster>.cluster-<identifier>, <cluster>.cluster-ro-<identifier>
and <endpoint>.cluster-custom-<identifier>, and Floci's DNS server resolves
them to the instances as Aurora points them: the cluster endpoint to the
writer, following a failover; the reader endpoint to another instance, or
the writer when none is served; a custom endpoint to one of the instances it
holds, picked at random, and none once its static members are all deleted.
Answers live five seconds, the TTL of Aurora's DNS zones. A Multi-AZ DB
cluster, whose instances Floci does not create, and an Aurora Serverless v1
cluster, which has none, keep the proxy endpoint.

The names are routed again whenever a cluster's instances, writer or custom
endpoints change, under one lock, and are restored at restart. An IAM token
generated for any of a cluster's names is good at each of its instances, and
the proxies' certificate covers the names. StopDBCluster removes the
instances' relays and StartDBCluster serves them again; a failed instance
create forgets its name and leaves the names as they were; a cluster
restored from a snapshot serves the snapshot's port.

Refs #6273
2026-11-27 10:17:04 -04:00