* feat: add the getRequiredVpc method
* feat: add the methdis getRequiredSubnet and getRequiredInstance
* feat: add the getRequiredMethod for addr, igw, sg and rt
* fix: fix sintax erros on the new required methods
* fix: fixed the erros on subnet method, from subenete to subnet
* fix: fixed the name of getRequiredVpc method on createSecurtyGroup method
* fix(ecs): reconcile task lifecycle when container exits naturally
ECS tasks stayed in RUNNING indefinitely after the underlying Docker
container exited, causing `aws ecs wait tasks-stopped` to hang forever
and exitCode to remain null. Fixes#889.
The 5-second reconciler now also polls running task handles. When all
containers for a task have exited, it atomically claims the handle
(guarding against a concurrent explicit stopTask), closes log streams,
removes the Docker containers, and transitions the task to STOPPED with
stoppedAt and per-container exitCode populated.
Explicit stopTask is also fixed: it now calls stopTaskAndCollectExitCodes
to capture exit codes before the container record is removed, and
propagates them to the ECS container model. An idempotency guard prevents
double-decrement of runningTasksCount when stopTask is called on a task
already transitioned by the reconciler.
cleanupStoppedTask is used by the reconciler to avoid re-inspecting
containers whose exit codes were already collected in the inspection pass.
* fix(ecs): capture exit code after stop, not before
stopTaskAndCollectExitCodes inspected containers before stopping them,
so getExitCodeIfStopped returned null for still-running containers and
the exit code was lost once stopAndRemove deleted the record.
Split the operation into two phases: stop all containers first, then
inspect exit codes, then remove. Containers already exited skip the
stop call silently.
* fix(s3): clean up versioned file data on permanent version deletion
Summary
- Adds deleteVersionedFile() to remove a version's file data from memoryDataStore (or disk in persistent mode) when it is permanently deleted via DeleteObject with a VersionId. Previously only objectStore (metadata) was cleaned up, leaving stale file data behind indefinitely.
- When the deleted version was the latest and all other versions are also gone, the latest file pointer in memoryDataStore is now also removed (deleteFile).
- When the deleted version was the latest and a prior version is promoted to latest, the promoted version's content is written to the latest file pointer so that GetObject without a VersionId returns the correct data. A regression test confirms this was previously broken (returned the deleted version's content
instead of the promoted one's).
This follows the same pattern as #966, which fixed the analogous gap in objectStore cleanup.
Test plan
- S3VersioningServiceTest#getObjectReturnsPromotedContentAfterLatestVersionDeleted — fails before this change, passes after (confirmed manually)
- S3VersioningIntegrationTest#deleteAllVersionsThenReuploadSameContent_noResurrection — end-to-end via HTTP
- Full test suite: ./mvnw test
* fix(s3): clean up versioned file data on permanent version deletion
* fix(s3): clean up versioned file data on permanent version deletion
\$or was silently ignored — the key was never read from the parsed
pattern, so rules using \$or routed every source/detail-type-matched
event regardless of the OR conditions.
Add \$or handling to both matchesPattern (top-level) and
matchesDetailNode (detail-level):
- iterate each sub-pattern; return false if none match
- skip the \$or key in the regular field-by-field AND loop
Top-level \$or sub-patterns are full event patterns, so each is
evaluated via recursive matchesPattern call. Detail-level sub-patterns
are field-match objects, evaluated via recursive matchesDetailNode on
the same actual node.
* feat: add global CORS filter for browser-based local development
Introduces a JAX-RS filter that adds CORS headers for configured origins,
enabling browser clients to call Floci directly during local development.
Service-level CORS configurations take precedence as the filter only fills
missing headers.
Configurable via EXTRA_CORS_ALLOWED_ORIGINS (or floci.security.extra-cors-allowed-origins)
with optional extra allowed/exposed headers and a disable flag.
* feat: fix hit for cors by each request
---------
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
* fix(apigw-v2): populate pathParameters in Lambda proxy event for HTTP API integrations
buildV2ProxyEvent never called extractV2PathParams, so pathParameters was always
absent from the Lambda event payload. Frameworks that rely on it for routing (e.g.
the tRPC AWS Lambda adapter via ANY /{proxy+}) failed with path routing errors.
Wire extractV2PathParams into buildV2ProxyEvent after the queryStringParameters
block, mirroring how dispatchHttpProxyV2 already uses it. Also relax the method
visibility to package-private to allow the new unit tests to call it directly.
* test(ec2): scope Ec2NetworkInterfacePaginationTest to its own VPC
DescribeNetworkInterfaces was called without a filter, so the tests
counted ENIs created by other concurrently-running sdk-test-java tests
(e.g. sdk-test-instance from Ec2DescribeNetworkInterfacesTest), causing
intermittent failures when test ordering meant those ENIs existed at
assertion time.
Adds a vpc-id filter helper scoped to the VPC created in @BeforeAll so
each test only sees the 6 ENIs it owns.
* test(kms): add grant compatibility contracts
* feat(kms): support empty ListGrants
* feat(kms): add CreateGrant and persisted ListGrants round trip
* test(kms): add create grant round trip coverage
* feat(kms): add grant pagination, filters, and ListRetirableGrants
* test(kms): add pagination, filter, and retirable grant coverage
* feat(kms): add RevokeGrant administrative delete
* test(kms): add RevokeGrant unit and integration coverage
* feat(kms): add RetireGrant with token and key+grant retirement paths
* docs(kms): document grant lifecycle operations and enforcement scope
* fix(kms): include RetiringPrincipal in ListGrants response
The handleListGrants handler was omitting RetiringPrincipal from the
JSON response even when the grant had one set. This meant grants
created with a retiring principal were invisible through ListGrants,
while ListRetirableGrants worked fine. Adds the missing serialization
to match the GrantListEntry AWS spec.
Closes the follow-ups from #1025: domain option blocks now survive
CreateDomain → DescribeDomain, and DescribeInstanceTypeLimits returns
family-appropriate metadata instead of one canned EBS response.
- VPCOptions, AdvancedSecurityOptions, EncryptionAtRestOptions,
NodeToNodeEncryptionOptions, and DomainEndpointOptions now round-trip
through the management API. Real SDK clients (Terraform / CDK / Pulumi)
read these back to detect drift; previously they were silently dropped.
- Master passwords are accepted but never echoed back, matching AWS.
- AdvancedSecurityOptions.Enabled + InternalUserDatabaseEnabled without a
master user is rejected with ValidationException, as is
CustomEndpointEnabled without a CustomEndpoint value.
- New OpenSearchInstanceTypes catalog drives DescribeInstanceTypeDetails
and DescribeInstanceTypeLimits. or1.* now reports s3-backed storage
with the larger 8-36 TiB ceiling AWS documents; i3.* reports
instance-store; everything else stays EBS at 3584 GiB. Unknown types
fall back to a generic EBS spec instead of 404'ing.
- Floci still boots one Docker container per domain regardless of
instance type, but the management metadata now matches AWS so
introspection tools work correctly.
Tests: 60 OpenSearch tests pass. New: 6 OpenSearchInstanceTypesTest unit
tests + 6 OpenSearchDomainOptionsIntegrationTest end-to-end + 2
or1 / EBS instance-type-limit integration tests.
Live Docker validation: VPC + Encryption + N2N + Endpoint round-trip
on a real running domain; or1.2xlarge.search returns s3-backed/36864 GiB
while m6g.large.search returns ebs/3584 GiB; FGAC validation fires
correctly when MasterUserName is omitted.
* feat: support AWS::Serverless-2016-10-31 SAM Transform in CloudFormation
* fix: address review feedback for SAM transform
- Skip IAM role generation when explicit Role ARN is provided
- Add DeleteStack cleanup in @AfterEach to prevent IAM role leakage
- Make SamTransformProcessor a field on CloudFormationService
- Remove redundant DependsOn on Lambda (implicit via Fn::GetAtt)
- Add BillingMode: PAY_PER_REQUEST to SimpleTable expansion
- Reduce verbose inline comments to match project style
- Add assertion that explicit Role skips role resource creation
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Dixit R Jain <dixitrjain@Mac.lan>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
PR #923 routed handleRangeRequest through appendObjectHeaders so 206
partial-content responses would pick up stored headers and response-*
overrides. That also pulled in appendChecksumHeaders, which emits
obj.getChecksum() — the whole-object checksum — onto partial responses.
SDKs that validate the checksum against the received body then fail, e.g.
a `bytes=4-7` GET returns the full-object CRC64NVME and the AWS CLI reports:
Expected checksum CRSFynAYcw4= did not match calculated checksum: LQYlQwQYKmA=
Real S3 does not return whole-object checksum headers on ranged responses.
Add an includeChecksum flag to appendObjectHeaders (defaults true for the
existing GET/HEAD callers) and pass false from handleRangeRequest. The
override + restored-header improvements from #923 are unaffected.
Reported by @dwhjames on #923.
Fixes Terraform provider crash when creating aws_instance against floci.
Changes:
- Add rootVolumeId field to Instance model
- Create root EBS volume (gp3) with VolumeAttachment on instance launch
- Include volumeId in blockDeviceMapping XML response (null-safe)
- Delete root volume on instance termination (deleteOnTermination behavior)
- Use inst.getRootDeviceName() for volume attachment device name
- Add disableApiStop/disableApiTermination model fields and
DescribeInstanceAttribute support (with comment documenting known
limitation that ModifyInstanceAttribute does not yet wire these)
- Add integration tests for blockDeviceMapping volumeId, DescribeVolumes
in-use state, DescribeInstanceAttribute, and volume cleanup on terminate
Ref: floci-io/floci#871
* feat(ec2): add partial DescribeNetworkInterfaces (phases 1-3)
Wire DescribeNetworkInterfaces into the EC2 query handler with ENI
data derived from running instances. Covers:
- Empty response skeleton
- Basic ENI mapping (networkInterfaceId, subnetId, vpcId, groupSet, attachment)
- Full field coverage (privateIpAddressesSet, EIP association, tagSet,
availabilityZone, interfaceType, attachTime, deleteOnTermination)
Remaining: filter support, pagination, error handling, Terraform compat
validation (phases 4-6 for #1031).
* feat(ec2): add filter support for DescribeNetworkInterfaces (phase 4)
Support these filter keys: network-interface-id, subnet-id, vpc-id,
group-id, status, private-ip-address, description, owner-id, mac-address,
private-dns-name, tag:<key>, tag-key. Filters use AND semantics.
No-match filters return HTTP 200 with empty networkInterfaceSet.
* feat(ec2): add pagination and error handling for DescribeNetworkInterfaces (phases 5-6)
- Add NetworkInterfaceListResult record for paginated responses
- Implement offset-based MaxResults/NextToken pagination
- Add Base64 token encode/decode for pagination cursor
- Validate MaxResults range (5-1000) and MaxResults+NetworkInterfaceId conflict
- Conditionally emit nextToken in XML response (only when truncated)
- Add InvalidNetworkInterfaceID.NotFound for non-existent IDs
- Add InvalidNetworkInterfaceID.Malformed for IDs not starting with 'eni-'
- Track found IDs via HashSet for accurate NotFound detection
* test(ec2): add DescribeNetworkInterfaces pagination, error, and multipage tests
- 5 pagination validation tests (MaxResults range, param conflict, invalid token)
- 1 pagination success test (MaxResults > available ENIs, no nextToken emitted)
- 2 error handling tests (InvalidNetworkInterfaceID.NotFound and .Malformed)
- 1 self-contained multipage pagination test (launches 5 extra instances,
verifies MaxResults=5 truncation, NextToken continuation, final page cleanup)
- All 87 Ec2IntegrationTest tests pass
* test(ec2): add SDK and Terraform compat tests for DescribeNetworkInterfaces
- Add Ec2NetworkInterfacePaginationTest with 4 scenarios:
all 6 ENIs without pagination, MaxResults=5 truncation,
NextToken continuation (no overlap between pages),
and token re-use stability
- Add eni_destroy.bats Terraform compat test verifying destroy succeeds
on VPC+subnet+SG now that DescribeNetworkInterfaces is implemented
- Add minimal Terraform config (VPC 10.0.0.0/16, subnet, SG) for ENI test
* fix(ec2): align DescribeNetworkInterfaces MaxResults errors
* test(terraform): make ENI destroy compat test runnable
* fix(elbv2): offload Lambda invocation to a worker thread
ElbV2DataPlane.invokeLambdaTarget called lambdaService.invoke(...)
synchronously inside req.bodyHandler, which runs on a Vert.x
event-loop thread. The invocation blocks for seconds while a cold
Lambda container warms and polls the Runtime API. The Runtime API
itself is a Vert.x HttpServer, so blocking the listener's event loop
starved the runtime — every ALB → Lambda request hung until the
function timed out and returned 502.
Wrap the invocation in vertx.executeBlocking and shape the response
on the resulting Future, mirroring WebSocketHandler.invokeIntegration.
Add ElbV2LambdaTargetDataPlaneIntegrationTest, which deploys a real
Node.js Lambda, sends an HTTP request through the listener port, and
asserts the Lambda's response shape. The existing
ElbV2LambdaTargetIntegrationTest only covered the control plane and
ran with floci.services.elbv2.mock=true, which is why this bug went
undetected. The new test uses @TestProfile to disable the ELBv2
mock so the data plane is exercised end-to-end.
* fix(elbv2): address review feedback on ALB→Lambda fix
- Pass ordered=false to vertx.executeBlocking so independent ALB
requests run in parallel on the worker pool instead of being
serialized per context.
- Use StandardCharsets.UTF_8 when encoding the Node.js handler source
so the generated zip is byte-deterministic across platforms.
- Make cleanup robust to partial failures by null-guarding each
delete and accepting 404 for the Lambda function delete. Cleanup
stays as a final ordered @Test (rather than @AfterAll) because
the Quarkus REST endpoint is torn down before JUnit's @AfterAll
runs; an HTTP-based teardown there would fail with connection
refused. Bumped the order to Integer.MAX_VALUE so the cleanup
step keeps running last regardless of future test additions.
* test(elbv2): align ALB→Lambda dataplane test with the bug repro
Switch the test Lambda from nodejs20.x to python3.11 so it mirrors
the reproduction script in the bug report verbatim. The handler now
returns {"statusCode": 200, "body": "ok"} and the assertion drops
the path-echo and content-type checks — status 200 plus body "ok"
is still a tight enough signal that the entire ALB → Lambda data
plane round-trip succeeded.
* test(elbv2): bump dataplane test runtime to python3.14
Match the latest Python runtime supported by Floci's image map
and keep alignment with the bug repro.
Previously AWS::CloudFormation::Stack was stubbed — it returned a synthetic
stack ID but never fetched or deployed the child template, so all resources
defined in nested stacks were silently skipped.
Intercept AWS::CloudFormation::Stack in CloudFormationService.executeTemplate()
before delegating to the provisioner. Resolve TemplateURL via the template
engine, fetch the child template from the bootstrap S3 bucket, create a child
Stack, and execute it recursively on the same thread. Child outputs are surfaced
as Outputs.X attributes on the parent resource so Fn::GetAtt cross-stack
references resolve correctly.
Removes the provisionNestedStack stub from CloudFormationResourceProvisioner.
Closes#1051
Centralizes engine versions in a new OpenSearchVersions catalog and
threads them through CreateDomain / UpdateDomainConfig / UpgradeDomain
validation plus per-version Docker image resolution.
- Adds OpenSearch 3.0–3.6 and 2.15 / 2.17 / 2.19 to the supported list;
default version is now OpenSearch_2.19 (was 2.11).
- EngineVersion now maps to a concrete image tag at start time, so
CreateDomain --engine-version=OpenSearch_3.6 actually pulls
opensearchproject/opensearch:3.6.0 instead of always pulling the
default 2.x rolling tag.
- Elasticsearch_7.10 / 7.9 / 7.8 now resolve to their OSS images on
docker.elastic.co; previously these versions were advertised but the
service silently ran an OpenSearch 2.x container under the hood.
- OpenSearch 2.12+ start scripts require OPENSEARCH_INITIAL_ADMIN_PASSWORD
even when the security plugin is disabled. Set automatically.
- The Elasticsearch OSS distribution ships without x-pack, so any xpack.*
setting is rejected as an unknown setting at boot. Don't touch xpack
env on Elasticsearch_* domains.
- CreateDomain / UpdateDomainConfig / UpgradeDomain now reject unknown
engine versions and unsupported upgrade hops with ValidationException.
- GetCompatibleVersions returns the full source→targets matrix when
domainName is omitted and a single domain-scoped row when set, matching
AWS's documented behavior.
- INSTANCE_TYPES catalog gains Graviton2/3 (m6g, r6g, c6g, m7g, r7g, c7g)
and or1.* OpenSearch-optimized families that AWS now exposes.
Tests: 44 OpenSearch tests pass (31 integration + 13 new
OpenSearchVersionsTest unit tests). All four engine version paths
exercised live against Docker (OS 3.6, OS 2.11, ES 7.10 OSS, unknown
version rejection).
IamService constructed its accountId once at startup from
config.defaultAccountId() (always '000000000000'), so every CreateRole,
CreateUser, CreateGroup, CreatePolicy and CreateInstanceProfile call
returned an ARN with the wrong account — identical to the STS bug fixed
in #983.
Inject RegionResolver and call regionResolver.getAccountId() per request
inside iamArn(), so the ARN reflects the caller's account when a 12-digit
AKID is used.
Add integration tests iamCreateRoleHonoursTwelveDigitAccessKey and
iamGetRoleHonoursTwelveDigitAccessKey to cover the fix.
Co-authored-by: Simon B. Laursen <sls@bankdata.dk>
* feat: support PublishLayerVersion, GetLayerVersion, ListLayerVersions, DeleteLayerVersion and layer attachment
Implements full Lambda Layer lifecycle:
- PublishLayerVersion: POST /2018-10-31/layers/{name}/versions
- GetLayerVersion: GET /2018-10-31/layers/{name}/versions/{ver}
- ListLayerVersions: GET /2018-10-31/layers/{name}/versions
- DeleteLayerVersion: DELETE /2018-10-31/layers/{name}/versions/{ver}
- ListLayers: GET /2018-10-31/layers (now returns real data)
Layer content is extracted to disk and copied into Lambda containers
at /opt during launch, matching real AWS behavior where layers are
available at /opt/nodejs/node_modules/ etc.
CreateFunction and UpdateFunctionConfiguration already stored layer
ARNs; this commit makes the layer data actually resolvable and
mountable at runtime.
Closes#875
* feat: add Node SDK compatibility tests for Lambda Layers
Adds lambda-layers.test.ts covering:
- PublishLayerVersion (version 1 and 2)
- GetLayerVersion (success and 404)
- ListLayerVersions
- ListLayers
- DeleteLayerVersion (success, idempotent for non-existent)
- Layer attachment on CreateFunction
- Layer round-trip via GetFunctionConfiguration
- Layer update/removal via UpdateFunctionConfiguration
@pulumi/aws 6.66+ calls DescribeListenerAttributes and
DescribeCapacityReservation when refreshing Listener and LoadBalancer
resources. Floci returned UnsupportedOperation for both, which crashes
the AWS provider.
Implement DescribeListenerAttributes and ModifyListenerAttributes
(mirroring the existing load balancer / target group attribute handlers,
backed by the Listener.attributes map) and DescribeCapacityReservation
(reports an empty reservation, since Floci does not reserve load balancer
capacity). Add integration coverage for all three actions and their
not-found error paths.
ID tokens were missing all standard user attributes (e.g. given_name,
family_name, email_verified) and every custom:* attribute, leaving only
the AWS-internal claims. Copy the stored user attributes into the ID
token (id_token only, not access_token) and coerce email_verified,
phone_number_verified, and updated_at to their OIDC-spec JSON types
instead of leaving them as strings.
* fix(s3): persist inline x-amz-tagging header on PutObject
PutObject silently dropped tags supplied via the x-amz-tagging request header — the controller did not read the header and tags never reached the object store. Adds a header parameter, parses the URL-encoded key=value tag set (with 10-tag and 8 KB limits), and persists via the existing putObjectTagging path so behavior matches real AWS S3.
* test(s3): add negative-path tests for inline x-amz-tagging header
Cover malformed pair, empty key, duplicate key, >10 tags, and oversized header. Note in S3Controller that the InvalidArgument and BadRequest codes match observed real-AWS behavior even though they are not in the S3 Smithy service model
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
Implement Lambda REQUEST authorizer invocation for HTTP API routes
configured with authorizationType=CUSTOM. Previously, Floci silently
skipped authorization for these routes.
Supports:
- Payload format version 1.0 (REST API-compatible event shape)
- Payload format version 2.0 (HTTP API-native event shape)
- Simple responses (isAuthorized: true/false) when enableSimpleResponses=true
- IAM policy document responses (policyDocument with Allow/Deny)
- Identity source validation ($request.header.X, $request.querystring.X)
returning 401 without invoking Lambda when sources are missing
Closes#812
ensureStarted() reserved a port from the 5100-5199 pool but never
released it when the registry container failed to start. Because
PortAllocator is @ApplicationScoped, each failed start leaked a port
permanently, eventually exhausting the pool and masking the real
failure with "No free port available in range 5100-5199".
Widen the try to cover spec building and addPersistenceMounts (the
first Docker call in named-volume mode) and release the port on
failure unless the container started, mirroring the existing pattern
in RuntimeApiServerFactory and Ec2ContainerManager.
UpdateStage patch paths of the form /<resourcePath>/<httpMethod>/<settingKey>
(e.g. /*/*/metrics/enabled, /*/*/throttling/burstLimit, /pets/GET/caching/enabled)
were silently accepted but discarded, so GetStage returned no methodSettings
field and the Terraform aws_api_gateway_method_settings resource failed with
"empty result" when read after apply.
Adds a MethodSetting POJO with the AWS-documented fields, stores them on
Stage in a Map keyed by "<resourcePath>/<httpMethod>", parses the patch path
suffix against the canonical setting keys (metrics, logging, throttling,
caching), and serialises the map under "methodSettings" in toStageNode so
GetStage round-trips the values the patch wrote.
New ApiGatewayStageMethodSettingsIntegrationTest covers the three Terraform
scenarios (wildcard throttling + logging, wildcard caching, and per-method
overrides); verified failing on main and passing with this change.
* fix: populate full APIGatewayRequestAuthorizerEvent for REQUEST authorizers
Closes#807.
Previously, REQUEST-type Lambda authorizers received only 'type' and
'methodArn'. This commit populates the complete event shape matching
real AWS behavior:
- headers, multiValueHeaders
- queryStringParameters, multiValueQueryStringParameters
- pathParameters (empty object when none, not null)
- stageVariables (from Stage config, null when unconfigured)
- requestContext with accountId, apiId, resourceId, resourcePath,
path, httpMethod, stage, requestId, requestTimeEpoch
- requestContext.identity with sourceIp, userAgent, apiKey, clientCert
Also enriches the AWS_PROXY integration event (buildProxyEvent) with:
- Full identity object (all null fields matching AWS wire format)
- domainName, domainPrefix, protocol, requestTime, extendedRequestId
- stageVariables from Stage configuration
- API key resolution from usage plan keys
Refactors shared logic into reusable helpers:
- putSingleValueHeaders, putMultiValueHeaders
- putQueryStringParameters, putMultiValueQueryStringParameters
Resolves API key once per request (not duplicated across authorizer
and proxy event builders).
* fix: remove AWS SDK deps from main pom, rewrite test with RestAssured
Addresses review feedback: AWS SDK dependencies should not be in the
main Floci project. Rewrites ApiGatewayRequestAuthorizerIntegrationTest
to use only RestAssured for management-plane and execute-api calls,
matching the established pattern of all other @QuarkusTest tests.
---------
Co-authored-by: Dixit R Jain <dixitrjain@Dixits-MacBook-Pro.local>
Co-authored-by: Dixit R Jain <dixitrjain@Mac.lan>
Real AWS SNS PublishBatch surfaces an attribute parsing error
(e.g. invalid base64 in a BinaryValue) as a Failed entry with
InvalidParameterValue + SenderFault=true, and continues publishing
the remaining valid entries.
Both SnsQueryHandler and SnsJsonHandler used to let the AwsException
from parseMessageAttributes propagate out of the batch loop, returning
a 400 (Query) or letting the exception bubble (JSON) and aborting the
whole batch. They now catch the per-entry parse failure, record it as
a Failed entry, and merge it with the regular batch result.
Fix#992
* fix(lifecycle,appconfig): TLS startup readiness and listHostedConfigurationVersions
Fixes two independent issues:
is enabled, Quarkus binds the HTTP backend on port 4510 and the HttpServerStart
event fires with that port, so markStartCompleted/markReadyCompleted were never
called and /_floci/init always returned ready=false. Fix: derive the expected
port from config.tls().enabled() at observer time.
/applications/{appId}/configurationprofiles/{profileId}/hostedconfigurationversions.
Unmatched requests fell through to S3Controller's catch-all and returned a
NoSuchBucket XML error. Fix: add HostedConfigurationVersionSummary model,
listHostedConfigurationVersions service method, and the missing GET route.
* fix(commit-checks): fix action that check commit format
S3 object keys under .well-known/ (e.g. bucket/.well-known/jwks.json) were
being routed to CognitoWellKnownController instead of S3Controller. The
controller threw ResourceNotFoundException ("User pool not found"), masking
the S3 object even though list-objects-v2 and head-object returned it.
Real Cognito UserPool IDs always contain an underscore (region prefix +
underscore + random suffix, e.g. us-east-1_xxx); AWS S3 bucket names forbid
underscores. Constraining the {poolId} path parameter to "[^/_]+_[^/]+"
ensures that any first path segment without an underscore falls through to
S3Controller, restoring the documented S3 behaviour without affecting
existing Cognito tests.
Adds S3WellKnownKeyIntegrationTest covering both jwks.json and
openid-configuration object keys; verified failing on main and passing with
this fix.
* fix(sns): preserve binary message attributes through publish and fan-out
Parse BinaryValue on Publish/PublishBatch in both JSON and Query handlers,
and base64-encode binary attributes in the SNS-to-SQS and Lambda JSON
envelopes so binary attributes survive fan-out instead of being dropped.
Closes#988
* fix(sns): return AWS-style 400 for invalid base64 and align DataType default
Address Copilot PR feedback:
- Catch IllegalArgumentException from Base64 decoding in both Publish and
PublishBatch attribute parsing (JSON + Query handlers) and surface an
InvalidParameterValue / HTTP 400 error consistent with other SNS errors.
- Default DataType to "Binary" in SnsJsonHandler when only BinaryValue is
provided, matching SnsQueryHandler behavior.
- Extract a shared parseMessageAttributes helper in each handler to remove
duplication between Publish and PublishBatch.
* fix(sns): give new tests distinct @Order values and drop Base64 FQN
Address maintainer review feedback:
- Move new binary-attribute tests off @Order(9) (already used by
publish_fanOutToSqsSubscriber) to @Order(18)/@Order(19) so their
drainQueue calls don't race with other order-9 tests.
- Import java.util.Base64 in SnsQueryHandler, SnsJsonHandler, and
SnsService and drop the fully-qualified references.
PUT /{bucket}?requestPayment was not recognised as a sub-resource by
S3Controller, so the request fell through to the bucket-creation
handler. For any pre-existing bucket that returned
BucketAlreadyOwnedByYou (HTTP 409) — which broke real workloads such as
Terraform's aws_s3_bucket_request_payment_configuration on every
re-apply.
Add explicit handling for the requestPayment sub-resource, mirroring
the existing OwnershipControls / Acl flow:
- Bucket model gains a requestPaymentPayer field.
- S3Service.putBucketRequestPayment validates the bucket exists
(NoSuchBucket / 404) and the payer value (BucketOwner | Requester);
invalid payers return MalformedXML / 400 to match real S3.
- S3Service.getBucketRequestPayment returns the canonical
RequestPaymentConfiguration XML, defaulting to BucketOwner when never
set — real S3 never returns 404 for GetBucketRequestPayment.
- Controller dispatches PUT and GET ?requestPayment to the new methods.
No DELETE handler is added; AWS does not expose one.
Regression test asserts the original Terraform-breaking case (a second
PUT on an existing bucket must return 200, not 409) along with default
GET, MalformedXML on invalid payer, and NoSuchBucket on missing bucket.
* fix(s3): restore object on delete marker removal and add missing version headers
* fix(s3): use millisecond precision for version ordering to avoid same-second race condition
* test(s3): add regression tests for versioned delete behaviors and response headers
* fix(sts): honour 12-digit access key as account ID
GetCallerIdentity, AssumeRole, AssumeRoleWithWebIdentity,
AssumeRoleWithSAML, and GetFederationToken now resolve the account ID
from the request-scoped RegionResolver instead of the static IAM
default, so ARNs match the per-account namespace used by SNS, SQS, S3,
etc. Closes#981.
* fix(sts): derive AssumedRoleUser account from RoleArn
AssumeRole, AssumeRoleWithWebIdentity, and AssumeRoleWithSAML now build
AssumedRoleUser.Arn using the account ID parsed from the supplied
RoleArn, falling back to the caller's account only when the ARN is
missing or unparseable. This matches AWS cross-account assume-role
behaviour: the resulting ARN belongs to the target role's account, not
the caller's.
AWS SQS resolves a plain queue name (e.g. "TestQueue") to the full queue URL transparently. Floci required the full URL, causing NonExistentQueue errors for clients that pass only the name - a pattern common in AWS SDK for Java v2 applications.
Add normalizeQueueUrl() which expands bare names to the canonical {baseUrl}/{accountId}/{queueName} form before storage-key computation, covering all SQS operations that accept a QueueUrl parameter.
* fix(s3): accept region-qualified virtual-host form bucket.s3.<region>.<host>
AWS SDKs may send Host: bucket.s3.<region>.<host> for virtual-hosted
style requests. Recognize this form against both the configured base
hostname and the localhost fallback so the bucket is extracted correctly.
Closes#977
* test(s3): add integration coverage for region-qualified virtual-host
Exercise Host: <bucket>.s3.<region>.localhost end-to-end: HEAD returns
404 for a missing bucket, PUT creates it, HEAD then returns 200, and
PUT/GET on an object roundtrips.
GetObjectLockConfiguration was returning a 200 with ObjectLockEnabled=Enabled
for every bucket regardless of whether object lock was enabled at creation time.
Real AWS returns ObjectLockConfigurationNotFoundError (HTTP 404) when the bucket
was not created with x-amz-bucket-object-lock-enabled: true.
Added an isObjectLockEnabled() guard in S3Service before returning the retention
configuration. The controller's existing try-catch routes the AwsException to
the XML error response with no additional changes needed.
Fixes#960
The Smithy RPC v2 CBOR protocol spec requires the response header to be
sent as `smithy-protocol` (lowercase). The previous casing `Smithy-Protocol`
caused SDK clients that perform a case-sensitive check on the response header
to fail protocol negotiation.