Commit Graph
5649 Commits
Author SHA1 Message Date
Andre Kurait d57fceb434 fix(docker): use non-blocking GELF delivery (#9317)
Docker's GELF driver now runs in non-blocking mode, so a listener outage
no longer blocks a container's log writes or skips the daemon's local log
copy. docker.md describes the default 1 MB delivery buffer and the live
console and CloudWatch Logs loss once it fills.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-23 22:19:17 -04:00
TATSUNO “Taz” Yasuhiro 99fa7b404e fix(dynamodb): refuse unknown functions and unused SearchVectors names (#9305)
SearchVectors now refuses unused ExpressionAttributeNames and ExpressionAttributeValues, and runs every check that needs no table, the 4 KB expression size limits included, before it looks up the table, in DynamoDB's order.

Every condition expression now refuses an unknown function name with DynamoDB's message, the name as written, so ATTRIBUTE_EXISTS(a) is refused like nope(a). Function names are not keywords, so size = :v reads size as an attribute name. The Step Functions putItem, updateItem, deleteItem and scan tasks, which skip the handler, get the same check.
2026-11-23 21:53:57 -04:00
Priamo Germosen c650bc098b fix(ecr): check lifecycle policies in ECR's stages, with ECR's messages (#9314)
PutLifecyclePolicy and an AWS::ECR::Repository's LifecyclePolicy now
check a document the way ECR's refusals show it does: the model's 100 to
30720 characters, the JSON, a JSON schema whose validator's text ECR
quotes with its trailing newline (types, required members, minimums, 50
rules, 10 prefixes, the count type and action alternatives), the mapping
onto ECR's rule types, then the user guide's rules in ECR's sentences
where they are known. Values must be spelled as the guide spells them,
an any rule must be the last of its storage class, and an archive rule
waits 90 days.

Part of #5874.
2026-11-23 21:46:15 -04:00
Priamo Germosen a1b96f5c3f fix(emr-containers): give a managed endpoint's Scala kernel Toree's magics (#9313)
Toree finds its built-in magics (%AddJar, %AddDeps, %LsMagic, %%sql,
%%dataframe and the rest) by scanning its own jar for plugin classes,
and its class finder reads each entry's name through a reflective call
to JarFile$JarFileEntry.getName(). The notebook image's Java 17 refuses
that call unless java.util.jar is open to the caller, so the scan
failed ("PluginSearcher: Failed to load class info from classpath",
an InaccessibleObjectException) and the kernel started with no magics.

- The Scala kernel spec exports JDK_JAVA_OPTIONS with
  --add-opens=java.base/java.util.jar=ALL-UNNAMED, after any value
  already set, before it runs spark-submit. Java reads the variable
  itself, so the image's spark.driver.extraJavaOptions stay as they
  are, where --driver-java-options would replace them. The option
  comes from EmrServerlessSparkRunner.javaBaseOpens, which now builds
  YARN's options from their package list too.
- The nightly check's Scala kernel adds a jar with %AddJar, then
  compiles a cell against a class in it. Its method's timeout grows by
  the two cells' four minutes, and the docker-runner group's with it.
2026-11-23 21:16:50 -04:00
Priamo Germosen 4198612422 fix(iam): refuse an account property namespace AWS does not recognise (#9307)
PutAccountProperties stored a property under any namespace whose key satisfied
the Namespace/PropertyName rule, where AWS answers InvalidInput 400 with
"Unsupported namespace: <namespace>", recorded against a real account on
2026-10-25 for a key naming an invented namespace. Accepting it was the worse
of the two ways to be wrong: one bad write left the account answering every
later GetAccountProperties with a key AWS would never have stored, and the
caller was never told.

The set the refusal is held to is published nowhere. Only RoleManager is named,
as an example, in the API Reference's own PutAccountProperties request, in the
user guide's role manager page and in the guide's policy example for
iam:AccountPropertyNamespaces, and the operation's model carries no enum for the
key. So the set is those three pages read together, kept as one set in IamService
to extend when AWS publishes another, and the cost is stated where it lives: a
namespace AWS recognises and has not written down is refused until the set names
it.

The namespace is matched as AWS spells it, and a request mixing two namespaces is
still answered for mixing them whether or not either is recognised, which leaves
every request that was already refused with the answer it already had. Both
readings are this package's own and the docs say so.

The wire tests and the SDK compatibility suite took a made-up namespace per
case so they could not read each other's properties. They now share the one
published namespace and keep that isolation in the property name, which is the
half nothing checks, and the SDK suite pins the new refusal through the SDK's
own model beside the codes it already pins.
2026-11-23 21:12:51 -04:00
Andre Kurait 6f5683d654 test(cloudformation): reuse physical ID fixture helper (#9312) 2026-11-23 20:50:32 -04:00
mrfelek e2964988b3 refactor(eks): one StorageConfig helper for whether block storage is on (#9306)
The check for whether EKS Auto Mode's block storage capability is on was
written out in requireCapabilitiesTogether, AutoMode.state(),
EksService.blockStorageOn and EksClusterManager.applyBlockStorage. It is
now one static StorageConfig.blockStorageOn, which all four use, and the
private EksService copy is removed. No behaviour changes.
2026-11-23 20:37:31 -04:00
Hector Ventura 2ee676ca6c feat(docker): opt-in log-driver mode for long-lived service containers' logs (#9236)
With floci.docker.log-driver-mode on (off by default), the long-lived service containers Floci attaches to are created with Docker's gelf log driver pointed at a TCP listener in Floci, and the daemon pushes each line instead of Floci reading the log on a timer. Flink TaskManagers and ephemeral RDS instances keep json-file.

Each container carries a random tag, as a label and in every message. A message whose tag no attached container claimed is dropped, and lines that arrive before the attach are held for it. The listener takes a fixed port, floci.docker.log-driver-port (12201), and opens before Floci starts any container, so a stopped container adopted after a restart starts again. A container created under another port or host is read on a timer from the daemon's local copy, with a warning. The listener accepts at most 1024 connections.

The json-file max-size and max-file settings map to the local copy's cache-max-size and cache-max-file.
2026-11-23 20:31:48 -04:00
Priamo Germosen 0cef64ebad fix(ecr): check lifecycle policies against the rules ECR documents (#9304)
PutLifecyclePolicy and an AWS::ECR::Repository's LifecyclePolicy now
refuse what the ECR user guide rules out: a tagged rule without exactly
one tag filter, filters on other statuses, more than four wildcards in a
pattern, unknown count types, a countUnit other than days for the since
types or any countUnit for imageCountMoreThan, a countNumber below 1,
storage classes and actions that do not fit the count type, an any rule
that is not last, two untagged rules and a prefix used by two rules in
one storage class. Refusals use ECR's message form and keep the prior policy.

Part of #5874.
2026-11-23 20:17:05 -04:00
Andre Kurait d4bbb1bf96 fix(cloudformation): apply target group health updates (#8948)
Updating a target group's health check settings through CloudFormation now applies them to the existing group through ModifyTargetGroup. The prior settings are saved before the change and restored on a failed provision or a stack rollback, independently of the target registrations, and a failed undo keeps its snapshot for a retry. Properties the template omits keep their values.

A change to the health check interval replaces the group's probe timer, keeping target health, and a superseded timer's callback is ignored.

Closes #8900
2026-11-23 20:09:29 -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
Matheus Oliveira 7a8445042b feat(cloudfront): connection groups for multi-tenant distributions (#9214) 2026-11-23 19:35:45 -04:00
mrfelek 9642d7573c feat(eks): serve EKS Auto Mode block storage with a provisioner named ebs.csi.eks.amazonaws.com (#9287) 2026-11-23 18:58:37 -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 9c21d7c64c feat(eks): mirror the cluster's and default account's AWS ECR hosts to Floci (#9297)
A chart written for EKS names its own account's images by the AWS
registry host, <account>.dkr.ecr.<region>.amazonaws.com. The
registries.yaml Floci gives a k3s node mirrored only Floci's localhost
forms, so containerd sent those pulls to AWS, where they fail.

The generated registries.yaml now also mirrors the cluster's and the
default account's registry hosts as AWS names them, across the regions
of the cluster's partition, under that partition's DNS suffix
(amazonaws.com.cn in the China regions). containerd still tries AWS
last, so an image Floci does not hold is looked for there. Other
accounts' registries, such as the ones EKS add-on images come from, and
public registries are not mirrored.

Floci's registry endpoint serves a mirror request whose ns names an
account's AWS registry host from that account's repositories in that
region, when the region belongs to the suffix's partition. A request
sent with an AWS registry host as its Host is not routed there.

A node now records the digest of the registries.yaml it was started
with in a label. When Floci starts, a surviving node whose label does
not match the registries.yaml Floci gives it now, such as one started
before these entries existed, is replaced on its data volume, as one
with another capacity is, so existing clusters get the new mirrors too.
It is kept while the registry is unavailable or the mirror is off.

EksVpcPodNetworkNightlyIntegrationTest, which #9288 added, now skips
without -Dnightly.checks.enabled=true, as every other nightly check
does, so a local test run with Docker no longer starts its k3s node.

Closes #5711
2026-11-23 18:53:24 -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 0dd02aed44 feat(emr-containers): run a managed endpoint's overridden kernels in containers of their own (#9293)
An endpoint's jupyter-kernel-overrides gives a kernel its own
container-image ("Custom kernel image with interactive endpoint"), and
on EMR on EKS each kernel is a pod of its image. A Floci endpoint ran
every kernel in its gateway's container, whatever image the overrides
named.

- The gateway job tells the gateway program which kernels the
  overrides give an image (python3 and spark-python-kubernetes, the
  kernels the guide's example names, as "You can't add new kernel image
  types"), where it asks Floci for their containers, and a secret Floci
  gives that gateway alone.
- EmrContainersKernelContainersRoute takes the gateway's POST and
  DELETE on /_aws/emr-containers/kernel-containers/<endpoint>/<kernel>.
  The service checks the secret, that the endpoint is ACTIVE and its
  overrides give the kernel an image, and the kernel id, response
  address and public key, then EmrContainersKernelContainers runs the
  kernel's container: the override image, with the gateway's settings
  and environment and the kernel's KERNEL_ variables, running the
  image's Jupyter Enterprise Gateway launcher (launch_ipykernel.py),
  under spark-submit with the %%configure magic for a PySpark kernel.
  A launch is admitted under the lock the gateway's end takes, so an
  endpoint's kernel containers all stop with its gateway, and a reset
  or Floci's shutdown stops every one.
- The gateway program gives such a kernel a jupyter_client provisioner
  that speaks the launcher's protocol: it asks Floci for the container
  with an RSA public key and a response address, decrypts the
  connection the launcher sends back (an AES key, under RSA, over
  AES-GCM), and polls, signals and stops the kernel through the
  launcher's comm port and Floci. It waits KERNEL_LAUNCH_TIMEOUT
  seconds, at most the guide's 400, or 400, and a launch that fails
  once the container was asked for stops it.
- Such a kernel's %%configure magic posts to its ENDPOINT_IP, the
  gateway, on port 9547 over TLS, with a certificate the image's openssl
  makes; the program checks it with the launcher's AES key, which each
  launch refreshes. Every restart, the kernels API's, the
  auto-restarter's or %%configure's, gives the kernel a new container
  with new ports and a new key, and the program moves the kernel's
  clients and its activity watch onto them.
- The nightly check gains a method: an endpoint that overrides both
  kernels with the release's own image runs each in its own container,
  the PySpark one counting an S3 file's lines and taking %%configure.
  The docker-runner group's budget grows by its eighteen minutes.
2026-11-23 15:32:02 -04:00
Priamo Germosen 8724146f3f chore(cloudformation): sync the schema surface with WAFv2 WebACL's new AnalyticsConfig (#9298)
AWS added AnalyticsConfig to the AWS::WAFv2::WebACL resource schema, so the
committed schema surface no longer matched AWS's archive. Regenerated it with
make cfn-schema-surface-sync, and recorded the new property in
writable-property-gaps.tsv as accepted and ignored, like the WebACL's other
unread properties, since WafV2CfnProvisioner does not read it.
2026-11-23 15:11:42 -04:00
Priamo Germosen d2a3e2624e fix(sts): read the session tags a request, an assertion and a token pass (#9289)
A session's tags are principal tags of its requests, "when you request a
session, you can specify principal tags as the session tags. The tags apply to
requests that you make using the session's credentials", and this package read
none of them. AssumeRole and GetFederationToken counted the Tags member toward
the token size and then dropped it, and the two operations that take session
tags inside a SAML assertion or a web identity token, where the model declares
no Tags member at all, had nowhere to take them from, so aws:PrincipalTag held
only what was stored on the user or the role.

A session records the tags it was minted with now, from wherever its own
operation takes them: the Tags member on AssumeRole and GetFederationToken, the
assertion's https://aws.amazon.com/SAML/Attributes/PrincipalTag:<key>
attributes on AssumeRoleWithSAML, and the token's https://aws.amazon.com/tags
claims on AssumeRoleWithWebIdentity, in both formats AWS reads those in, the
nested object under principal_tags and the flattened claims prefixed
https://aws.amazon.com/tags/principal_tags/. GetSessionToken and AssumeRoot
declare no way to pass one and record none.

What a request publishes is the identity's tags with the session's own over
them: the role's tags for a role session, and for a federated user the tags of
the user whose key minted it, where it carried none at all, "the session
principal tags include the user tags and the passed session tags". A session tag
"overrides the role" tag of the same key, matched without case as IAM matches a
tag key on a user or a role, "not case sensitive, but case is preserved", so the
session's own spelling is the one published.

One value per tag: "you must pass a single value for each session tag" and STS
"does not support multi-valued session tags". The published nested example
writes each value as an array holding one string and the flattened format as a
plain claim, so both are read, while a tag carrying more than one value is left
unread rather than cut down to its first.

A role's trust policy has to permit the tagging as well as the assume: "trust
policies for all roles connected to the identity provider passing tags must have
the sts:TagSession permission. For roles without this permission in the trust
policy, the AssumeRole operation fails." All three assume operations read their
own trust policy for that action when the request, the assertion or the token
carries a tag, with the same principals and conditions as the assume, and answer
AccessDenied naming it. Without that reading a caller the policy lets assume a
role could choose the principal tags downstream permissions are conditioned on,
which is the whole point of the permission. The caller's own half was already
here, the generated tagging table requiring sts:TagSession of a request that
carries Tags, so a tagged AssumeRole is held to both policies and a tagged
GetFederationToken to the caller's alone, having no trust policy to read.

A tag that is not one key with one value is refused rather than read as the
first value or dropped: an attribute with several AttributeValue elements or
none, an attribute whose name ends at the colon, and a token claim that is
neither a string nor a one-element array. Nothing published says what AWS
answers a malformed session tag, so those sentences are this package's own, and
a tag a policy would have been evaluated with cannot go missing quietly. An
assertion's value is stored as it was signed, spaces included, where trimming it
would hand a policy a value the provider never asserted. Two tags of one request
whose keys differ only in case are one tag, the later winning, as a tag key on
an identity is: kept as two they would reach a policy as one key with the
other's value dropped, and a Deny on that value would stop matching.

Session tags are state the token carries, "session policies and session tags add
to the session token size", so they count against the limit and into what the
session reports. The two operations that take them from a message measure that
once the assertion or the token has been verified, which is the first point the
tags exist, rather than before the operation runs where the declared members are
read.

Two published pieces are left, named on the page rather than guessed at here.
The transitive tag keys beside the tags are not read, so no tag passes into a
chained session, which is AWS's own default and leaves only the opt-in missing;
a key stored unread would have said otherwise. And the plaintext limits a
session tag is held to are read where the model declares the members that carry
them, which leaves the number and the length of a tag inside an assertion or a
token unchecked, nothing published saying what AWS answers there; what does hold
them is the token size.

Covered end to end under enforcement by a session tag that decides a call and
overrides the role's tag of that key, by one that brings a Deny on, by a caller
whose trust policy permits the assume but not the tagging, and by a federated
session whose tag is the whole of what decides it; over the API by a signed
assertion whose attributes reach the session, by a spaced value kept as signed,
by an attribute carrying no single value and one naming no key, and by a tag set
too large for the token it would be carried in; at the service level by the
merge, the case-insensitive replacement within a request and across the
identity's tags, and the federated user's two halves; on the handler by the Tags
member reaching the session it mints, by the token's tags counting toward what
the session reports, and by the long-term session recording nothing; and on the
token verifier by both claim formats, a multi-valued tag, a tag with no key and
a token that passes none.
2026-11-23 14:35:14 -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
Priamo Germosen e82be2c5f5 feat(eks): give pods addresses from the VPC prefixes their node holds (#9288)
Pods got k3s's flannel addresses (10.42.0.0/16), which nothing outside
the node reaches, so a target group with TargetType ip, which the AWS
Load Balancer Controller registers, never saw a healthy target.

With floci.services.eks.vpc-pod-network, pods now take their addresses
from the /28 prefixes their node holds, as the VPC CNI's prefix
delegation gives them. k3s starts without flannel and its network
policy controller, with the VPC's range as its cluster CIDR, and the
node's entrypoint sets up the rest before k3s starts: the CNI plugins
the image ships, linked where containerd looks with flannel off, a
bridge holding each prefix's gateway address, host-local handing out
the prefixes, proxy ARP on the interface holding the node's VPC
address, as the VPC delivers a prefix's traffic to its interface, and
SNAT for traffic leaving the VPC only. Inside the VPC pods keep their
own addresses, so Floci's health checks and load balancers reach them.

The IMDS and Pod Identity rules for pod traffic match the prefixes
instead of 10.42.0.0/16. A surviving node started with another pod
network, or with prefixes it no longer holds all of, is replaced on its
data volume, as one with another capacity is. disable-cni, or a node
without an address or prefix in a Docker-backed subnet, keeps k3s's
own network, with a warning.

Closes #5929
2026-11-23 14:10:18 -04:00
jwoa95 374b5f5c8e fix(cognito): answer UsernameExistsException when AdminCreateUser's username is taken in a UsernameAttributes pool (#9286) 2026-11-23 13:48:58 -04:00
Vũ Thế Huy 5807e901a4 feat(redshift): add streaming materialized views over Amazon MSK (#9206)
CREATE MATERIALIZED VIEW over a topic of an MSK external schema, REFRESH MATERIALIZED VIEW, DROP MATERIALIZED VIEW and DROP SCHEMA ... CASCADE now work, with the transaction, AUTO REFRESH YES, JOIN and aggregate guards of the Kinesis views. The topic's staging table has Redshift's eight Kafka columns.

A refresh positions each partition itself by manual assignment and a seek, reads up to the end offset the partition has when the refresh starts, and saves per-partition checkpoints only after the batch statement commits. Each view reads through its own consumer group. The first refresh starts at the earliest offset, and a partition that ends before its checkpoint is read again from its beginning.

With IAM enforcement on, CREATE and REFRESH check kafka:GetBootstrapBrokers on the cluster and, with AUTHENTICATION iam, kafka-cluster:Connect, DescribeTopic, ReadData, AlterGroup and DescribeGroup on the cluster, topic and group ARNs. A missing cluster fails with 42704, a cluster without a running broker or an unreachable broker with 58030, and a missing topic with 42P01.

KafkaRestClient.partitionOffsets reads a partition's beginning and end offsets. StreamingViewSupport holds the source lock, drop, unbind and batching shared by the Kinesis and MSK views, and DROP SCHEMA of an MSK schema holds a schema lock so no view is created while it runs.

Closes #7814
2026-11-23 13:35:08 -04:00
Aditya f72a1e535e fix(cloudformation): apply and clear Policy on AWS::SQS::QueuePolicy (#9216) 2026-11-23 13:34:48 -04:00
Priamo Germosen 172a785d85 feat(iam): read CloudWatch from the generated tables (#9282)
CloudWatch was not read by the generated request-resources table, so under
IAM enforcement every CloudWatch request was checked on `*`: a grant scoped
to one alarm was refused and a deny scoped to one never applied.

Move `cloudwatch` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py. The table reads an alarm from AlarmName or
each of AlarmNames as alarm:<name>, a dashboard from DashboardName or each
of DashboardNames with no Region in its ARN, a metric stream from Name or
each of Names, and a tag call from ResourceARN: the ARNs CloudWatch mints.
Metric data and the list calls name no resource and stay on `*`. No other
namespace's rows change.
2026-11-23 13:02:40 -04:00
Priamo Germosen 199ee18a6b fix(sts): publish the two members that replace PackedPolicySize (#9280)
Every response that mints a session declares the size of the token it hands
back and the share of the limit that size consumes, and this package published
neither. SessionTokenSize is "the size, in bytes, of the session token returned
in the Credentials for this response" and SessionTokenUtilization "the
percentage (0-100) of the maximum allowed session token size that the returned
session token consumes", which is word for word the definition of the
PackedPolicySize they were deprecated in favour of on 2026-06-17, and the guide
tells a caller to read the new one: "the SessionTokenUtilization response
element shows what percentage of the size limit the token uses. The
PackedPolicySize response element is deprecated."

All six operations that mint a session carry the pair: AssumeRole,
AssumeRoleWithSAML, AssumeRoleWithWebIdentity, AssumeRoot, GetFederationToken
and GetSessionToken. The four that carry state into their token declare the
deprecated member as well and publish all three, that one ahead of the pair and
holding the same percentage, so one number is published twice over. AWS's own
example responses are that shape: 1428 bytes with 34 in both percentage
members, 1105 with 26, and 856 with 20 on GetSessionToken, whose response
declares no deprecated member at all. The percentage truncates, as all three of
those pairs and the one pair recorded here report it.

The size published is the measure a session is refused by rather than the
length of the string in Credentials. AWS packs the session's state into the
token it hands back, so the two are one number there, while this package mints
an opaque token and keeps the state beside it, and a size read off that string
would tell a caller the session cost nothing while the same request was refused
for being over the limit. AssumeRoot answered that string's length, which on an
operation carrying no state is the same number, and reads the one measure now.

What that measure counts is the state the operation declares, read from the
generated request shapes rather than from whatever parameters a request
carries, which is what publishing a size on the two operations that declare
none asked for. A session tag reaches AssumeRoleWithSAML and
AssumeRoleWithWebIdentity inside the assertion or the token rather than as a
member of the request, so a tag sent to either no longer costs its token
anything, and a document or a tag sent to GetSessionToken or AssumeRoot costs
nothing either.

The IAM page carries the three members, which response declares which, the
published pairs behind the truncation, and why the size is the measure rather
than the string in Credentials. The STS page's privileged-session section no
longer counts its size member among that operation's deviations, nor says the
percentage goes unanswered: it publishes the pair the reference defines, as the
other five do.

Covered over the API by the three members on an assumed, a federated and a web
identity session, by the pair alone on the long-term session and on the
privileged session, by all three on a SAML session where the signing fixture
lives, and by a request whose undeclared parameters cost it nothing; at the
handler by the pair on each operation that harness can reach, by the deprecated
member appearing only where its response declares it, and by the declarations
the measure turns on, so a regenerated file that stopped carrying an operation
is caught there rather than by a session quietly reporting its token alone; and
on the exchange that declares none of the three, which publishes none.
2026-11-23 12:29:55 -04:00
Priamo Germosen fad1093175 fix(s3): name the caller and the policy that refused it in S3's access denied message (#9281)
S3 answered a refused request with "User is not authorized to perform:
s3:GetObject", while the CloudTrail data event recorded a message of
its own that named the access key as the user (user/AKIA...) and always
gave "no identity-based policy allows" as the reason, even for an
explicit deny. A copy's source, a presigned POST and the other
resources a service checks apart from the request were refused with
that same message.

S3's guide says a refusal within the bucket's account or organization
names the caller, the resource and the type of policy that refused it,
that CloudTrail logs the same context, and that a request from outside
the organization gets "Access Denied" alone. Both refusals now build
the message as the other refusals in IamEnforcementFilter do: the
caller's ARN and the reason firstRefusal gives, or a bucket policy's
explicit deny, through AccessDeniedMessages.notAuthorized. S3 answers
with it and CloudTrail records it, and a caller from another
organization is told "Access Denied", judged on the bucket's owner as
the decision resolves it, since a presigned POST names none. S3 Control
keeps its own envelope
and wording. The resources Redshift, Secrets Manager and SSM check
apart from the request name the caller the same way.

CloudTrailLogFiles also reads through a signing filter, for a test
where S3 checks signatures.
2026-11-23 12:25:43 -04:00
Priamo Germosen ac844769fb feat(emr-containers): let a browser's CORS preflight reach a managed endpoint's gateway (#9283)
A browser sends its CORS preflight (OPTIONS) without the session token,
and Jupyter Enterprise Gateway 2.6.0's TokenAuthorizationMixin checks
none for it ("if server_token and not self.request.method ==
'OPTIONS'"). Floci's proxy asked one of every request, so a preflight
to a managed endpoint's serverUrl got 401.

- SessionServers.routeWithoutToken routes a call that carries no token
  to a running server, in that server's own account and Region, as a
  call of its session: empty where no server runs, refused while the
  owner refuses calls.
- EmrContainersService.gatewayPreflightRoute is that route for an
  endpoint's gateway, and the proxy takes it for an OPTIONS request,
  passing the gateway no session header. An endpoint with no gateway
  running still answers 401, one that is not ACTIVE 503.
- The nightly check sends a preflight without a token and gets the
  gateway's 200 with its Access-Control-Allow-Methods.
2026-11-23 12:25:11 -04:00
Priamo Germosen 20e0ca6946 feat(eks): lease VPC /28 prefixes onto the cluster node's interface (#9279)
The Amazon VPC CNI plugin's prefix delegation hands a node IPv4 /28
prefixes of its subnet, listed on the node's network interface, and the
AWS Load Balancer Controller finds the interface behind a pod address
by looking for the prefix that holds it.

With floci.services.eks.vpc-pod-network, a node holding an address in a
Docker-backed subnet now also leases vpc-pod-prefixes /28 prefixes of
that subnet, two by default, as a node running pods holds under the VPC
CNI's default WARM_PREFIX_TARGET of one. DescribeInstances and
DescribeNetworkInterfaces list them on the node's interface in
ipv4PrefixSet.

EC2 leases a prefix from the top of the subnet down, clear of the
subnet's last address and of every address something holds, Docker's
own container addresses on the VPC network included, and counts its
sixteen addresses as held, so no instance or interface gets one and
AvailableIpAddressCount leaves them out. The node keeps its prefixes
across a restart as it keeps its address, re-reserving them; an adopted
node leases no new ones, and a stopped or failed start gives them back.

Part of #5929
2026-11-23 12:24:45 -04:00
galsuchetzky-act 5909ff5b80 test(dns): preserve advertised resolver in host listener checks (#9277) 2026-11-23 11:44:06 -04:00
mrfelek 2219ec72c2 fix(iam): check OpenSearch's, S3 Tables' and EKS's list calls on the resources AWS checks them on (#9258)
es:ListDomainNames, s3tables:ListTableBuckets and eks:ListClusters act on no resource type in the Service Reference, so Floci checked them on * and refused a policy scoped to domain/*, bucket/* or cluster/*. AWS checks each on that wildcard, as measured in #9039.

Each is now a MEASURED entry of the request-resources generator with that measurement as its evidence, and the table is regenerated with only these three operations changed.

Part of #9039.
2026-11-23 11:22:21 -04:00
Priamo Germosen 5c7ab956f9 feat(emr-containers): run the Scala kernel on a managed endpoint's gateway (#9276)
Interactive endpoints "support the following kernels: Python 3, PySpark
on Kubernetes, Apache Spark with Scala" (EMR on EKS Development Guide,
"Overview of interactive endpoints"). A Floci endpoint's gateway had no
Scala kernel.

- The gateway program writes a spark-scala-kubernetes kernel spec,
  "Apache Spark with Scala", a name of Floci's beside the guide's
  spark-python-kubernetes, as the guide gives the Scala kernel none. It
  runs the image's Apache Toree, beside Jupyter Enterprise Gateway's
  Scala launcher, under spark-submit as Toree's own kernel spec does:
  org.apache.toree.Main with the connection file as its profile, after
  KERNEL_EXTRA_SPARK_OPTS. Its spark is a Spark session in Spark's
  local mode on Floci's S3, as the PySpark kernel's is.
- The docs move the Scala kernel out of "Not emulated yet", and the
  endpoint role every kernel runs with out of it too: "All kernels and
  users that connect to the interactive endpoint utilize the role that
  you specified when you created the endpoint".
- The nightly check lists the new kernel spec and counts an S3 file's
  lines in the Scala kernel. Kernel start, connection and deletion
  become helpers. The method's timeout and the docker-runner group's
  budget grow by its four minutes.
2026-11-23 11:20:15 -04:00
Priamo Germosen 39fbc98efe feat(eks): give the cluster node instance its primary network interface (#9273)
An EKS node's primary network interface carries the cluster security
group, and the AWS Load Balancer Controller reads both from the node's
instance: it finds the interface behind a pod address there and opens
the target's ports on that group. Floci's node instance had neither.

A node holding an address in its subnet now has a primary interface
there, at that address, holding the cluster security group, and the
instance holds the group too. A node without one, whose address is then
its container's on another network, has no interface. DescribeInstances
reports them, and DescribeNetworkInterfaces lists the interface as it
lists an instance's launch-created one, with the same filters. Its ids
derive from the cluster, so they survive a restart.
ModifyNetworkInterfaceAttribute and the IPv6 address calls on it are
refused with OperationNotPermitted, as the node's lifecycle actions are,
and the cluster security group cannot be deleted while the node holds
it.

EC2 keeps a copy of the node once an action such as
ModifyInstanceAttribute is stored. The copy now keeps only what such
actions change: its interfaces are its own, so a change no longer
reaches the record the cluster serves, and the node's address, subnet
and interfaces follow the cluster, which may replace the node. The copy
is stored only while the cluster serves the node. Deleting the cluster
ends the node in EC2 as terminating it would: the copy is dropped, and
volumes attached to the node are detached, or deleted when their
DeleteOnTermination is set. Otherwise the copy would stay a running
instance holding the cluster security group, and the volumes in use.

Part of #5929
2026-11-23 11:04:27 -04:00
Priamo Germosen 4897db0bad refactor(iam): drop the empty HAND_BUILT list and the reader's hand-built check (#9272)
With IAM read from the generated tables, no namespace is built by hand and
HAND_BUILT is empty. Remove it from the request-resources generator (the
tuple, the file's handBuilt key, and the clauses reading a hand-built
namespace's operations only where MEASURED gives them) and from the reader
(RequestResources.builtByHand, the parsed table's handBuilt set, and the
clauses of readsNamespace and IamActionRegistry.checkedAsAws that asked it).

Every operation's resources are unchanged: the generator's offline check
regenerates the same file, without the empty key.
2026-11-23 11:03:51 -04:00
Kenshin Okinaka da661523ae test(ses): build v2-only SES test requests with SesV2Requests.v2() (#9274) 2026-11-23 11:01:41 -04:00
Priamo Germosen 86ef90b99c feat(emr-containers): cull a managed endpoint's idle kernels by its jeg-config (#9275)
An endpoint's configurationOverrides take "the additional
classification jeg-config", whose allow-listed settings are
RemoteMappingKernelManager.cull_idle_timeout and
RemoteMappingKernelManager.cull_interval (EMR on EKS Development
Guide, "Jupyter Enterprise Gateway (JEG) configuration options"). A
Floci endpoint's gateway read neither.

- The gateway job passes those two properties of the endpoint's
  jeg-config classification to the program as its arguments
  (--RemoteMappingKernelManager.cull_idle_timeout=<value>), a later
  classification's winning; other jeg-config properties go nowhere.
- The program's kernel manager is now named RemoteMappingKernelManager,
  as Jupyter Enterprise Gateway's is, so the settings reach it under the
  names the guide gives them, and jupyter_server's culler shuts down a
  kernel idle that long, checking every interval.
- EmrContainersSparkJobs.properties reads any classification of a
  configurationOverrides, sparkDefaults now through it.
- The nightly check gains a method: an endpoint whose jeg-config sets a
  10-second idle timeout culls a python3 kernel left idle within a
  minute. The docker-runner group's budget grows by its seven minutes.
2026-11-23 10:47:51 -04:00
Kenshin Okinaka 7b2e60cfe0 fix(ses): check the template name of a send as SES does (#9271) 2026-11-23 10:36:52 -04:00
Priamo GermosenandJeremy Chapeau 64f74c6bc4 feat(iam): record IAM API calls in CloudTrail (#9263)
CloudTrail logs every authenticated IAM API request, but Floci recorded
none, so a trail showed no user, key or policy change. Each IAM call now
reaches the logging trails that select it as a management event: the
calls IAM runs, the ones it answers with an error, and the ones IAM
enforcement refuses. requestParameters carries the request's members as
the IAM model types them, responseElements the result of a call that is
not read-only, without sensitive members, and the record carries the
caller's address, read through RequestSourceAddress, and user agent. An
error IAM models is recorded under its error shape's name
(NoSuchEntityException). A refusal, on IAM's policies or because a
GetSessionToken session without MFA cannot make the call, is recorded
as AccessDenied with "requestParameters": null and the message and
request ID of the response the caller receives. The caller is read
before the call runs, so a key that deletes itself is recorded as its
user's, and every call reaches the account's event history whether or
not a trail records it. Basic selectors' ReadWriteType now matches a
management event's readOnly.

IAM is a global service, so only a trail with IncludeGlobalServiceEvents
records its calls, as botocore's CloudTrail model says of the setting.

Which calls are read-only is generated from the Service Reference into
iam-action-resources.json (readOnlyActions). How members are named,
typed and redacted, and each error's shape name, are generated from
botocore's IAM model into iam-cloudtrail-shapes.json through
request_shapes, the walk every vendored shape file shares, which now
keeps an operation's result and its wrapper, the sensitive flag and the
modeled errors when a generator asks for them. Both files are checked
by make aws-data-check.

The integration test reads the trail's log files through
CloudTrailLogFiles, calls CloudTrail through CloudTrailRequests, both
now in io.floci.aws.testing with an Authorization a test under IAM
enforcement signs with, and calls IAM through QueryRequests.

Closes #9013

Co-authored-by: Jeremy Chapeau <jeremy.chapeau@gmail.com>
2026-11-23 10:35:36 -04:00
TATSUNO “Taz” Yasuhiro 946d1392a5 feat(dynamodb): accept range, IN, OR and NOT in SearchVectors conditions (#9257)
SearchVectors now accepts ranges, <>, IN, attribute_exists, attribute_not_exists, OR and NOT on INLINE_FILTER attributes, with ranges and BETWEEN on Number attributes only. The HASH attribute still takes one = condition reached through AND only. Each refusal names the broken rule with DynamoDB's message, in DynamoDB's order.

FilterExpression and ConditionExpression now refuse an attribute_exists or attribute_not_exists with more than one operand or without a document path.

The attribute type lookup moves to TableDefinition.attributeType, replacing the copies in DynamoDbService and DynamoDbAccessPathValidator.
2026-11-23 10:19:49 -04:00
Priamo Germosen b57b55025a feat(emr-containers): run %%configure on a managed endpoint's PySpark kernel (#9262)
EMR Studio's "Modifying PySpark session parameters" has a PySpark
kernel's %%configure "adjust the Spark configuration associated with a
PySpark session"; the endpoint's operations count it as ConfigureKernel
("Monitoring interactive endpoints"). A Floci endpoint's PySpark kernel
had no such magic.

- The PySpark kernel loads the image's own magic, configure_magic.py,
  beside Jupyter Enterprise Gateway's kernel launchers. It turns its
  cell's settings into KERNEL_EXTRA_SPARK_OPTS, refusing reserved ones,
  and posts them with the replies that end the cell to
  localhost:18888/api/kernels/configure/<kernel id>, signed with the
  AES key in its ADDITIONAL_INFO.
- The gateway program's kernel manager gives each kernel its KERNEL_ID
  and an AES key of its own, as the image's launcher does, keeps its
  launch environment, and drops an ENDPOINT_IP the endpoint's Spark
  defaults would pass on, which would send the magic elsewhere.
- The program serves port 18888 on the container's loopback alone: for
  a post signed with the kernel's key, it restarts the kernel, keeping
  its id, with the new KERNEL_EXTRA_SPARK_OPTS in place of the old, and
  once the restarted kernel answers, sends the prepared replies to the
  clients connected to it, as the restart takes the kernel down before
  it can. A kernel that dies first, or does not answer in
  jupyter_server's restart time, ends the cell with an error instead.
  A kernel's posts take their turn.
- The nightly check runs a %%configure cell, then reads the restarted
  kernel's Spark settings. Its timeout and the docker-runner group's
  budget grow by its four minutes.
2026-11-23 10:19:11 -04:00
galsuchetzky-act 319d96db30 refactor(firehose): remove unused constraint formatter (#9266)
S3DestinationValidator.constraintSet(String) lost its last caller when the mapping checks moved to SmithyValidationErrors.constraintSet in #9256.

Closes #9265
2026-11-23 10:08:11 -04:00
mrfelek 16c2505a25 feat(eks): turn EKS Auto Mode on and off with UpdateClusterConfig (#9264)
UpdateClusterConfig accepts computeConfig, storageConfig and kubernetesNetworkConfig.elasticLoadBalancing together as one AutoModeUpdate family. The cluster stores the result for DescribeCluster, and the update is recorded for DescribeUpdate and clientRequestToken replay.

A member the request omits keeps its stored value, and the request is checked against the configuration it leaves: the three capabilities on or off together, node pools named with a node role, the node role unchanged while compute stays on, and a request that changes nothing refused with "No changes needed for EKS Auto Mode configuration provided". An omitted node role keeps the stored one, so {"enabled": true, "nodePools": []} turns off the built-in node pools as in the AWS user guide.

Other kubernetesNetworkConfig and elasticLoadBalancing members, gatewayApi among them, are refused as unsupported. A null node pool is refused on CreateCluster and UpdateClusterConfig instead of failing with a server error.

Part of #8914.
2026-11-23 10:06:24 -04:00
Kenshin Okinaka a7d3108134 test(ses): build inline SES v2 test requests with SesV2Requests.v2() (#9267)
The SES integration tests that mix v1 and v2 requests built their v2 requests inline with the JSON content type and SesV2Requests.AUTH, which is what SesV2Requests.v2() already returns. They use it now. The requests sent are unchanged.
2026-11-23 10:02:58 -04:00
glorfindel33 44988ca51b refactor(s3): keep the KMS key-id rule in one place (#9261) 2026-11-23 09:54:52 -04:00
Priamo Germosen 3f2cd7198e feat(emr-containers): list only the kernels a managed endpoint's session token started (#9251)
A managed endpoint's gateway listed every kernel it ran to any session
token, where ListKernels is "Request that the interactive endpoint list
the kernels that have been previously started using the same session
token" (EMR on EKS Development Guide, "Monitoring interactive
endpoints").

- The proxy passes the gateway the SHA-256 of the token a request
  carries, in a header of Floci's own, in place of the token, and drops
  one the client sent.
- The gateway program's kernel manager records the digest a kernel was
  started with, whether the kernels API or the sessions API started it,
  and drops the record when the kernel goes, whether a request, the
  culler or the kernel's death removes it.
- GET /api/kernels answers with the kernels started with the request's
  digest alone, and GET /api/sessions with the sessions holding them.
  Any of the endpoint's tokens still reaches a kernel or a session by
  its id, as the guide scopes only the listing.
- The nightly check starts a session beside its PySpark kernel, lists
  both kernels and the session with the token that started them, and
  nothing with another token of the endpoint.
2026-11-23 08:42:02 -04:00
galsuchetzky-act 711d9ea887 refactor(common): share remaining map key messages (#9256)
Builds the remaining hand-written map key constraint messages with
Violations.mapKeys: Firehose mappings, SES v2 filters, both Lambda Web
key checks, Lambda tags and IoT authorizer token signing keys. The
messages are unchanged.

Closes #9255
2026-11-23 08:28:48 -04:00
Priamo Germosen a4b2f01713 feat(iam): read IAM from the generated tables, its paths, signing user and renames from the user guide and API reference (#9252)
IAM is read from iam-request-resources.json now, and ResourceArnBuilder's
IAM branch, the last hand-built namespace, is gone: HAND_BUILT is empty.

What botocore and the Service Reference do not say comes from the IAM
User Guide's identifiers and the IAM API reference, vendored by
fetch_iam_identifiers.py into tools/aws/sources/iam-identifiers.json and
read under PERMISSION_SOURCES.

- A user, group, role, instance profile or server certificate a request
  names by its name is checked on the ARN IAM stores it under, path
  included (IamStoredResourceArns.find), and one IAM does not hold on its
  name under the root path.
- A create is checked on the name its request gives after the Path it
  gives (path), as the identifiers say the API's creates take one.
- UpdateUser, UpdateGroup and UpdateServerCertificate are also checked
  on the resource under its new name and path (renames), as their API
  reference says the caller needs permission on both.
- The twenty operations whose API reference says they act on the user
  signing the request when it leaves out UserName, and ChangePassword,
  are checked on that user (signer), which the new
  StoredResourceArns.signedBy hook gives for the signing key.
- A virtual MFA device is named by its SerialNumber, which the API
  reference gives as its ARN; the access key, SSH public key and
  service-specific credential operations name the user owning what they
  name, and GetServiceLinkedRoleDeletionStatus the role its task
  deleted (IamStoredResourceArns.through).
- MEASURED gives UpdateDelegationRequest, which the Service Reference
  does not list, the request its DelegationRequestId names, citing its
  API reference ("that owner gets a default permission to update the
  delegation request") and the user guide's temporary delegation page.
- CreateServiceLinkedRole is checked on role/*, CreateDelegationRequest
  on delegation-request/* and CreateOpenIDConnectProvider on *, as the
  table gives them. CreateOpenIDConnectProvider refuses an
  IdentityCenterInstanceArn that is not the ARN of an IAM Identity
  Center instance, with InvalidInput.
- Bedrock's ListTrustedAccessPrograms is checked as
  bedrock:CallWithBearerToken, as the Service Reference now authorizes it.
2026-11-23 08:23:04 -04:00
Vũ Thế Huy dee5f3c59b fix(redshift): resolve unqualified external functions through the session search_path (#9196) 2026-11-23 08:22:53 -04:00
Priamo GermosenandJeremy Chapeau f093a0bc6e fix(cloudtrail): take sourceIPAddress from the connection (#9254)
CloudTrail's sourceIPAddress is the address a request was made from.
Floci took it from the first X-Forwarded-For entry whenever a request
carried one, so any client could choose the address its S3 calls, and
the S3 calls IAM refused, were recorded from. It now comes from the
connection, read in one place, RequestSourceAddress, which the S3
controller and the IAM enforcement filter both call. Behind a reverse
proxy, Quarkus's proxy settings (proxy-address-forwarding,
allow-x-forwarded, trusted-proxies) make the address a trusted proxy
forwards the source address, and only that proxy's. Quarkus takes the
first address in X-Forwarded-For, so the CloudTrail page says the proxy
must replace a client-sent header rather than append to it.

The integration test reads the trail's log files through
CloudTrailLogFiles, which follows the listing across pages, and calls
CloudTrail through CloudTrailRequests, which the CloudTrail tests that
kept their own copy of that call now use too.

Closes #9116

Co-authored-by: Jeremy Chapeau <jeremy.chapeau@gmail.com>
2026-11-23 08:10:52 -04:00