Commit Graph
28 Commits
Author SHA1 Message Date
Hector Ventura e3e8903ffa fix(s3): implement S3 Control ListTagsForResource, TagResource, Untag… (#363)
* fix(s3): implement S3 Control ListTagsForResource, TagResource, UntagResource (#341)
* fix(s3): implement S3 Control ListTagsForResource, TagResource, UntagResource (#341)
2026-04-12 20:24:23 -05:00
TiMandHector Ventura e2680cf5f5 test(apigatewayv2): execute-api dispatch compat suite (#372)
* fix(apigatewayv2): fix route matching for path-parameter routes

routeKeyMatchesPath() used String.replace() on Pattern.quote() output,
which performs literal string matching. Path-parameter placeholders like
{id} and {proxy+} were wrapped in \Q...\E by Pattern.quote(), making
them invisible to the replace() calls. All parameterized routes silently
failed to match.

Rewritten to iterate over placeholders with a regex Matcher, quoting
only the literal segments between them. {param} maps to [^/]+ and
{proxy+} maps to .+ as before.

* test(apigatewayv2): add execute-api dispatch compat suite

New ApiGatewayV2ExecuteTest exercises the v2 execute-api dispatch
path end-to-end: create HTTP API, deploy a Lambda backend via
LambdaClient, wire integration/route/stage/deployment, then invoke
through the execute-api URL and assert the Lambda response flows
back through the gateway.

Scope (per PLAN_FLOCI_2 Phase 7 prerequisite decisions):
- pins current dispatch behavior where stage existence and deployment
  status are NOT checked before dispatch (see
  ApiGatewayExecuteController.java:842-847)
- JWT/token authorizer dispatch path only (REQUEST authorizer has no
  dispatch path today - out of scope)
- no mapping templates / request transforms (no layer exists in
  apigatewayv2/model/Integration.java)

Cross-service blame attribution: if this suite fails while the
existing LambdaTest compat suite passes in the same run, the failure
is on the gateway side.

Gated on Docker for the Lambda backend.

* fix(apigatewayv2): support ANY method and empty proxy in route matching

routeKeyMatchesPath now treats ANY as a wildcard that matches all HTTP
methods, matching AWS API Gateway v2 behavior. Also relaxed {proxy+}
regex from .+ to .* so /echo/{proxy+} matches /echo/ with an empty
proxy value.

* fix(test): skip Lambda-dependent execute tests when dispatch unavailable

CI may not support Docker-in-Docker for Lambda containers. Gate
dispatch and JWT+dispatch tests on the first dispatch response so
they skip instead of fail.

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
2026-04-12 20:23:40 -05:00
TiM 58c0ebbabd test(apigatewayv2): management API compat suite with deploymentId fix (#371)
* fix(apigatewayv2): propagate deploymentId when creating a stage

ApiGatewayV2Service.createStage was dropping the deploymentId field
from the CreateStage request, so stages were being created without
their stage->deployment linkage. The management API handler now
stores deploymentId on the Stage model.

Required for stage->deployment round-trip verification; surfaced by
the upcoming ApiGatewayV2ManagementTest which asserts GetStage
returns the deploymentId that CreateStage was called with.

* test(apigatewayv2): add management API compat suite

New ApiGatewayV2ManagementTest covering the control-plane CRUD
surface: API, route, integration, stage, deployment, authorizer
create/get/list/delete round-trips via ApiGatewayV2Client.

Scope:
- create/get/list/delete for each resource
- JWT authorizer shape (token path only)
- stage->deployment linkage (depends on the createStage
  deploymentId fix in the preceding commit)
- round-trips that assert response field shapes match the SDK model

Out of scope (intentional, per PLAN_FLOCI_2 Phase 2):
- No update endpoints - @PATCH/@PUT handlers do not exist in the
  v2 management block (ApiGatewayController.java:783-1020)
- No execute-api / dispatch / Lambda invocation - that is Phase 7
- No REQUEST authorizer coverage - no dispatch path exists today

* fix(test): assert deploymentId in getStages list response

Codex review flagged that the list endpoint assertion only checked
stageName but not deploymentId. Added filtered assertion to verify the
deployment reference survives the list round-trip.

* fix(test): use deploymentStatusAsString() for enum comparison

SDK returns DeploymentStatus enum, not a String. Using
deploymentStatusAsString() avoids type mismatch assertion failure.
2026-04-12 20:01:27 -05:00
TiM cc5508ffd4 test(rds): JDBC-based IAM auth compat suite for RDS proxy (#366)
* test(rds): add JDBC-based IAM auth compat suite

New RdsJdbcCompatTest drives a real JDBC connection through the RDS
proxy. IAM auth happens at the JDBC wire layer, not through RdsClient
management calls, so this is the only way to actually verify IAM
auth behaves against Floci.

Covers:
- create DB instance with IAM authentication enabled
- generate an auth token via the AWS SDK GenerateAuthenticationToken
  path and open a JDBC connection using that token as the password
- reject connections with a tampered/expired auth token
- proxy port allocation per instance, released on delete
- ModifyDbInstance toggling IAM authentication mid-lifecycle

Uses postgresql JDBC driver (already declared in
sdk-test-java/pom.xml:186). Gated on Docker being available so CI
jobs without a docker daemon skip.

* fix(test): address review findings for RDS JDBC compat suite

Restructure IAM toggle test to start with IAM disabled, verify
rejection, then enable via modify and verify success. Relax port
reuse assertion from exact equality to range check (7000-7099) to
avoid coupling to allocator implementation detail. Increase
connection timeout from 45s to 60s for Docker environments.

* fix(test): address round 6 review findings for RDS JDBC compat suite

Fix stale proxyPort after instance replacement (Codex + Gemini).
Restructure IAM tests: create with IAM enabled for positive tests,
add dedicated non-IAM instance test for negative case. Mark IAM
toggle-via-modify test as @Disabled since RdsAuthProxy.iamEnabled
is final and modifyDbInstance does not restart the proxy. Add
port-parameterized connection helpers for multi-instance tests.

* fix(test): assert old password rejection after ModifyDBInstance

Codex review flagged that the password-change test proved the new
password works but never verified the old one stops working. Add an
explicit assertion that connecting with the pre-modify password throws
SQLException before verifying the new password succeeds.

* fix(test): relax non-IAM rejection assertion to accept TCP-level refusal

When IAM is disabled, the proxy may reject at the TCP level ("connection
attempt failed") rather than the PostgreSQL auth level ("password
authentication failed"). Both are valid rejection modes.
2026-04-12 19:49:34 -05:00
TiM 14d51a4093 test(appconfig): edge case coverage for polling, deployments, empty configs (#365)
* test(appconfig): add edge case coverage for polling, deployments, empty configs

Extends both AppConfigIntegrationTest (internal Quarkus) and the
compat-suite AppConfigTest with five additional cases:

- stale configuration token is rejected with BadRequestException once
  a newer next-poll token has been issued
- syntactically invalid configuration token is rejected
- updated deployment is visible when polling with the next-poll token
  (create v2 hosted config, start deployment, confirm response body
  flips to v2 payload and Version-Label header updates)
- RequiredMinimumPollIntervalInSeconds is accepted in the start
  configuration session request but NOT enforced on subsequent polls
  (pins current Floci behavior per PLAN_FLOCI_2 Phase 1 decision:
  storing-but-not-enforcing is the behavior under test, enforcement
  would be a separate feature PR)
- empty configuration profile (no hosted config version, no
  deployment) returns an empty octet-stream body with empty
  Version-Label

No changes to AppConfigDataService or any main sources; this is
test-only expansion over existing scaffolding.

* fix(test): address review findings for AppConfig edge case tests

Document poll-interval 15s as known emulator deviation (AWS returns
the requested value, emulator always returns 15). Add explicit
nextPollIntervalInSeconds() assertions to the SDK compat test.
Clarify null vs "" Version-Label difference between SDK and HTTP
transport layers.
2026-04-12 19:48:36 -05:00
Hector Ventura 812ecf6880 fix(lambda): correct Function URL config path from /url-config to /url (#364) 2026-04-12 03:15:22 -05:00
Hector Ventura 093a465bde fix: merge branch 'main' of github.com:hectorvent/floci 2026-04-11 21:34:09 -05:00
Hector Ventura a987a44acd fix: adding missing lambda test 2026-04-11 21:33:47 -05:00
Hector Ventura 12775e836d fix(secretsmanager): resolve partial ARNs without random suffix (#360) 2026-04-11 21:30:42 -05:00
Hector Ventura 5129897946 fix(s3): include non-versioned objects in ListObjectVersions response (#359) 2026-04-11 21:26:12 -05:00
Hector Ventura fddb1c7bfd fix(cognito): correct HMAC signature computation in USER_SRP_AUTH (#358) 2026-04-11 21:06:43 -05:00
Hector Ventura 095eefc90b fix(eventbridge): implement advanced content filtering operators (#356) 2026-04-11 20:23:18 -05:00
Hector Ventura 101d45e2b0 fix(kms): implement real asymmetric sign/verify and GetPublicKey (#355)
* fix(kms): implement real asymmetric sign/verify and GetPublicKey

* fix(kms): implement real asymmetric sign/verify and GetPublicKey
2026-04-11 18:14:51 -05:00
Conor Heine a0ed51e9d1 feat: ecr (#337) 2026-04-11 09:59:05 -05:00
Kenshin Okinaka 3b6b5fb687 feat(lambda): add PutFunctionConcurrency stub (#325)
* feat(lambda): add PutFunctionConcurrency stub

Add PutFunctionConcurrency, GetFunctionConcurrency, and
DeleteFunctionConcurrency endpoints:

  PUT    /2017-10-31/functions/{FunctionName}/concurrency
  DELETE /2017-10-31/functions/{FunctionName}/concurrency
  GET    /2019-09-30/functions/{FunctionName}/concurrency

The stored ReservedConcurrentExecutions value is persisted on
LambdaFunction and echoed back, but it is not enforced at invocation
time — invocation slots in LambdaExecutorService / WarmPool are not
bounded, and the account-level concurrent execution limit is not
validated.

* fix(lambda): tighten PutFunctionConcurrency validation
2026-04-11 09:40:12 -05:00
Hector Ventura e4d8d44724 feat: adding appconfig service (#324)
* feat: adding appconfig service
* fix: unittest appconfig service
2026-04-10 02:43:08 -05:00
GitMarco 8bac81807e Fix(dynamoDB): handle null for Java AWS SDK v2 DynamoDB EnhancedClient correctly (#309)
* Fixes DynamoDB support for adding values to a list for the SET ... ADD query/command
* Revert "Fixes DynamoDB support for adding values to a list for the SET ... ADD query/command"
* fix(dynamoDB): support Java AWS SDK v2 enhanced client null values
* fix(dynamoDB): added compatibility integration test for DynamoDB EnhancedClient. Including suggestion for default host+port for test fixture, so `mvn test -q` can work even without setting the env variable set.
2026-04-09 17:53:48 -05:00
Fred PeñaandHector Ventura 04cbeb542f fix: Implement S3 Lambda notifications (#278)
* feat: Implement S3 Lambda notifications

Add support for S3 event notifications to AWS Lambda functions.
- Introduce `LambdaNotification` model to represent Lambda configurations.
- Update S3 controller to parse and serialize `CloudFunctionConfiguration` in notification XML.
- Implement logic in `S3Service` to extract Lambda ARN details and invoke functions upon matching S3 events.
- Add unit and integration tests for Lambda notification configuration persistence and event triggering.

* test(s3-notifications): Add S3 bucket notification compatibility tests

Introduces `S3NotificationsTest` to verify S3 event notifications for SQS, SNS, and Lambda targets.
Includes tests for notification configuration round-trip and Lambda invocation with object filters.
Adds `s3NotificationLoggerZip` to `LambdaUtils` for creating a test Lambda function.

Co-authored-by: Hector Ventura <hectorvent@gmail.com>
2026-04-08 23:11:20 -05:00
Hector Ventura 9ca82e5748 feat(eventbridge): add InputTransformer support and S3 event notifications (#294)
* feat(eventbridge): add InputTransformer support for rule targets

Support InputPathsMap + InputTemplate on EventBridge targets so events
can be projected to a subset of fields before delivery to SQS/SNS/Lambda.

- Add InputTransformer model with inputPathsMap and inputTemplate fields
- Parse and serialize InputTransformer in PutTargets / ListTargetsByRule
- Apply transformer in invokeTarget: extract JSONPath variables, substitute
  <varName> placeholders in the template
- Use Jackson JsonPointer for JSONPath resolution ($.a.b.c → /a/b/c)
- Add unit tests for extractJsonPath and applyInputTransformer edge cases
- Add integration tests covering full put/list/deliver/transform flow

Fixes #140
2026-04-08 16:23:59 -05:00
Hector Ventura 4724db97be feat: add KMS GetKeyPolicy, PutKeyPolicy and fix CreateKey Tags (#258 #259 #269) (#280) 2026-04-08 01:37:38 -05:00
Hector Ventura 5e8b39c1aa fix: resolve Cognito auth, token, and user lookup issues (#218 #220 #228 #229 #233 #234 #235) (#279) 2026-04-08 01:30:26 -05:00
Hector Ventura 6d5839bec8 fix(s3): versioning IsTruncated, PublicAccessBlock, ListObjectsV2 pagination, K8s virtual host routing (#276) 2026-04-07 22:57:33 -05:00
Conor Heine 13916913e8 fix: handle base64-encoded ACM cert imports (#248) 2026-04-07 13:20:27 -05:00
Hector Ventura 18bee5b278 feat(sfn): nested state machine execution and activity support (#254, #91) (#266) 2026-04-07 12:41:25 -05:00
Hector Ventura 37026b75f1 feat(secretsmanager): add support for BatchGetSecretValue (#115) (#264) 2026-04-07 12:41:06 -05:00
Hector Ventura 0ef6f87cba feat(lambda): add missing runtimes, fix handler validation, long path… (#256)
* feat(lambda): add missing runtimes, fix handler validation, long path extraction, and code signing config
* fix: removed unrequired go.sum and package-lock.json from compatibility test
2026-04-07 12:40:30 -05:00
Kenshin Okinaka 48b6ca3475 feat(scheduler): add EventBridge Scheduler service (#260)
* feat(scheduler): add EventBridge Scheduler ScheduleGroup CRUD

Introduces the scheduler service skeleton with ScheduleGroup CRUD over
the REST JSON protocol at /schedule-groups/{Name}. The default group is
lazily seeded on first access, mirroring the EventBridge default bus
pattern. Covers Create/Get/Delete/List, region scoping, name validation,
and the default-group delete guard.

* feat(scheduler): add Java SDK compatibility tests for ScheduleGroup CRUD
* feat(scheduler): add Schedule CRUD operations
2026-04-07 12:36:59 -05:00
Conor Heine eeefb729c4 test: move compatibility tests into this repo (#225)
* test: move compatibility tests into this repo
* fix: add StatisticValues parsing to CloudWatchMetricsJsonHandler
* fix: add missing required abstract methods to EmulatorConfig in EventBridgeSchedulerIntegrationTest
* test: add sdk tests for multipart S3 copy coverage
* fix: cover and fix smithy cbor and multipart s3 copy regressions
* test: migrate more test coverage to new folder
* test: add missing ec2 expectation in healthcheck test
* docs: update READMEs in `./compatibility-tests`
2026-04-06 09:35:53 -05:00