GetApiKeys ignored the name and customerId filters and returned every
key. name now keeps the keys whose name starts with it and customerId
the keys of that customer; the filtered keys are paged by limit and
position as before.
ApiGatewayRestApiPageCapTest and ApiGatewayApiKeyPageCapTest become one
parameterized ApiGatewayPageCapTest over the collections paged through
pageById.
StartMessageMoveTask was checked as sqs:StartMessageMoveTask alone, on both its SourceArn and its DestinationArn, so a
caller granted the permissions AWS requires was refused on the destination, and one granted the action alone on the
dead-letter queue was let through. ListMessageMoveTasks was checked as its own action alone.
The Amazon SQS developer guide's table of a dead-letter queue redrive's minimum permissions gives each task's actions
of each queue: "Add the sqs:StartMessageMoveTask, sqs:ReceiveMessage, sqs:DeleteMessage, and sqs:GetQueueAttributes
of the dead-letter queue", "Add the sqs:SendMessage of the destination queue", and "Add the sqs:ListMessageMoveTasks
and sqs:GetQueueAttributes of the dead-letter queue". The API reference names each queue's parameter: SourceArn "only
ARNs of dead-letter queues (DLQs)", DestinationArn "specify the destination queue". AWS's own fidelity check
(iam__sqs__sts/check_start_message_move_task_requires_composite_source_and_destination_permissions in
aws/aws-emulator-evaluation-suite) refuses a caller granted sqs:StartMessageMoveTask alone on the dead-letter queue,
naming sqs:ReceiveMessage on it, and lets the call through once the five are granted.
tools/aws/fetch_sqs_redrive_permissions.py copies the table's rows and those parameter sentences into
tools/aws/sources/sqs-redrive-permissions.json, a new PERMISSION_SOURCES entry, and the request-resources generator's
task_permission_resources reads it: the row naming the operation's own action, each action on the resource the rules
read from the parameter naming its queue, a queue the request names by no such parameter being the one the row names
the operation's own action of. --verify checks each row's actions against the Service Reference's AuthorizedActions.
Only StartMessageMoveTask and ListMessageMoveTasks change; CancelMessageMoveTask names its task by handle and keeps
its reading.
AWS's Auto Mode instances carry aws:eks:cluster-name and no karpenter.sh/nodeclaim tag (measured). Floci now writes aws:eks:cluster-name and no longer tags an instance with its claim's name: a pass finds each instance's claim by its status.providerID, as Karpenter matches them, else by the old tag on an instance launched before, else by the derived name, another derivation when an older instance's claim has it.
A claim whose launched status write failed keeps the name its launch chose, as claims Auto Mode doesn't manage and claims a provider ID places stay reserved, and with the claims unreadable a pass launches nothing, so a launch can't take a name already in use.
On macOS a listener bound to the wildcard address does not stop another
socket binding 127.0.0.1 on the same port, and a localhost dial then
reaches that socket, so the test's accept() waits for good. Classes on
the ports lock in READ mode run beside each other in the plain pass, and
two laptop passes hung this way in S3CopySimulatorTest. Linux refuses the
second bind, so CI was not affected.
The READ classes with such a listener, and FakeRespServer, which two more
use, now bind the loopback address: a ServerSocket, a JDK HttpServer or a
Vert.x server alike. ParallelLocksInventoryTest fails on a READ class, or
a helper it names, that opens a port-0 listener with no address, and
AGENTS.md states the rule.
RuntimeInitializationTest and RuntimeApiServerTest release a port and
start RuntimeApiServer on it, which binds every interface, so they take
the exclusive ports lock instead. The tests that dialed a listener on the
literal 127.0.0.1 now dial its bound address.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Connection and API destination reads by name went through the request
scoped store, which moves an entry the default account saved before
stores kept accounts apart into whichever account reads it. A call of
another account naming it took it into its own partition, and could then
read and change it, while the default account no longer found it; a
CreateConnection of that name in another account was refused as a
duplicate.
The by-name reads, find() and findApiDestinationByArn now move a legacy
entry only into the account its own ARN names, as the connection ARN path
already does.
A list scans the caller's own keys and reads each one back. When another
request deleted that entry in between, the read fell through to the bare
legacy key and moved the default account's entry into the caller's
account. The read back now goes through the same owner check as the
by-name reads.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
CloudWatchDashboardsServiceTest built the service over a store with the
same RegionResolver at nine sites. A serviceOver(store) helper holds that
construction once.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
S3 Tables accepted tags only at CreateTableBucket and CreateTable, so a
client could not read them back or change them.
The three operations are served on their modelled restJson1 routes,
POST, DELETE and GET /tag/{resourceArn}, for a table bucket's ARN or a
table's ARN. They read and change the tags the create operations store,
the same ones IAM reads for aws:ResourceTag conditions, so a tag set
with TagResource is what the next request's condition sees. The IAM
route and action tables already mapped the routes to
s3tables:TagResource, UntagResource and ListTagsForResource. Like S3
Tables' other routes, /tag is rewritten only for a request signed for
s3tables, so a path-style S3 request for a bucket named tag still
reaches S3.
A table keeps its tags through a rename, as its ARN ends in a minted id,
and tagging leaves its versionToken. An unknown table bucket answers
NotFoundException "The specified bucket does not exist.", and a table
ARN whose table or bucket is missing "The specified table does not
exist.", as AWS does.
TagResource refuses with BadRequestException a missing or non-object
tags member, a value that is not a string, a key beginning with aws:, a
key outside the tag character set, a key or value outside the modelled
lengths (in Smithy's validation wording), or more than 50 tags on the
resource counting the ones it already has. The aws:, character set, key
length and 50-tag messages are the ones AWS answers. CreateTableBucket
and CreateTable now apply the same rules to the tags they are given,
and no longer store a null or non-string value as its text.
TagResource and UntagResource build the new tags apart and restore the
old ones if the save throws, so a failed WAL write leaves nothing
visible to ListTagsForResource or IAM resource-tag conditions.
Tag condition keys come from generated data, and that table covers only
the IAM namespace, so S3 Tables' TagResource and UntagResource stay
without aws:RequestTag and aws:TagKeys, as most services' tagging
actions do.
AWS invokes a Lambda target with a JSON array of up to MaxBatchSize
events (10 by default), synchronously unless InvocationType is EVENT,
and with LambdaParameters.Qualifier resolved from each event. It checks
a Lambda TargetArn's form, then the Region and account of any target,
then that the parameter block is the target's.
A reset or deleting the subscriber drops the invocations still waiting.
AWS drops a waiting event only once it outlives the subscriber's
MaxEventAgeInSeconds or uses up MaxRetryAttempts, so a burst behind a
slow function is not cut at a fixed count.
Auto Mode's node pool guide: the sum of expireAfter and terminationGracePeriod can't exceed 21 days, and expireAfter can't be Never. The NodePool kind took a Never or 720h pool. It now has the three rules and messages AWS's NodePool kind has on an Auto Mode cluster, keyed on an eks.amazonaws.com NodeClass ref, and expireAfter's schema as AWS's (a 336h default and a duration-or-Never pattern); terminationGracePeriod's schema is Karpenter's published one.
A presigned or browser POST upload answered 204 whatever the form asked.
It now honors success_action_redirect and the deprecated redirect field
with a 303 whose Location is that URL plus bucket, key and etag query
parameters, and ignores a URL S3 cannot interpret, as AWS does. Without
a redirect, success_action_status 201 returns the PostResponse XML with
the object's absolute Location, 200 an empty body, and 204 or any other
value the default. The 201 Location follows the bucket the virtual-host
routing chose and the forwarded host and scheme.
SigV4Canonicalization.percentEncode now shares uriEncode's byte loop.
Set the existing-file permission fixture explicitly after creation so inherited umask does not change its precondition. Preserve the writer permission assertions and private profiling defaults.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The generated IAM condition key table had iam:AccountPropertyNamespaces in notRead on both actions the Service
Reference lists it on, so a policy keyed on it matched nothing: the IAM user guide's DenyRoleManagerEnablement
statement, ForAnyValue:StringEquals on RoleManager, let a caller enable role manager, and an Allow requiring the
namespace refused every call.
Neither botocore nor the Service Reference says where the value is; AWS's pages do. The IAM user guide's condition
key table: iam:AccountPropertyNamespaces "Specifies the account property namespaces being read or modified in the
request ... When you call PutAccountProperties or GetAccountProperties". The API reference on PutAccountProperties'
Properties: "Each key uses the format Namespace/PropertyName. The key must contain exactly one / separating the
namespace from the property name". tools/aws/fetch_iam_account_property_namespaces.py copies both sentences into
tools/aws/sources/iam-account-property-namespaces.json with what they name: the key, the operation, the parameter,
the format, its separator and the part that is the namespace. regen_iam_condition_keys.py takes that entry as it
stands, refusing it unless the Service Reference lists the pair and botocore models the parameter as a map of
strings, and writes it to a new fromMapKeys section, which the IAM context resolver reads from the request's map as
the operation's handler does. GetAccountProperties names no properties, so it stays in notRead.
Prepare the S3 observation spy before exposing it to application background callers. Retain the real delivery, original account and region assertion, and reverse cleanup, including restoring the original service.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Use the existing controlled timeline to cover the thread-state helper five-second timeout. Preserve public helper clocks, polling and completion behavior.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Reuse DeadlineWaits to test socket timeout and completion boundaries on a controlled timeline. Preserve the production monotonic clock, timed future wait and worker-ownership release behavior.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Use the retained stack when a resource read names its ID. This lets SDK
clients inspect the original resources after deletion or name reuse until
the configured retention window expires.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
SES v2 refused the headers it sets itself (From, To, Cc, Bcc, Subject,
Date, Message-ID, Reply-To, Return-Path, MIME-Version, Content-Type and
Content-Disposition, in any case) only in a SendEmail's
Content.Simple.Headers. Content.Template.Headers and the SendBulkEmail
default and replacement headers now refuse them too, with 400
BadRequestException "Header <Name> is not supported" and the name as
sent. On SendBulkEmail one refused header, default or in any entry,
fails the whole call. As probed on AWS, the refusal comes right after
the request shape, ahead of the sender, content and template data
checks, the destination count, the template and configuration set
lookups and the sender verification.
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.
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.
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.
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
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.
API Gateway's request-model lookup, the OTLP metrics endpoint and its
access-denied response filter still parsed the Content-Type header
themselves, and an empty or whitespace one throws there. They now read
it through ResteasyRequests.mediaType, which a new HttpHeaders overload
extends to resource methods, so a blank header acts as an absent one:
API Gateway validates against the application/json model, the OTLP
endpoint answers its 415, and a denial keeps its 403 and protobuf body.
ResourceArnBuilder handed ctx.getMediaType() to RequestBodyReader when
reading a JSON body, and the request context throws parsing a blank
Content-Type, so the read fell into its catch and a tag call's ARN in
the body went unread. It now reads the media type through
ResteasyRequests.mediaType, which takes a blank header as none, as the
request filters already do, and the body stays readable by the
handler.
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.
ScalingPolicyAlarmActionHandler read the cooldowns' time from
Instant.now(), so its tests could only get past a cooldown by clearing
the last scaling time. It now reads an injected Clock, the system UTC
clock outside tests, and the tests move a controlled timeline across
the scale-in, scale-out and default cooldown boundaries, checking one
second before and at the end of each.
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.
An npm publish forwarded to an upstream registered a routing-context
end handler, which replaced the response end and close handlers the
data plane released its Verdaccio sidecar use from. The use never
ended, so the repository's container outlived DeleteRepository, a
reset and Floci's shutdown. The use is now released through
addEndHandler.
A reset or nuke still leaves a sidecar running while admitted uses are
active, and now logs it. Shutdown stops it anyway: ContainerTeardown
gains beginShutdown(), which EmulatorLifecycle.onStop calls before
preparing any teardown, and the Verdaccio, Kellnr, BaGetter and
pypiserver leases then stop containers with uses still active, start
no new container, and wait for a start still building one so that its
container is stopped too.
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>
#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.
An exclusive ParallelLocks.PORTS holder runs alone and blocks every
READ holder in the concurrent plain pass. Eighteen classes held it
exclusively though none releases a port it binds or dials one it
expects to refuse: fifteen open no socket and only name an address such
as localhost:4566, and ElastiCacheBackendAclTest,
RedshiftInterceptingBridgeTest and SnsHttpsSubscriptionTrustTest bind
every listener on port 0 and dial it while they hold it. They now take
the lock in READ mode. PostgresProtocolHandlerTest stays exclusive.
Use the same request media-type reader in role inspection and error responses so an empty Content-Type does not hide the original error.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Only remove an in-service guest when Docker confirms its container has stopped or disappeared. Pass the probe result through EC2 so an unavailable Docker inspection leaves the membership and targets in place for the next check.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
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.