* feat(athena): support ListTagsForResource for workgroups
Fixes#2791. terraform-provider-aws's read/refresh for aws_athena_workgroup
calls ListTagsForResource unconditionally, even when no tags are set,
and floci's Athena handler had no support for the action:
Error: listing tags for Athena WorkGroup ...: InvalidAction: Action
ListTagsForResource is not supported
Parses the workgroup name out of the ResourceARN (using the existing
AwsArnUtils helper) and returns the tags already captured on
CreateWorkGroup. The primary workgroup always answers with an empty
list, matching a live account, since CreateWorkGroup already rejects
"primary" and it can never carry real tags. An ARN for an unsupported
resource type, or naming a workgroup that doesn't exist, faults with
InvalidRequestException like the rest of this handler's not-found cases.
* docs(athena): sync the supported-actions table for ListTagsForResource
* fix(athena): reject ListTagsForResource ARNs naming a different service
pgermosen (review): listTagsForResource only checked that the ARN's
resource path started with workgroup/, never the service, so an ARN
naming a completely different service with a coincidentally matching
region and workgroup name resolved instead of being rejected the way
real AWS rejects a ResourceARN naming the wrong service.
Adds the explicit arn.service() == "athena" check, plus a RestAssured
test proving a workgroup-shaped ARN under a different service is
rejected even when a same-named workgroup genuinely exists. Verified by
disabling the check and confirming the new test fails with the exact
expected 400-vs-200 mismatch before restoring it.
Also adds an SDK-client test (AthenaTest, compat suite) round-tripping
ListTagsForResource through the real AthenaClient, per review request to
validate request/response shapes the way other management API PRs do.
* fix(compat): retry RedshiftTest's SDK calls past a brief connection-refused hiccup
github.com/floci-io/floci/issues/2789: testCreateCluster/testDeleteCluster
intermittently fail native/sdk-test-java CI with Connection refused on PRs
that never touch Redshift or networking. The AWS SDK's own 4 built-in
attempts total under a second of backoff, and the failure persists past
CI's "wait for floci to be ready" step reporting success - consistent
with a brief port-publish/network-alias hiccup between the test runner
and floci containers that self-resolves almost immediately, just not
within a second.
Wraps each SDK call in a 30-second retry loop that only catches
SdkClientException (connectivity failures), so a genuine service-level
error (e.g. ClusterAlreadyExists) still surfaces immediately instead of
being retried into a timeout. Mirrors the retry pattern RedshiftOperationsTest
already uses successfully for its JDBC connection in the same module.
Verified against a local floci instance: testCreateCluster and
testDeleteCluster pass. Could not reproduce the actual CI-only race
locally (same as the issue reporter, who diagnosed it from CI logs only).
* fix(compat): narrow RedshiftTest's retry to the diagnosed connection-refused failure
pgermosen (review): catching the whole SdkClientException hierarchy also
retries failures that can happen after floci already processed the
request, e.g. a response reset mid-stream on createCluster/deleteCluster.
Retrying those resubmits and gets back a real ClusterAlreadyExists/
ClusterNotFound instead of the connection-refused flake this PR targets,
masking the original failure behind an unrelated one.
Narrows the catch to only retry when a ConnectException (the pre-handshake
"Connection refused" this was diagnosed from) is in the cause chain;
any other SdkClientException now propagates immediately.
* feat(firehose): validate and persist DataFormatConversionConfiguration
Accept, validate, store, and echo the extended S3 destination's
DataFormatConversionConfiguration instead of silently ignoring it.
Validation messages and precedence follow probed AWS behavior: Smithy
ParquetSerDe bounds first, then compression, buffering floor, and
member checks in AWS order, identical on CreateDeliveryStream and
UpdateDestination, which now merges the configuration member-wise and
validates the merged effective state. OrcSerDe is rejected as a
documented deviation (the planned DuckDB engine cannot write ORC).
Conversion itself is not applied yet: delivery logs a warning and
ships records unconverted.
* docs(firehose): match the conversion helpers' wording to what they do
The legacy-shape helper clears DataFormatConversionConfiguration alone, not
every extended-only member, and the create/update warning fires on each call
that leaves conversion enabled rather than once. Rename the first and reword
both so the contract a reader infers is the one the code keeps.
* feat(lambda): provision AWS::Lambda::EventInvokeConfig
The physical id is the registry schema's composite FunctionName|Qualifier
identifier. A create puts the configuration, an update with the same identity
applies the template's settings through the merge-style update call, and a
changed function or qualifier is a replacement whose displaced configuration
the ReplacementCleanup record deletes once the update commits or restores on
rollback. The schema's MaximumRetryAttempts and MaximumEventAgeInSeconds
bounds are checked before any call, as CloudFormation validates them before
the handler runs.
The Lambda docs now list the five event invoke config operations, which the
page wrongly called not implemented, and say that asynchronous invocations do
not yet apply the settings.
* fix(lambda): update the event invoke config in place for equivalent names and roll back in-place changes
A short name and the function's ARN address one configuration, so an update
that changes between them updates in place under the prior physical id
instead of recording a replacement whose cleanup would delete that one
configuration. An in-place update keeps the settings it replaces on the
resource, and a failed stack update puts them back in full. DestinationConfig
is resolved before it is looked at, so a conditional that resolves to
AWS::NoValue is omitted rather than sent as an empty destination set. The
integration test reads stack events with XmlParser.
* fix(lambda): keep the event invoke config rollback snapshot until the restore succeeds
A restore that throws left no snapshot behind, so the next rollback attempt
reported success without restoring anything. The snapshot is now spent only
after the settings are back.
* feat(dynamodb): import tables from S3 and report new exports as IN_PROGRESS
ExportTableToPointInTime handed its worker the same description object it
returned, so a small export could already read COMPLETED in the initial
response. The worker now mutates a copy and runs under the request account.
ImportTable creates the table in CREATING, loads DynamoDB JSON lines from
every object under the S3 prefix on a virtual thread, and flips the table
to ACTIVE when done. DescribeImport and ListImports report it. DYNAMODB_JSON
with NONE or GZIP compression is accepted. CSV, ION and ZSTD are rejected
with a ValidationException.
* fix(dynamodb): item calls on a CREATING table return ResourceNotFoundException
* fix(dynamodb): concurrent ImportTable calls with one ClientToken share one import
* fix(dynamodb): import reads S3 as the caller and denies another account's bucket
* feat(sfn): publish Parallel branch and Map iteration history events
The states inside a Parallel branch or an inline Map iteration now publish
their events into the execution history.
The cause of a failure the interpreter raises now carries the AWS prefix
"An error occurred while executing the state '<name>' (entered at the event
id #<n>). ". It is written once, at the innermost state.
Every shape was verified against real Step Functions in us-east-1.
* feat(sfn): record EvaluationFailed for JSONata failures
A JSONata expression that fails now leaves the EvaluationFailed event AWS
records, with error, the attributed cause, location and state. The location
names the field the way the cause does. The event is recorded once per
attempt when the state retries, and before the Failed event and the Catch.
A Catch clause whose own expression fails records it from where the state
stood before its first Failed event, then fails the state again.
Verified against real Step Functions in us-east-1
* fix(sfn): record every Distributed Map run so DescribeMapRun resolves its ARN
* fix(sfn): stop counting history events once the execution has ended
* feat(controlcatalog): add control lookup operations
* fix(controlcatalog): complete control lookup contracts
* test(controlcatalog): verify pagination continuation
* fix(controlcatalog): move control model to package
* fix(controlcatalog): integrate service storage lifecycle
* feat(redshift-data): resource resolver, connection factory, statement store, service registration
* feat(redshift-data): field mapper, column metadata, SQL parameter binding
* feat(redshift-data): execute, describe, and paged result retrieval
* feat(redshift-data): batch execution, list statements, cancel
* feat(redshift-data): schema introspection operations
* test(redshift-data): end-to-end Data API over a real cluster plus SDK compatibility test
* docs(redshift-data): document the Redshift Data API surface
* fix(redshift-data): address code review findings
- rejectMultiStatement now reuses the SQL tokenizer so a semicolon inside a
comment, string literal, or dollar-quoted block no longer rejects a valid
single statement
- GetStatementResultV2 gains unit coverage for the typed and CSV envelopes
- CSV output is RFC 4180 quoted (embedded comma, quote, CR, LF)
- batch rollback is asserted transactionally in the integration test
- RedshiftDataFieldMapper logs a swallowed blob-read SQLException
- RedshiftPid/RedshiftQueryId use a non-negative hash
- NextToken that decodes to a negative offset is rejected
- CancelStatement leaves a FAILED statement FAILED
- DescribeTable paginates ColumnList and emits NextToken
- DbUser is echoed on the SecretArn path
- the statement store no longer builds its sweeper executor in the test constructor
* fix(redshift-data): address PR #3186 review findings
- SQL scanner handles PostgreSQL escape strings (E'...'): a backslash-escaped
quote no longer ends the literal and mis-detects a following :name as a bind
marker; plain '...' literals still treat backslash as an ordinary character
- ListStatements clamps MaxResults to 1..100 so MaxResults=0 no longer emits the
same NextToken forever
- DescribeTable matches Table / Schema exactly (=) instead of LIKE, so a name
containing _ or % cannot merge other tables' columns into ColumnList
- register the service in the README category table
- drop a stray em dash from the neighbouring services.yaml comment
* fix(redshift-data): bind string parameters untyped so real PostgreSQL infers the column type
CI ran the integration test against a real Redshift (PostgreSQL 15) cluster and
parameterisedStatement failed: a string bound to an int column via setString
raised "operator does not exist: integer = character varying". H2 in PostgreSQL
mode coerces it, so the unit test missed it.
- RedshiftDataConnectionFactory adds stringtype=unspecified to the JDBC URL, so
setString sends the value untyped and the server infers the target type,
matching how AWS binds Redshift Data API parameters
- ListStatements now rejects MaxResults above 100 with ValidationException
instead of silently clamping (PR #3186 re-review)
- RedshiftDataOperationsTest uses JBoss Logging, not java.util.logging (PR #3186 re-review)
* fix(redshift-data): back the statement store with StorageFactory
The store held a bare ConcurrentHashMap outside the configured storage and
lifecycle model. It now obtains an account-aware backend through StorageFactory
("redshift-data", statements.json), the same as Athena's query store, resolved to
the global storage mode via the catalog descriptor. Default mode stays memory, so
statements are still lost on restart as documented; the 24h TTL sweep now walks
every account partition and deletes per account since the sweep thread has no
request context. StoredStatement is annotated for reflection and field-visible
serialization so persistent modes round-trip it.
* test(redshift-data): cover StoredStatement serialization round-trip and values()
The StorageFactory-backed store serializes StoredStatement in persistent modes.
Adds a round-trip test through the exact mapper PersistentStorage builds,
covering the ArrayNode, enum, Instant, and nested sub-statement fields plus the
field-visibility annotation, and a values() test.
* fix(redshift-data): register the nested Status enum for reflection
PersistedModelReflectionTest walks every type reachable from a StorageFactory
persistence root; StoredStatement.status pointed at an unregistered enum, so
native-image deserialization of a persisted statement would fail on restart.
* feat(pipes): validate ParallelizationFactor on Kinesis and DynamoDB sources
SourceParameters is stored as an opaque JsonNode, so ParallelizationFactor
already round-tripped through CreatePipe, UpdatePipe and DescribePipe with no
bounds applied at all. Apply the AWS constraints in validateSourceConfiguration,
which both the create and update paths already run:
- reject the field on a source its parameter block does not describe, for
example KinesisStreamParameters.ParallelizationFactor on an SQS source
- require a numeric, then an integral value
- require a value in [1, 10], reported with the offending value
The tiering and message shape follow LambdaService.parseScalingConfig, which
applies the equivalent MaximumConcurrency bounds for SQS event source mappings.
The value is persisted and returned on the wire but not yet enforced: the poller
opens an iterator on a single hardcoded shard and delivers one batch at a time,
so there is no per-shard concurrency to scale. Record that on both iterator
initializers and in an enforcement-status note in the docs, matching how
ScalingConfig documents the same gap for Lambda.
* fix(pipes): reject a ParallelizationFactor wider than an int
asLong hands back the low 64 bits of a BigInteger, so a value such as
2^64 + 5 read as 5 and passed the [1, 10] bounds check: CreatePipe accepted
it over raw HTTP and persisted the original digits. Gate the bounds on
canConvertToInt and report the value with asText, so an oversized literal is
rejected and named in full. Real AWS rejects it too, the field being an int32.
Also correct the docs: ListPipes returns pipe summaries and omits
SourceParameters entirely, so only DescribePipe echoes the factor back.
* feat(ses): implement v1 ReorderReceiptRuleSet and CloneReceiptRuleSet
Completes the SES v1 receipt management surface with the two remaining
rule-set actions, both reproducing wire behavior probed against real AWS
(us-east-1, 2026-09).
ReorderReceiptRuleSet demands an exact permutation of the set's rules,
with the probed error precedence: rule-set existence first, then a
duplicate request name (InvalidParameterValue "Multiple positions found
for rule", even when the duplicated name is not in the set), then set
rules absent from the request (listed in set order), then request names
not in the set (RuleDoesNotExist, first in request order). RuleNames
members validate at the Smithy layer under the bare 'ruleNames' path
with a nested list-member constraint whose length cap is 100; there is
no service-level "Not a valid ruleName" stage, so a 65-char name lands
on RuleDoesNotExist. A failed reorder leaves the order unchanged.
CloneReceiptRuleSet deep-copies the source's rules under a new creation
timestamp; the active flag stays behind. Name validation is two-layer
for both members: the Smithy pattern combines violations with
originalRuleSetName listed first, and the service-level 64-char check
reports the target before the source. An existing target wins over a
missing source (AlreadyExists before RuleSetDoesNotExist).
Covered by unit tests, Query-protocol integration tests, and AWS SDK
compatibility tests run against a live local instance.
* fix(ses): parse ReorderReceiptRuleSet RuleNames with the probed AWS index grammar
Review flagged that a sparse Query list (RuleNames.member.1 plus member.3)
was silently truncated at the first missing index. Probing real SES with
raw signed Query requests showed the string-list grammar differs from the
receipt-action struct-list grammar: a gap is padded with empty members
(which then fail the ruleNames Smithy constraint, so nothing is ever
truncated) up to a skip of 10, counted from the previous index or from 1
for a leading gap; a larger gap is MalformedInput "Excessively sparse
input would skip N list elements" with a comma-grouped count; an index
above 214748369 (exact boundary, found by bisection) is MalformedInput
"Index N is illegal"; index 0, a leading-zero spelling, and a non-numeric
token are each their own probed MalformedInput; and a repeated index
keeps its first value.
The same probing showed the ruleNames Smithy violation carries no member
index and appears at most once however many members are malformed, so the
service now emits it once instead of per member.
Covered by wire-level integration tests for each grammar case and a unit
test for the single-violation behavior.
Adds the three v1 receipt-filter actions as a stored-but-inert IP filter
store alongside the receipt-rule-set domain: filters round-trip through the
management API but never filter an inbound connection, since Floci accepts
none.
Validation follows real AWS as probed: the filter name is a single
service-level layer (no Smithy pattern, unlike rule and rule-set names) with
"Not a valid filterName" for every malformed shape and its own message for
an empty name; IpFilter members are Smithy-enforced (not-null paths and the
[Allow, Block] policy enum); the Cidr member accepts a single IPv4 or IPv6
address or an in-range CIDR block and rejects everything else with
"Invalid CIDR block"; duplicates are AlreadyExists with the original kept;
deletes are idempotent with only an absent FilterName rejected; and the
101st filter in a region is rejected with LimitExceeded "Too many filters".
List responses are name-sorted for determinism since the probe could not
pin the wire ordering.
Covered by unit tests, Query-protocol integration tests, an AWS SDK
compatibility test, and Terraform/OpenTofu compat coverage for
aws_ses_receipt_filter.
* feat(identitystore): add groups users and memberships
* feat(identitystore): add full service emulation
* fix(identitystore): validate update attribute paths
* feat(ses): implement v1 receipt rules with locally validated action targets
Adds the five v1 receipt-rule actions (CreateReceiptRule, DescribeReceiptRule,
UpdateReceiptRule, DeleteReceiptRule, SetReceiptRulePosition) on top of the
stored-but-inert receipt-rule-set domain. Rules route no mail, but ordering
semantics follow real AWS as probed: a rule created without After is inserted
at the front, SetReceiptRulePosition without After moves a rule to the front,
update replaces the whole rule in place, and rule delete is idempotent while
rule-set delete cascades.
Action targets are validated against the local emulator the way real SES
validates them against the account: any TopicArn must be an existing SNS
topic, an S3 BucketName an existing bucket, a Lambda FunctionArn an existing
function, and a BounceAction Sender a verified identity, using the probed
error codes (InvalidSnsTopic, InvalidS3Configuration, InvalidLambdaFunction,
InvalidParameterValue). Smithy-layer validation reproduces the probed member
paths and combined violation messages; only the members real SES enforces are
required (S3 BucketName, SNS TopicArn, and Stop Scope may be absent).
Covered by unit tests with mocked resource services, Query-protocol
integration tests, an AWS SDK compatibility test, and Terraform/OpenTofu
compat coverage for aws_ses_receipt_rule.
* fix(ses): match probed AWS semantics for action-list gaps and present-struct required members
Probing triggered by the upstream review corrected two earlier conclusions.
A gap in the action list (an empty struct serializes to no Query keys) is
not compacted by AWS: the gap is padded into an empty action slot and
rejected with InvalidParameterValue "Exactly one action type must be
specified for each ReceiptAction", with Smithy paths keeping the wire
index. member.0 is rejected outright with MalformedInput
"0 is not a valid index".
The earlier "optional" verdict for S3Action.BucketName, SNSAction.TopicArn,
and StopAction.Scope was an artifact of empty structs never reaching the
wire: once an action carries any member, the type's required members are
enforced as Smithy violations. BounceAction violations are reported in the
probed smtpReplyCode, sender, message order, and SNSAction reports a bad
Encoding enum before the missing TopicArn.
* fix(ses): honor original receipt-action index spellings and require stop actions last
Probing the leading-zero report pinned AWS's index semantics exactly: index
tokens are grouped by numeric value, ordered by length then lexicographically,
and the i-th token must parse to i, or the padded empty slot is rejected with
the exactly-one-action-type error. member.01 alone is therefore a valid slot 1
whose action must be parsed under its original spelling instead of a rebuilt
canonical one, while mixed spellings such as member.01 plus member.2 are
rejected because the one-digit token sorts first.
The same probes surfaced an unrelated service-level rule now reproduced too:
a stop action anywhere but the last position is rejected with
"Stop action, if any, must be placed at the end of the actions list".
* chore(ses): log best-effort compat-test cleanup failures with resource context
The three cleanup catches in the receipt-rule compatibility suite swallowed
failures silently. They now report the failed step and resource on stderr,
the form the other suites in this module already use, so leaked test
resources stay diagnosable.
* chore(lambda): log functionExists resolution failures at debug level
The catch converts a resolution failure into the predicate's negative
answer; the debug line keeps a surprising false diagnosable (which
reference was rejected, and why) without turning ordinary existence
misses on a query path into log noise.
* fix(ses): restrict receipt-action index tokens to ASCII digits
Character.isDigit also accepts non-ASCII Unicode digits, so a key such as
Rule.Actions.member.<fullwidth 1> parsed as a real index. No AWS Query
index grammar recognizes those spellings; the key is now skipped like any
other unmodeled parameter, pinned by an integration test.
---------
Co-authored-by: Priamo <pgermosen@gmail.com>
* feat(redshift): parse UNLOAD TO s3 statements
* feat(redshift): add S3Service.authorizeAnonymousPutObject for the UNLOAD writer
* feat(redshift): simulate Redshift UNLOAD TO s3 via CopyOut
* feat(redshift): dispatch UNLOAD via the intercepting bridge
* test(redshift): cover UNLOAD to S3 end to end
* docs(redshift): document UNLOAD to S3 support
* fix(redshift): drain backend on UNLOAD streaming failure and handle final slice error
* refactor(redshift): clean up inline FQCN imports across main and test sources
* fix(redshift): address review feedback on UNLOAD to S3 simulator
* fix(redshift): authorize ListBucket on UNLOAD prefix probe and clean up manifest on backend EOF
* fix(redshift): authorize UNLOAD cleanup deletes and skip them under ALLOWOVERWRITE
* fix(redshift): fail open on UNLOAD MAXFILESIZE above the buffering ceiling
* feat(redshift): repeat the UNLOAD header row at the start of every slice
* test(redshift): cover UNLOAD to S3 over JDBC in the SDK compatibility suite
* docs(redshift): document UNLOAD per-file header, MAXFILESIZE bytes, and over-cap fail-open
* fix(redshift): clean up new UNLOAD slice objects even under ALLOWOVERWRITE
deleteWritten previously bailed entirely when ALLOWOVERWRITE was set, to avoid
destroying a pre-existing object a slice key had overwritten. That also left
genuinely new slice keys behind on a MANIFEST failure, exposing a partial result
with no manifest. Track which slice keys existed before the write and skip only
those on cleanup.
* fix(redshift): never delete UNLOAD output under ALLOWOVERWRITE
The preExistingKeys heuristic could not distinguish an overwrite from a fresh
write atomically: two concurrent UNLOADs to the same prefix could both classify a
key as new, and one operation's cleanup could then delete the other's output.
Drop the heuristic and simply never delete under ALLOWOVERWRITE. Non-overwrite
runs verified the prefix was empty, so their cleanup is still safe. A failed
MANIFEST + ALLOWOVERWRITE UNLOAD may leave data objects without a manifest, which
is now documented.
* fix(redshift): read UNLOAD objects via getObject in the integration test
listObjects returns metadata-only S3Object entries whose getData() is null, so
unloadToS3PrefixWritesRowsAsObjects and unloadGzipWritesCompressedObject threw
NullPointerException in CI. Fetch each body with getObject, as the MANIFEST test
already does.
* fix(cloudformation): delete AWS::IAM::User on stack deletion (#2490)
* fix(cloudformation): reconcile IAM user updates and verify user identity
* fix(cloudformation): log intentionally tolerated errors during IAM user deletion
* fix(cloudformation): use context helpers and assert Fn::GetAtt in IAM user provisioner
* test(cloudformation): add AWS SDK compatibility test for IAM user
* test(cloudformation): log tolerated exception during IAM user test cleanup
* test(cloudformation): use Logger for cleanup in IAM user SDK test
* test(cloudformation): use JBoss Logging for cleanup in IAM user SDK test
* fix(cloudformation): address review feedback on IAM user provisioner
---------
Signed-off-by: Vũ Thế Huy <31652864+vuthehuyht@users.noreply.github.com>
* feat(accessanalyzer): add analyzer lifecycle
* fix(accessanalyzer): complete service contracts
* test(accessanalyzer): make SDK cleanup best effort
* test(accessanalyzer): use project logging for cleanup
DescribeCertificate returned Status ISSUED together with
DomainValidationOptions[].ValidationStatus PENDING_VALIDATION for every
public certificate, forever. Clients that wait on the validation status
rather than the certificate status never finished: the AWS SDK
CertificateValidated waiter polls only ValidationStatus, and the CDK
DnsValidatedCertificate custom resource uses that waiter, so its stack
waited for the Lambda's timeout and rolled back.
The validation status now follows issuance: SUCCESS on an ISSUED
certificate, PENDING_VALIDATION while the configured validation wait is
running. A pending certificate is issued, with its validations marked
SUCCESS and the change stored, on the first read after
validation-wait-seconds has passed; before this the documented transition
never happened.
* feat(iot): CreateKeysAndCertificate issues a real client certificate from the local CA
certificateId is sha256(DER) in lowercase hex as on AWS; the returned RSA 2048
key pair matches the certificate. CreateCertificateFromCsr parses the PKCS#10,
checks its self-signature and key strength (RSA 2048 or more, EC P-256/384/521),
signs the CSR's key with the same CA and returns no private key, as on AWS.
* docs(iot): describe the CA-issued device certificates
* fix(iot): accept only the NIST curves AWS IoT names and never store a device private key
The CSR key check reads the named-curve identifier instead of the field size,
so secp256k1 and explicit curve parameters are refused as on AWS. The stored
certificate record no longer carries the private key; it is returned once.
* feat(iot): device certificates expire at the end of 2049 and DescribeCertificate reports validity
AWS IoT-issued client certificates all carry notAfter 2049-12-31T23:59:59Z.
CertificateGenerator gains an overload with an explicit validity window;
DescribeCertificate adds validity.notBefore, validity.notAfter and
certificateMode DEFAULT. The Java SDK compatibility test asserts the shape.
* fix(iot): a device certificate never outlives its issuing CA
A new local CA is valid until the end of 2050, past AWS's fixed 2049 device
expiry; a CA created earlier (ten years) caps the device certificates it signs
at its own expiry, so a chain never expires before its leaf.
* fix(iot): derive CA and device expiry from creation time, never mint an expired certificate
A CA created after 2050 lives ten years from creation instead of ending on
the fixed date; after 2049 a device certificate lives a year, still capped
at its CA. The Python compatibility suite now sends a real PKCS#10 request,
since the placeholder it used is refused as on AWS.
* docs(tls): the local CA now signs IoT device certificates
* test(iot): pass the certificate authority to IotServiceTest's constructor
DescribeClusters (and every other cluster response, since they share
buildClusterXml) omitted two fields the Terraform AWS provider requires:
ClusterAvailabilityStatus and AvailabilityZoneRelocationStatus. The
create waiter polled an empty ClusterAvailabilityStatus ("unexpected
state '', wanted target 'Available'") and import/read rejected the empty
AvailabilityZoneRelocationStatus.
ClusterAvailabilityStatus is derived from clusterStatus: available maps
to Available, unavailable to Unavailable, failed to Failed, and every
transient state to Modifying. Floci has no availability-zone relocation
feature, so AvailabilityZoneRelocationStatus is the constant "disabled".
Closes#3098
* feat(tls): record runtime-learned hostnames in the certificate metadata
* feat(tls): TlsCertificateManager.ensureHost grows the server certificate at runtime
Reissues the leaf from the local CA with the same key pair and the new SAN,
replaces certificate and metadata by atomic renames (the key file is never
rewritten), reloads the default TLS configuration and fires
CertificateUpdatedEvent so the HTTPS listener swaps immediately.
Names must be well-formed host names under a local suffix; anything else is
refused with a WARN and never throws.
* feat(tls): keep runtime-learned hostnames across a boot regeneration
* test(tls): ensureHost is visible to the next TLS handshake without a restart
* docs(tls): custom domains learned at runtime
* test(tls): pin the certificate contracts of a runtime reissue
The reissued leaf keeps the boot leaf's shape (subject, issuer, EKU, CA flag,
validity, new serial, configured names first), a wildcard covers exactly one
label, an IP allowed by the base URL becomes an iPAddress SAN, and a client
that verifies the server's identity for the new name (SNI plus RFC 6125
matching) fails before ensureHost, succeeds after it, and fails again after
reset, while the configured name keeps serving HTTPS throughout.
* fix(tls): retry a failed listener reload and keep served names across a boot
A name is known only once the HTTPS listener serves it: a reload that
returns false, a missing default TLS configuration or a failing listener
now leaves the in-memory state untouched, so the next ensureHost call for
that name writes and reloads again instead of reporting it as covered.
At boot, a SAN the served certificate carries beyond the metadata's
configured list is treated as learned, so a reissue whose metadata rename
did not complete cannot lose the name in a later regeneration.
The allow-list is checked after coverage, so a default SAN such as
host.docker.internal no longer logs a refusal on a no-op call.
Tests are split by concern: TlsCertificateManagerTest (reissue, reload,
reset, failure, races) and TlsCertificateManagerNameRulesTest over a
shared fixture; TlsConfigSourceLearnedHostnamesTest holds the boot paths.
* fix(tls): carry a name whose reload failed into later reissues and resets
The learned list now follows the files and the known set follows the
listener. A name written to disk but not yet served is kept by every
later reissue instead of being dropped when a second name is learned,
and a reset whose reload failed is retried by the next reset.
Two pre-existing em dashes in TlsConfigSource log messages replaced with
commas, as AGENTS.md asks.
* feat(acm): issue AMAZON_ISSUED and PRIVATE certificates from the local CA
RequestCertificate now returns a TLS server leaf (serverAuth and clientAuth)
signed by Floci's local root CA, and CertificateChain is that CA's PEM, the
same bytes GET /_floci/ca.pem serves. Certificate plus CertificateChain from
GetCertificate therefore build a chain that validates, as they do on AWS, for
both certificate types, and ExportCertificate returns the same chain. The
requested KeyAlgorithm is still honoured and DescribeCertificate reports the
CA as the issuer.
The bundled amazon-root-ca.pem and its startup check are gone: nothing Floci
issues chained to it, and the file was corrupt (its base64 payload could not
decode), so every GetCertificate handed out an unparsable chain.
AcmPaginationTest walks a store shared with every other ACM test class; its
page cap now leaves room for the suite to grow instead of failing once the
shared store passes fifty certificates.
* refactor(acm): drop the cosmetic Amazon issuer generator
CertificateGenerator.generateCertificate signed a leaf with its own key under a
CN=Amazon issuer DN that no client could ever verify. Its last production caller
now issues from the local CA, so the method and the DN are gone and the
self-signed builder no longer carries an issuer and CA flag that were always the
subject and true. Tests that only needed some certificate use the self-signed
generator; the ones that need a leaf that is not a CA issue it from a throwaway
CA.
* docs(acm): certificates chain to the local CA
Say that every issued certificate is signed by the local root CA, that
GetCertificate returns that CA as CertificateChain, and that trusting
/_floci/ca.pem once validates both the HTTPS endpoint and ACM certificates.
* test(acm): the SDK compatibility suite validates the certificate against its chain
GetCertificate's certificateChain() must contain the issuing CA and that CA
must verify certificate(), as on AWS. A chain that does not parse or does not
sign the leaf now fails the suite instead of passing a BEGIN CERTIFICATE check.
* docs(acm): say when the CA is created and what Issuer reports
ACM issuance now creates the local CA under {persistent-path}/tls/ on first
use, also with TLS off and in memory storage mode, and DescribeCertificate
reports the CA's name as Issuer where AWS reports Amazon. The CA javadoc no
longer calls ACM a later step.
* test(acm): pin key size, an imported chain and the persisted chain
The import fixture is now a server certificate from a throwaway CA, uploaded
with that CA as its chain, and GetCertificate must hand both back unchanged.
The RSA and EC chain tests also check the key size and curve, and the
persistence test checks the chain survives a restart.
* test(acm): the python compatibility suite verifies the certificate against its chain
The key-algorithm case checked the certificate's self-signature, which only
held while ACM certificates were signed by their own key under a cosmetic
issuer. On AWS, and now here, the signer is the issuing CA that GetCertificate
returns first in CertificateChain, so the case verifies that signature and the
issuer name instead.
* fix(acm): write EC private keys as PKCS#8 and classify keys by interface
JcaPEMWriter turned a JDK EC private key into a bare SEC1 structure with
no curve and no public half, which neither OpenSSL nor parsePrivateKey
could read, so every EC certificate stored an unusable key and
ExportCertificate on one failed. EC keys now go out as PKCS#8, RSA keys
stay PKCS#1 as AWS IoT hands them out, and a SEC1 key without a public
half parses through its private-key info.
Private keys are told apart by the ECKey interface rather than by name:
a BouncyCastle provider, when one is registered, names an EC key ECDSA.
* test(acm): AcmServiceTest pins issuance from the local CA
Service level, no Quarkus: every KeyAlgorithm yields a leaf of that key
signed by the CA with the CA PEM as chain and metadata read from the
certificate; PRIVATE is issued at once; a pending certificate already
holds its leaf and chain; an idempotent replay mints nothing; imports
keep their own chain; exports return the stored chain, also for EC
keys; sixteen concurrent requests each get their own valid certificate.
* feat(apigateway): serve a custom domain over TLS as soon as it is created
CreateDomainName hands the domain name to TlsCertificateManager.ensureHost
after the domain is stored, outside the uniqueness lock. The certificate
manager never throws, so the API response is unchanged.
* feat(iot): serve a customer-managed domain over TLS as soon as it is configured
CreateDomainConfiguration hands a customer-managed domain name to
TlsCertificateManager.ensureHost after the configuration is stored. A
configuration without a domain name describes the default endpoint and
registers nothing.
* feat(cognito): serve a custom domain over TLS as soon as it is created
CreateUserPoolDomain hands a custom domain to TlsCertificateManager.ensureHost
after the domain is stored. A prefix domain lives under amazoncognito.com on
AWS, a name Floci does not serve, and is left alone.
* docs: custom domains are served over TLS on creation
One sentence each in the API Gateway, IoT Core and Cognito pages, and the
TLS page now names the operations that add hostnames to the server
certificate.
* test(compat): custom domain reachable over TLS trusting only the ACM chain
RequestCertificate, CreateDomainName with regionalCertificateArn, then a TLS
handshake with SNI that trusts only the returned CertificateChain and
verifies the hostname. Probes for TLS on the endpoint host and port, because
the workflow hands the tests an http:// URL while Floci serves both, and
skips when the probe fails.
* docs(tls): say which ensureHost outcomes are logged as warnings
* test: pin the custom domain TLS hooks against the service contracts
Service tests for API Gateway, IoT Core and Cognito: the exact name is
handed over once, after the record is stored, with no service lock held
(a concurrent create must not wait for the TLS reload), and never for a
rejected request, an ENDPOINT configuration, an AWS-managed configuration,
a prefix domain or a later update or delete. A CloudFormation stack with
the three types registers every domain and a replacement, not an in-place
update or the delete. With TLS on, a client trusting only the ACM chain
reaches all three names by SNI with hostname verification, and a reset
takes them back.
* test(acm): build the InUseBy test service with the local CA
AcmInUseByTest landed on main with #3035 using the constructor that
predates the local CA; AcmService now takes the certificate authority
it issues from, so the test loads a throwaway CA in its temp directory
like AcmServiceTest does.
* test(cognito): request an issued ACM certificate in the custom domain TLS tests
Since #3035 a custom domain needs an issued ACM certificate, so the wire
test requests one and the service test stubs AcmService. Two new cases pin
that a certificate ACM does not know, or has not issued, is refused before
the hostname is registered.
* test(cognito): a concurrent create does not wait for the TLS reload
The custom domain hook sits after the domain lock #3095 introduced, so a
second create is not queued behind the HTTPS listener switch; pinned the
same way as for API Gateway and IoT Core. The routing test #3095 added
constructs the service with the certificate manager as well.
The AWS::CertificateManager::Certificate provisioner accepted both properties
and ignored them, so every certificate a stack created carried the ACM
defaults. Both now become the certificate's Options, with the CloudFormation
defaults (export DISABLED, transparency logging ENABLED) when absent, and a
value other than ENABLED or DISABLED fails the resource before any ACM call.
Updates follow the registry schema: CertificateExport is createOnly, so a
change replaces the certificate through the existing delete-or-unwind path,
while a changed CertificateTransparencyLoggingPreference calls
UpdateCertificateOptions on the existing certificate and keeps its ARN.
Export is never sent to UpdateCertificateOptions, since ACM does not allow
changing it once the certificate exists.
CertificateAuthorityArn stays ignored; private CA is not emulated.
ConverseStream previously buffered the whole proxied response, translated it in
one shot, and returned it as a single byte[]. Both backends now write frames
through a JAX-RS StreamingOutput as they're known, and the proxy backend reads
the upstream SSE response via HttpResponse.BodyHandlers.ofLines() instead of
ofString() - text deltas reach SDK clients as the model generates them instead
of landing all at once when the response finishes.
Once the StreamingOutput starts writing, JAX-RS has already committed the 200
response, so a failure discovered only after streaming begins - a stream that
never reaches a finish_reason or "[DONE]" (upstream connection dropped
mid-generation) - can no longer become an HTTP error status. It's now reported
as a modelStreamErrorException event, the same wire shape (:message-type:
exception, :exception-type: <name>) and modeled exception real Bedrock uses
for a mid-stream failure, verified to decode correctly through
BedrockRuntimeAsyncClient's generated ConverseStreamResponseHandler. A stream
that completes normally (finish_reason or "[DONE]" seen) with no content is
now treated as a legitimate empty completion rather than an error, matching
real Bedrock.
Added a compatibility-tests/sdk-test-java case exercising
BedrockRuntimeAsyncClient.converseStream end to end, proving the emitted
event-stream frames decode correctly through the real AWS SDK rather than
only Floci's own byte-level assertions.
* fix(s3): return composite checksums for multipart uploads
CompleteMultipartUpload stored the checksum of the whole object but labelled
it COMPOSITE, so clients that recompute the composite value from the part
checksums, as the AWS documentation describes, never matched it.
Follow the AWS checksum type rules, verified against real S3:
- SHA1/SHA256 are always COMPOSITE, CRC32/CRC32C default to COMPOSITE and
CRC64NVME is always FULL_OBJECT. x-amz-checksum-type on CreateMultipartUpload
selects FULL_OBJECT for CRC32/CRC32C; incompatible combinations fail with
InvalidRequest, and the response echoes x-amz-checksum-algorithm/-type.
- The composite value is the algorithm applied to the concatenated binary part
checksums, Base64 encoded, with a "-<part count>" suffix. It is returned by
CompleteMultipartUpload, HeadObject and GetObject (with x-amz-checksum-type),
while GetObjectAttributes omits the suffix, as AWS does.
- A checksum sent on CompleteMultipartUpload is validated against the stored
type: a mismatching value is a BadDigest (the composite is accepted with or
without its suffix), a checksum type different from the one the upload was
created with is an InvalidRequest, per-part checksums in the request body
that do not match the uploaded parts are an InvalidPart, and a COMPOSITE
upload completed without the checksum of every part is an InvalidRequest
(FULL_OBJECT uploads need none, as on S3). A non-numeric
PartNumber is a MalformedXML instead of a 500.
- UploadPart echoes the part checksum (x-amz-checksum-<algorithm>) when the
upload declared an algorithm, as S3 does; without one no header is returned.
- CopyObject writes a single object without a part manifest; a composite source
gets a full-object checksum recomputed with its algorithm, and CopyObjectResult
carries the checksum elements, matching AWS.
- GetObjectAttributes lists part-level checksums only for COMPOSITE objects: a
FULL_OBJECT multipart object reports its PartsCount alone and a single-part
object has no ObjectParts element.
The algorithm and type rules live in two new enums, ChecksumAlgorithm and
ChecksumType, parsed once from the request headers; S3Checksum builds the
full-object, composite and GetObjectAttributes views of a checksum.
The boto3 compatibility suite gains multipart upload_file cases for SHA256 and
for the SDK's default CRC32, asserting the composite value and the part list.
The S3 docs drop the stale note that checksum responses focus on SHA-1 and
SHA-256 (CRC32, CRC32C and CRC64NVME have been supported since #877) and list
the AWS algorithms Floci rejects.
* fix(s3): return the GetObjectAttributes ETag without quotes
S3 returns the ETag element of GetObjectAttributes without the surrounding
quotes that HeadObject, ListParts and CompleteMultipartUpload keep. Verified
against real S3 with the same object: head_object gives "af3c...-3" while
get_object_attributes gives af3c...-3, and the AWS CLI reference shows the same
in its get-object-attributes example. Floci echoed the quoted value, so a client
comparing both saw different strings on Floci and equal ones nowhere.
* fix(s3): give a copied object its own ETag
CopyObject kept the ETag of the source, so the copy of a multipart object
carried the "<md5-of-md5s>-N" value of its parts. S3 writes a copy as a single
object and returns the MD5 of the whole content as its ETag, in CopyObjectResult
and HeadObject alike (verified against real S3: source "af3c...-3", copy
"a5f04f..."). The copy now keeps the ETag storeObject computes.
* fix(s3): send CopyObjectResult as application/xml
The CopyObject response carried Content-Type: text/plain;charset=UTF-8 for an
XML body. S3 labels it application/xml like every other XML response.
* test(s3): cover multipart checksums in every SDK compatibility suite
Each SDK implements flexible checksums differently, so the multipart flows are
exercised per client rather than once: the Go transfer manager (what
terraform-provider-aws uses), @aws-sdk/lib-storage for Node, the Java SDK v2 both
low-level and through S3TransferManager on the multipart-enabled async client, the
AWS CLI (s3api, aws s3 cp --checksum-algorithm and a plain aws s3 cp that goes
multipart on its own) and boto3. Every case asserts the composite or full-object value computed in the
test itself, the UploadPart echo, the suffix-less GetObjectAttributes checksum
and unquoted ETag, the rejected Complete without part checksums, and the copy
of a multipart object as a single full object with its own ETag. The default
algorithm cases accept whatever the SDK version declares (CRC32 composite or
full object, or none) and check the stored value against it.
* test(terraform): upload a large aws_s3_object with Terraform and OpenTofu
The IaC suites created buckets but never an object, so the code path that
surfaced the composite checksum bug, an aws_s3_object above the provider's part
size uploaded through the SDK transfer manager, was not covered. Both suites now
upload a 12 MiB file generated by the test setup with checksum_algorithm SHA256
and check that HeadObject reports a COMPOSITE checksum equal to the composite
computed locally over the part sizes GetObjectAttributes lists, that the state
attribute holds the same value, and that re-planning the object shows no drift.
compat-opentofu moves to the same aws-cli image as compat-terraform (2.34.32):
2.15 predates the S3 checksum type and cannot show ChecksumType in its output.
* fix(s3): reject x-amz-checksum-type without a checksum algorithm
CreateMultipartUpload only parsed x-amz-checksum-type when an algorithm was
declared, so a type sent on its own, valid or not, was silently ignored. S3
validates the header regardless: an unknown value is InvalidRequest "Value for
x-amz-checksum-type header is invalid." and a valid one without an algorithm is
InvalidRequest "The x-amz-checksum-type header can only be used with the
x-amz-checksum-algorithm header." (both verified against real S3).
* test(s3): log cleanup failures in the multipart checksum compat tests
The Java, Node and Go cases swallowed errors while deleting their objects and
bucket. They now report what could not be deleted and why, so a leftover is
diagnosable instead of silent.
---------
Co-authored-by: Mihai Blidaru <mihai.blidaru@lynxfctech.com>
CreateKey accepts Origin=EXTERNAL, GetParametersForImport issues a real RSA
wrapping key, and ImportKeyMaterial unwraps and installs the material.
Expiry and DeleteImportedKeyMaterial return the key to PendingImport.
Fixes#1916
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(kms): apply real RSAES-OAEP for RSA keys in Encrypt and Decrypt
Encrypt on an RSA key now produces raw RSA-OAEP ciphertext of the
modulus length. Decrypt accepts a ciphertext made locally with the
public key from GetPublicKey, so the normal envelope pattern works.
Encrypt, Decrypt, and ReEncrypt read the EncryptionAlgorithm request
fields and return them in responses.
Validate plaintext length between 1 and 4096 bytes on every encrypt
path. Turn a malformed blob payload into InvalidCiphertextException
instead of a 500. GenerateDataKey now names itself in key usage
errors and rejects non symmetric keys like real AWS.
Error codes and messages for algorithm mismatch, wrong key usage,
missing KeyId, encryption context on asymmetric keys, and oversized
plaintext were measured against real AWS KMS in us-east-1 and match.
Fixes#3024
* test(kms): rename a GenerateDataKey test to state the thrown exception
"AWS Lambda doesn't publish a version if the function's configuration and
code haven't changed since the last version." Publishing was unconditional,
so repeated publishes accumulated identical versions.
Unchanged is decided by $LATEST's revisionId, which is regenerated on every
code and configuration update, so a version records the revision it was cut
from and a later publish that finds it unmoved returns that version. Keying
on the revision rather than comparing the fields a snapshot copies means a
field added later is covered without anyone remembering to update a
comparison. Versions published before this carry no source revision and never
match, so existing state keeps its previous behaviour.
Three carve-outs, each with a test:
Description is supplied at publish time rather than carried on $LATEST, so a
publish naming a new one is a real publish even when nothing else moved.
LambdaVersionIntegrationTest already asserted that and decides the case.
Only the most recent version counts, because AWS compares against the last
version: a description going A then B then A must publish again rather than
matching the older A.
A hot-reload function's code lives in a bind-mounted directory that changes
with no API call, so revisionId cannot witness it and these always publish.
Two existing tests change, because the behaviour they assert is the one this
fixes. LambdaServicePersistenceTest reached version 3 by publishing three
times with nothing changed; its subject is the counter surviving a restart,
so it now varies the description. CodeDeployTest published identical bytes
twice to get two versions for a blue/green shift; it now deploys a real
change between them, which is what a blue/green deployment does anyway.
Closes#2822
* feat(neptune): support the Terraform aws_neptune_cluster read-back contract
The Terraform AWS provider's aws_neptune_cluster resource reads back every
DBCluster field after create and update, and treats a mismatch on a ForceNew
attribute as a replacement. Against Floci the resource could not converge:
StorageEncrypted was hardcoded to true against the provider's default of
false, AvailabilityZones was emitted as a singular element that SDK parsers
drop, BackupRetentionPeriod and the other settings were never stored, and
tag calls on a Neptune ARN never reached the Neptune store.
CreateDBCluster and ModifyDBCluster now store the settings a request carries
(NeptuneClusterSettings, modelled on DocDbClusterSettings) and
DescribeDBClusters reads them back with the AWS defaults otherwise:
AvailabilityZones, BackupRetentionPeriod, PreferredBackupWindow,
PreferredMaintenanceWindow, DBSubnetGroup, DBClusterParameterGroup,
VpcSecurityGroups, StorageEncrypted, KmsKeyId, StorageType,
DeletionProtection, CopyTagsToSnapshot, EnabledCloudwatchLogsExports,
ReplicationSourceIdentifier, ServerlessV2ScalingConfiguration,
AssociatedRoles and ClusterCreateTime. StorageEncrypted defaults to false
as on AWS.
Also:
- A requested Port is honoured when it is free inside the proxy range, so
Terraform's default port of 8182 matches the first cluster.
- DeleteDBCluster refuses a cluster with DeletionProtection enabled with
InvalidParameterCombination, as on AWS.
- DBClusterMembers uses the DBClusterMember element the Neptune API model
declares; the previous member element was dropped by SDK parsers.
- New actions: AddRoleToDBCluster, RemoveRoleFromDBCluster,
DescribeGlobalClusters (empty list), ListTagsForResource,
AddTagsToResource and RemoveTagsFromResource. Tags are accepted on
CreateDBCluster and CreateDBInstance, and the rds credential scope routes
a Neptune ARN ResourceName to the Neptune handler.
Verified against hashicorp/aws 6.62.0 with terraform apply, a clean
re-plan, an update covering retention, protection, log exports, security
groups, iam_roles and tags, a destroy blocked by deletion protection, and a
destroy after disabling it.
* test(compat): cover aws_neptune_cluster in the Terraform and Java SDK suites
Adds a dedicated Terraform fixture and bats test that applies an
aws_neptune_cluster, checks the read-back through terraform output and the
AWS CLI, checks tags through ListTagsForResource, and asserts a clean
re-plan. Extends the Java SDK NeptuneTest with tags, IAM roles, modify
settings, deletion protection and cluster members, so a real SDK parser
covers the new DBCluster fields.
* fix(neptune): infer the rds service for the DBCluster role actions
Unsigned Query requests resolve their service from the action name, and
AddRoleToDBCluster and RemoveRoleFromDBCluster were missing from the RDS
action set, so they fell through to the SQS default instead of reaching
the Neptune handler.
* feat(neptune): read back the settings Terraform's aws_neptune_cluster_instance manages
DescribeDBInstances omitted AutoMinorVersionUpgrade, PromotionTier,
PubliclyAccessible, the parameter and subnet groups and the windows,
ModifyDBInstance ignored them, StorageEncrypted was hardcoded to true,
and every cluster member was reported as the writer, so the provider
issued a ModifyDBInstance on every apply.
NeptuneInstanceSettings, modelled on NeptuneClusterSettings, stores what
a request carries and DescribeDBInstances reads it back with the AWS
defaults otherwise; StorageEncrypted, KmsKeyId and StorageType are the
cluster's. The first member of a cluster is its writer and deleting it
promotes the next. Covered by unit, integration and Java SDK tests and a
Terraform compat fixture with a writer and a reader instance.
---------
Co-authored-by: kurtmc <2661907+kurtmc@users.noreply.github.com>
* feat(dynamodb): index-qualified PartiQL SELECT with ConsistentRead validation
ExecuteStatement parsed FROM "Table" only — a dot aborted the lexer
with 'Unexpected character', so PartiQL could not read through a
secondary index at all. Lex the qualifier, resolve it to an access
path, and route the read the way AWS does (characterised on real AWS,
eu-west-1, 2026-09-02):
- equality on the selected source's partition key queries it; any
other WHERE shape becomes a full scan of the table or index with the
remaining conditions as a filter
- ConsistentRead on a GSI-qualified statement is rejected with
'Strongly consistent read is not supported on Global Secondary
Indexes' — PartiQL's own wording, distinct from Query/Scan
- an unknown index omits the index name from the message, again
unlike Query/Scan; index resolution also precedes the consistent-
read check
- SELECT over an index surfaces only projected attributes, and an
explicitly selected non-projected column is rejected
- BatchExecuteStatement SELECT statements must resolve through the
table's primary key; index-qualified or partial-key statements get
a per-statement ValidationError slot
Consistent reads on base tables and LSIs stay legal, NextToken/Limit
now paginate both read branches, and GetItem stays a base-table-only
shortcut.
Reproduced with paritysuite/dynamodb-conformance (new
tests/tier2/partiql/executeStatementIndex.test.ts plus ExecuteStatement
cases in tier3/error-messages/indexReads.test.ts): the qualified-read
and message cases fail against main and pass with this change.
Signed-off-by: Kévin Dehoux <dehoux.kevin@gmail.com>
* fix(dynamodb): bind the PartiQL NextToken to its issuing statement
A PartiQL NextToken carried only the last evaluated key, so replaying a
token against another table or access path with identical key names and
scalar types was accepted: Scan continued from the foreign key and
skipped items, Query restarted and duplicated them. Real AWS binds the
opaque token to the request: replaying it against any other statement,
table or access path is rejected with 'NextToken does not match request',
while a changed Limit or a dropped ConsistentRead is accepted and an
older token replays idempotently (characterised on real AWS, eu-west-1,
2026-09-03).
The token now embeds a SHA-256 digest of the statement text and
parameter values alongside the key, and decoding verifies it against the
current request. Wire integration tests cover statement, parameter,
index-qualified and cross-table replay plus the accepted Limit change;
the SDK twin asserts the exact message; the conformance suite gains the
base-table-to-index replay case.
Signed-off-by: Kévin Dehoux <dehoux.kevin@gmail.com>
---------
Signed-off-by: Kévin Dehoux <dehoux.kevin@gmail.com>
* feat(iot): add the domain configuration model and service
Stores AWS IoT Core domain configurations the way the API reports them:
a new configuration is ENABLED and CUSTOMER_MANAGED (ENDPOINT without a
domain name), carries one VALID server certificate, the default TLS
policy and an ARN with the short id AWS appends. Update changes the
status, authorizer, TLS, certificate and protocol settings; delete
refuses an ENABLED configuration, as AWS does; list filters by service
type and pages with marker and pageSize. Tags work on the ARN.
* feat(iot): serve the domain configuration API
Adds the REST-JSON routes CreateDomainConfiguration,
DescribeDomainConfiguration, UpdateDomainConfiguration,
DeleteDomainConfiguration and ListDomainConfigurations under
/domainConfigurations, registered with the IoT service so the
X-Amzn-Errortype header is set for unsigned callers too. Tags on a
configuration ARN go through IotTagHandler; the IoT /untag route now
uses the same handler as /tags instead of calling IotService directly.
DescribeEndpoint accepts iot:CredentialProvider, the endpoint type
that pairs with the CREDENTIAL_PROVIDER service type.
* feat(iot): provision AWS::IoT::DomainConfiguration
Adds IotDomainConfigurationCfnProvisioner over the domain configuration
service. Ref is the configuration name; Fn::GetAtt Arn, DomainType and
ServerCertificates resolve to what DescribeDomainConfiguration reports
(ServerCertificates as a JSON string, since attributes are strings).
Like the CloudFormation handler, a configuration is created ENABLED and
a DomainConfigurationStatus of DISABLED is applied with a follow-up
update; tags go through TagResource and are reconciled on update; a
delete disables the configuration first because the API refuses to
delete an ENABLED one. UpdateStack keeps the configuration when the
createOnly properties (DomainName, ServiceType, ValidationCertificateArn,
ServerCertificateArns) are unchanged and replaces it otherwise, with a
fresh generated name when the template names none.
Inventory TSV, fixture wiring and the generated resource-type table
updated.
* docs(iot): describe domain configurations and add the stack integration test
IotDomainConfigurationCfnIntegrationTest provisions the type through a
stack and asserts Ref and every Fn::GetAtt attribute against
DescribeDomainConfiguration, the in-place status update, and that
DeleteStack removes the configuration.
* test(iot): cover domain configurations in the Java and Go SDK suites
Both cases create, describe, list, update and delete a configuration
through the real SDK clients and check the AWS error types on the
duplicate create, the refused delete of an ENABLED configuration and
the describe after deletion.
* fix(iot): remove a renamed domain configuration and keep the status when the template omits it
A template that changes DomainConfigurationName creates the new
configuration and now removes the previous one, as the generated-name
replacement already did; before, the old configuration outlived the
stack. An update without DomainConfigurationStatus no longer forces
ENABLED: the field is omitted and the current status stays, as the AWS
handler does.
The service rejects a structured JSON value where a string, boolean,
list or object is expected instead of turning it into an empty string
or silently clearing the authorizer, and validates the whole update
before touching the stored record.
* fix(iot): let stack rollback remove a domain configuration and make same-name creates atomic
A configuration created by a stack is recorded, with the owned marker,
before the follow-up status update, so a failure there still lets the
create rollback delete it. A replacement that fails after the new
configuration exists removes it again, re-enables the previous one if
it had been disabled on the way out, and marks the resource restored,
as the other provisioners do.
CreateDomainConfiguration checks and stores the name in one step, so
two overlapping creates of the same name cannot both succeed. A tags
value that is not a list is rejected. The Java SDK compatibility case
looks for a leftover configuration instead of swallowing every cleanup
exception.
* fix(iot): point the resource back at the prior domain configuration after a failed replacement
After the unwind removes the replacement and re-enables the previous
configuration, the resource now carries the previous name and
attributes again, without the owned marker, so it describes the
configuration that is still there rather than the one just removed.
* feat(iot): serve the AWS-managed domain configurations
Every AWS account has iot:Data-ATS, iot:Data, iot:CredentialProvider
and iot:Jobs without creating them. They now exist in every region on
first use: AWS_MANAGED, ENABLED, no server certificate, and the address
DescribeEndpoint returns as their domain name. They can be updated and
tagged like any other configuration, but not deleted, as on AWS. A
client that starts by describing iot:Data-ATS gets an answer instead of
a 404.
* fix(iot): report a failed replacement cleanup as a rollback failure
When the unwind of a failed replacement cannot remove the new domain
configuration, the resource now carries the rollback-failure marker
with the reason, so the stack ends in UPDATE_ROLLBACK_FAILED instead of
reporting a clean rollback while the configuration is still there. The
marker moves next to the restored one in CfnRollback so extracted
provisioners can set it; the legacy provisioner keeps its alias.
* fix(iot): serialise every read-modify-write on a domain configuration
Update, delete, tag and untag read a record, change it and write it
back. Two overlapping writers lost each other's changes: sixteen tag
writers on one configuration left seven keys. All of them now run under
the lock the create already used, and a test pins the invariant. A JSON
round trip with the mapper setup persistent storage uses pins that the
model reloads intact.
* fix(iot): keep the prior status the unwind compares against and never delete a same-name replacement
The store hands out its live record, so disabling the prior on the way
to deleting it changed the very object the unwind later compared
against, and a prior whose delete failed half way was left DISABLED
while the stack reported a clean rollback. The status seen at the start
is now kept and used. The test reproduces the aliasing instead of
handing the provisioner a fresh copy per call.
A replacement under the same explicit name normally fails on the
create; if it goes through because the prior vanished in between, the
prior is no longer deleted, which would have removed the configuration
just created.
* fix(iot): tolerate a domain configuration that vanishes while a stack delete disables it
The disable that precedes the delete now treats ResourceNotFoundException
as already deleted, the way the delete itself does. The SDK cases also
enable an already ENABLED configuration, the call a client makes when
it only wants to be sure the configuration is on.
Wire's schema parser drags in KotlinPoet, which drags in kotlin-reflect. Floci
parses .proto and never generates Kotlin. 274.4 to 260.2 MiB, 88.7 to 85.0 MB
gzipped.