Exempt a banned keyword from the APPSYNC_JS subset scan only in an object-key position, after a { or , and before its :, so { class: "allowed" } runs while cond ? this : null is still refused. Adds regression cases for template text after a hole, whose scanning landed in #7343.
Closes#7240
* fix(eks): let guest kubelet own worker node registration
Honor an explicit image catalog capability on initial join and replay. Preserve simulated registration by default and retain join bookkeeping and listeners.
Closesfloci-io/floci#7419
* test(eks): clean up the kubelet registration worker independently
Retain the launched instance ID and terminate it in the original account and region. Attempt worker, tracking and cluster cleanup independently and verify the worker reaches terminated state.
The SNS HttpClient used the JDK default version, HTTP_2, so every http:// delivery carried an h2c upgrade offer (Connection: Upgrade, Upgrade: h2c), which AWS SNS never sends. Servers that accept the upgrade read an empty request body. Pin the client to HTTP/1.1, as HttpProxyInvoker already does.
Closes#7426
* fix(ec2): honor CreateRoute DryRun before mutation
Check CreateRoute DryRun before resolving or writing routes. Cover valid and missing NAT targets, signed IAM allow and revocation, rejected signatures, unchanged routes and normal creation through the SDK.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* test: share AWS client key-pair configuration
Reuse AwsTestClients for caller credentials in EC2 DryRun and SSM ARN permission fixtures. Preserve explicit endpoints, signature rejection and authorization assertions.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(bedrock-agentcore): add the harness control plane
CreateHarness, GetHarness, UpdateHarness, DeleteHarness, ListHarnesses and ListHarnessVersions were
unknown, so aws_bedrockagentcore_harness could not be created. Harnesses are stored per Region with a
name-<10 alphanumerics> id and settle in READY at once. Each update appends an immutable version, and
members a create leaves out take the defaults AWS fills in, including an AgentCore Runtime
environment named harness_<name>. Tags work on harness ARNs through the shared /tags route.
InvokeHarness moves into the new /harnesses controller unchanged: a request is matched against one
root resource class, so the data-plane controller rooted at / would no longer see /harnesses/invoke.
* fix(bedrock-agentcore): match a harness role ARN with AwsArnUtils.PARTITION_REGEX
* fix(bedrock-agentcore): serve InvokeHarness from a data-plane class of its own
InvokeHarness sat in the control plane's /harnesses controller, so it inherited its JSON-only
@Produces (an Accept: application/vnd.amazon.eventstream request was refused with 406) and was gated
by no service flag, since the controller was missing from ResolvedServiceCatalog.
It now has its own class rooted at /harnesses/invoke, the more specific root, registered with the
data plane, and the harness controller is registered with the control plane.
* refactor(bedrock-agentcore): share one random id suffix helper
The harness registry, and the memory, tools and gateway services before it, each carried their own copy
of the alphanumeric alphabet and the random suffix builder. One random(alphabet, length) and
randomAlphanumeric(length) in BedrockAgentCoreControllerSupport now serve all four; the gateway keeps
its lowercase alphabet for gateway ids.
Record SignIn events for USER_PASSWORD_AUTH, ADMIN_USER_PASSWORD_AUTH,
ADMIN_NO_SRP_AUTH and USER_SRP_AUTH on pools with the Plus feature plan
and threat protection in AUDIT or ENFORCED mode, and list them newest
first with MaxResults and NextToken paging. Other pools get
UserPoolAddOnNotEnabledException. A wrong password is Fail, a sign-in
interrupted by a challenge stays InProgress until it ends in tokens, and
no EventRisk is reported since Floci performs no risk evaluation.
Events are matched to their pool and user by the stored owner, not the
key prefix alone, and a sign-in that ends after its user is deleted
records nothing.
Closes#6137
* fix(rds): restore a postgres snapshot on an image that creates a template database at startup
* test(rds): clean up the template restore test's instances and snapshot even when it fails
* test(rds): build the template restore test's requests with RdsRequests
Run archive replay in a fresh duplicated Vert.x context seeded from its own account and region, so the initiating request ending cannot invalidate delivery. Ordering, cancellation and ARN parsing are unchanged.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(redshift): add PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy
aws_redshift_resource_policy could not be created: the provisioned Redshift API had none of the three operations. They now take the ARN of a Redshift Serverless namespace or a provisioned cluster, the targets of a zero-ETL integration, matched exactly in the caller's account and Region. The policy is kept on its namespace or cluster, so it goes with the resource, and is stored and echoed, not evaluated.
* feat(redshift): return resource policies and their errors as AWS does
Checked against AWS with read-only GetResourcePolicy calls: a stored policy comes back with Version and
Statement first and each statement's Effect, Principal, Action, Resource and Condition first,
pretty-printed, so it is now stored in that form. A namespace that does not exist answers "The requested
namespace doesn't exist."; an ARN in another Region, a namespace id that is not a UUID and an ARN of any
other resource type are InvalidParameterValue with AWS's messages, not UnsupportedOperation.
Adds an SDK compatibility test for the three operations.
* fix(redshift): keep a namespace's resource policy across updates
The Namespace copy constructor, used by tagging, untagging and UpdateNamespace, did not copy the
resource policy, so any of them dropped it. findClusterByArn now reads the ARN through AwsArnUtils.
Without a Version, GetResourcePolicy reached Elastic Load Balancing, which defines the name but does
not serve it; it now goes to Redshift.
* fix(redshift): refuse an empty resource policy before looking the resource up
Enforce ElastiCache IAM authentication's engine version floor (Redis OSS 7.0, Valkey 7.2), in-transit encryption and IAM user ID rules on create and modify, and refuse an AuthToken with TransitEncryptionEnabled=false. TransitEncryptionEnabled no longer implies IAM authentication.
Refs #4502
* fix(cloudformation): delete a stack whose create is still running only once the create stops
* fix(cloudformation): leave a deferred delete to the execution it waits on and report its failure
* fix(cloudformation): refuse a new execution once a delete has been deferred
* test(cloudformation): wait for stack statuses with the shared CfnStackWaits helper
Replace incidental dispatch waits with observable completion and preserve failure-path cleanup of each shutdown-race client and server. Retain existing race assertions and coverage.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
EmrDockerRunnerDockerIntegrationTest had no case for Spark on the Glue
Data Catalog, which needed #7329's Glue fixes. A cluster whose
spark-hive-site names the Glue client factory, as the Management
Guide's example does, now runs a PySpark step that creates a database
and a partitioned table in Floci's Glue, inserts into it, reads it back
and writes what it counted to S3. The test checks that each row came
back once (the client reads a table's partitions in five segments) and
that Floci's Glue holds the table's partitions, so the step used the
Glue catalog rather than a metastore of its own.
The class also left its buckets and its EMR Serverless application in
the emulator it shares with the profile's other two classes, and the
new case would have left a Glue database. Each test now registers what
it creates with PartitionCleanup: after the test, its cluster is
terminated, its Glue database and EMR Serverless application deleted,
and its bucket emptied and deleted. EmrServerlessRequests'
deleteApplication stops an application, as DeleteApplication requires,
then deletes it.
* fix(s3): resolve ResourceAccount conditions from the bucket owner
* fix(s3): generate ResourceAccount action coverage
Read s3:ResourceAccount support from the Service Reference action table and carry each evaluated action into shared signed-request and service-call context. Preserve resolved bucket ownership, existing request tag coverage and SDK session-policy regressions. Reuse AwsTestClients for IAM and STS fixtures.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Reuse the existing container init option so the duck server receives SIGTERM instead of waiting for Docker to force-kill PID 1. Preserve the configured URL path and the existing stop timeout.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(dynamodb): authorize ListTables against its regional collection
* test(dynamodb): reject ListTables authorization through ignored selectors
* fix: generate the DynamoDB ListTables request resource
Record the measured table collection as a generated correction and dispatch table-owned operations before hand-built fallbacks. Preserve batch, transaction and PartiQL resource extraction.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(autoscaling): match AWS capacity target validation errors
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(autoscaling): align sparse target error expectation
Preserve sparse-index and rejected-update state assertions while matching the capacity-target validation message.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* test: reuse shared clients for capacity target validation
Use AwsTestClients for both SDK clients while retaining the account, region, error matrix and rejected-update state assertions.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* perf(core): drop per-request lookups on the shared request path
Every request resolved the EmulatorConfig and ResolvedServiceCatalog CDI
beans again in the claim, account and signature filters, fetched the
RequestContext through Instance.get() on each storage operation, built a
URI for the Host even when the header was present, formatted the Date
header from scratch, and let CloudTrail copy its key set to find no
trails.
The filters resolve config and catalog once. AccountAwareStorageBackend
and RegionResolver keep the RequestContext client proxy. RequestHost reads
the Host header before it touches the URI. The Date header is cached per
second as one immutable pair. StorageBackend gets isEmpty(), which every
in-memory map implements directly, and emitS3DataEvent returns at once
when no trail exists.
* perf(core): read the query map once and mint request ids without SecureRandom
AccountContextFilter asked UriInfo for the query parameters up to six
times per request, and each call builds a new map wrapper. It now reads
them once and hands the map to its helpers.
AwsRequestIdFilter drew its UUID from SecureRandom. A request id is not a
secret, so it is now a version 4 UUID built from ThreadLocalRandom, with
the same format and the same single id in all three headers.
* perf(core): scope AccountAwareStorageBackend.isEmpty to the current account
keys() and scan() only see the current account, so isEmpty() now
answers for that account too. A delegate with no entries at all still
answers without copying its key set.
* chore(cognito): give the sign-up scope test one request context that follows the calling thread
AccountAwareStorageBackend keeps the RequestContext it gets from the
Instance, as the request scoped client proxy forwards to the current
request. The test handed out a different context per get() call from a
ThreadLocal, so the kept one pinned both threads to the first account.
It now hands out one context whose account id follows the thread.
* feat(redshift): take a DynamoDB table and a Serverless namespace in zero-ETL integrations
CreateIntegration took only a DynamoDB stream ARN as SourceArn and a provisioned cluster ARN as
TargetArn. AWS takes the table ARN and a Redshift Serverless namespace ARN (its model allows no
cluster: ARN), so a Terraform aws_redshift_integration written for AWS failed to create.
Both AWS forms are now accepted and the original ones are kept. A missing table is
IntegrationSourceNotFoundFault and a missing namespace IntegrationTargetNotFoundFault, as the API
reference lists. A namespace is written through its workgroup into the namespace's database. A
table source reads changes from the table's latest stream, following one turned on after the
integration was created.
Stream records never landed: the writer bound ApproximateCreationDateTime as an Instant, which the
PostgreSQL driver refuses, so only backfilled items reached the landing table. It now binds an
OffsetDateTime as TIMESTAMPTZ.
* fix(redshift): drain a table's replaced stream and match the source table ARN
A table source moved to the table's latest stream as soon as it changed, dropping records the old
stream still held, and moved to no stream when DynamoDB Local reported none for a table whose streams
were turned off. It now reads the followed stream until a read comes back empty, or until the stream
has expired, before moving, keeps it while the table reports no stream, and persists the move.
A source table ARN was resolved by its table name alone, so a table of another account, or an ARN
with more after the name, was taken for the caller's table of that name. The resolved table must now
have the supplied ARN. The docs no longer promise IntegrationSourceNotFoundFault for a missing stream.
* test(redshift): use the shared Docker probe and Query request helpers in the zero-ETL test
No EMR test ran a step or a job run through Floci's Docker runner: the
runner's wrappers and settings were unit tested and run by hand in the
images. EmrDockerRunnerDockerIntegrationTest, a Docker-gated
@QuarkusTest on ContainerDataPlaneProfile (which now sets both runner
modes to docker), runs them for real in the emr-7.5.0 image, reaching
Floci's S3 from the container:
- a hadoop-streaming word count step, its mapper and reducer from S3,
writing its counts to S3;
- the same word count as a custom JAR at EMR's streaming jar path;
- s3-dist-cp from S3 into the cluster's HDFS and back;
- a cluster's spark-env export, read by a Spark step's driver;
- an EMR Serverless run on the user guide's virtual environment recipe,
spark.archives with #environment and the driver's and executors'
Python in it, from an archive that needs no package index.
EmrRequests.awaitStep and EmrServerlessRequests' createSparkApplication,
startJobRun and awaitJobRun are shared helpers, each wait checking that
its call answered 200 before reading the state, and
RetryingTarCopier.putEntry, pulled out of singleFileTar, writes the
archive's entries. The CI prefetch queues the 3.5 GB image for the
shard that runs the class, last, behind the Lambda runtimes, and the
prefetch results step no longer warns about an EMR Serverless image on
ECR Public, the only place AWS publishes them.
The Glue Data Catalog client, which Spark's Glue catalog and Hive's
Glue metastore use on EMR, could not read back a table it had just
created on Floci: "NullPointerException: Cannot invoke
java.lang.Integer.intValue() because the return value of
Table.retention() is null". Floci's Table had no Retention, and its
StorageDescriptor no StoredAsSubDirectories, SortColumns, BucketColumns,
SkewedInfo or AdditionalLocations, so what the client wrote was
dropped, and the client unboxes Retention, Compressed, NumberOfBuckets,
StoredAsSubDirectories and an Order's SortOrder without a null check.
Past that, a partitioned table came back with each partition, and so
each row, five times: the client reads a table's partitions in five
GetPartitions segments by default, and Floci answered every segment
with all of them.
Now:
- Table keeps Retention and IsRegisteredWithLakeFormation, and
StorageDescriptor keeps AdditionalLocations, BucketColumns,
SortColumns, SkewedInfo and StoredAsSubDirectories, and the table and
descriptor copies carry them.
- every table and partition a catalog action returns (GetTable,
GetTables, SearchTables, GetTableVersion, GetTableVersions,
GetPartition, GetPartitions, BatchGetPartition) reads Retention as 0,
IsRegisteredWithLakeFormation as false, and a storage descriptor's
Compressed, NumberOfBuckets, SortColumns and StoredAsSubDirectories
as false, 0, an empty list and false when they were written without
them, as the CLI reference's get-tables output shows Glue doing. The
stored records keep their nulls: Spectrum reads a partition's missing
Compressed as its table's.
- GetPartitions honours Segment, "a non-overlapping region of a
table's partitions": a partition is in the one segment its values
hash to, a SegmentNumber past the last holds none, and TotalSegments
outside 1 to 10, a negative SegmentNumber or a missing member is a
ValidationException, and a member that is not an integer a
SerializationException.
- a SortColumns entry that is null, lacks Column or SortOrder, or has a
SortOrder other than 0 or 1 fails the whole CreateTable, UpdateTable,
CreatePartition, UpdatePartition, BatchCreatePartition or
BatchUpdatePartition with a ValidationException before anything is
stored, as the client unboxes SortOrder on read.
- the EMR runner gives the client the job's account as its
hive.metastore.glue.catalogid, on a cluster and in an EMR Serverless
run. Given none, the client in emr-7.10.0 asks STS GetCallerIdentity
for it through an STS client no setting points at Floci, so a step
reached real AWS STS and failed. The job's own account is what an
unset one means, and a cluster's spark-hive-site or a run's
spark-defaults one, for a Data Catalog in another account, still wins.
IsRegisteredWithLakeFormation is always false, as Floci does not tie a
table to a location registered with Lake Formation.
docs/services/iam.md and IamValidationErrors read as if the capture that
moved IAM's required-member message settled it for every member. It settled
one: an omitted Status, answered from a real account on 2026-10-31 as "Value
at 'status' failed to satisfy constraint: Member must not be null" against
the shape the four credential operations share.
Every other omitted member this service answers, the sites checked by hand
and each required member the model walk reads, carries that form on this
service's reading rather than on a recording: the word null was never a
value AWS sent, an absent member having none to carry. The doc separates the
two and keeps that reasoning, IamValidationErrors says the capture covers
Status alone where the form is decided, and the account-properties test,
which quoted the Status capture beside an assertion on an omitted properties
map, says the reading is what carries over there.
Prose and comments only, no behavior change. Follow-up to #7265.