Commit Graph
129 Commits
Author SHA1 Message Date
Fred Peña cf2c705b7d fix: support DynamoDB Query BETWEEN and ScanIndexForward=false (#160)
* docs: expand community section with GitHub Discussions
* docs: simplify supported services table
* fix: support DynamoDB Query BETWEEN and ScanIndexForward=false
* docs: simplify supported services table
2026-04-01 16:55:51 -05:00
yoyo 675d5a33d0 Feat/cfn auto physical name generation (#163)
* refactor(cfn): add stackName param and generatePhysicalName utility

Add stackName parameter to provision() method signature and pass it
from CloudFormationService.executeTemplate(). Add generatePhysicalName
helper that generates AWS-like names: {stackName}-{logicalId}-{suffix}.

No resource naming behavior changed yet — this commit only introduces
the infrastructure for the next step.

* feat(cfn): use generatePhysicalName for all unnamed resources

Replace cfn-xxx random fallback names with AWS-like naming pattern
{stackName}-{logicalId}-{suffix} for 12 resource types:

- S3 Bucket (lowercase, max 63)
- SQS Queue (max 80)
- SNS Topic (max 256)
- DynamoDB Table/GlobalTable (max 255)
- Lambda Function (max 64)
- IAM Role (max 64), User (max 64), Policy (max 128),
  ManagedPolicy (max 128), InstanceProfile (max 128)
- SSM Parameter (path-based: /cfn/{stackName}/{logicalId})
- SecretsManager Secret (max 512)
- ECR Repository (lowercase, max 256)
2026-04-01 16:17:52 -05:00
Dixit R Jain 4fc9398df4 feat: officially support Docker named volumes for Native images (#155)
* feat: officially support Docker named volumes for Native images

* Pre-creates /app/data and assigns 1001 ownership in Dockerfile.native and Dockerfile.native-package before declaring VOLUME and dropping to USER 1001. This natively fixes the AccessDeniedException when utilizing Docker named volumes instead of local bind mounts, aligning container architecture flawlessly with tools like LocalStack.
* Standardizes named volumes as officially documented optional alternatives across docker-compose templates in quick-start, index, and README documentation for a cleaner repository drop-in replacement footprint.

* feat: natively support Docker named volumes via recursive permissions

* Pre-creates /app/data and applies recursive 1001:root ownership and g+rwX permissions in Dockerfile.native and Dockerfile.native-package before declaring VOLUME and dropping to USER 1001. This elegantly resolves AccessDeniedException crashes when mapping Docker named volumes instead of local binds, natively supporting frictionless LocalStack-style drop-in architecture.
* Standardizes named volumes as officially documented optional alternatives across docker-compose templates in quick-start, index, and README documentation for a cleaner repository drop-in replacement footprint.
2026-04-01 08:56:38 -05:00
Simone Paolo Petta 59c24c5e4e fix: defer startup hooks until HTTP server is ready (#157) (#159)
Startup hooks that make HTTP calls back to floci (e.g. aws cli) deadlocked
because they ran synchronously during StartupEvent, before the HTTP server
bound to port 4566. Hooks now run on a virtual thread that polls for port
readiness first. When no hooks are configured, behavior is unchanged.
2026-04-01 07:36:01 -05:00
Jakub d1b9a9ca6d feat: implement UploadPartCopy for S3 multipart uploads (#98) 2026-04-01 01:27:19 -05:00
Ilya Bryzgalov eef66983d9 feat: add support of Cloudformation mapping and Fn::FindInMap function (#101) 2026-04-01 01:24:47 -05:00
yoyo 48bee44634 feat: support GSI and LSI in CloudFormation DynamoDB table provisioning (#125) 2026-04-01 01:10:03 -05:00
nakano16180 453555a124 fix(dynamodb): fix FilterExpression for BOOL types, List/Set contains, and nested attribute paths (#137)
* fix(dynamodb): fix FilterExpression handling for BOOL, List/Set contains, and nested attribute paths

- Add BOOL type support to extractScalarValue() so comparison operators
  like <> work correctly with boolean attributes
- Extend contains() to support L (List), SS (String Set), and NS
  (Number Set) types instead of only scalar string substring matching
- Support dotted attribute paths in attribute_exists/attribute_not_exists
  by navigating through DynamoDB Map (M) structure

Fixes #126
2026-04-01 00:59:04 -05:00
Hector Ventura 6bbc9d9375 fix(sqs): route queue URL path requests to SQS handler (#153)
* fix: route SQS JSON 1.0 requests sent to queue URL path correctly (#99)
* fix: route SQS JSON 1.0 requests sent to queue URL path correctly

Newer AWS SDKs (e.g. aws-sdk-sqs Ruby gem >= 1.71) send JSON 1.0
requests to the queue URL path (/{accountId}/{queueName}) rather than
POST /. These were matched by S3Controller's /{bucket}/{key:.+} handler,
returning NoSuchBucket or InvalidArgument XML errors.

Added a @PreMatching ContainerRequestFilter (SqsQueueUrlFilter) that
rewrites the request URI to POST / before JAX-RS routing when both
Content-Type is application/x-amz-json-1.0 and X-Amz-Target starts with
AmazonSQS. The existing AwsJsonController dispatcher then handles the
request normally.

A @Consumes-based approach was attempted first but is ineffective in
RESTEasy Reactive: @Consumes only affects method selection within a
class, not between competing resource classes, so S3Controller was
still selected at the class-routing stage.

Closes #17
2026-04-01 00:49:51 -05:00
Ruan Leite 75bf3c3bdb feat(cognito): add group management support (#149)
* feat(cognito): add group management support
* fix(cognito): handle null precedence in createGroup request
* test(cognito): add tests for JWT escaping special characters in group names and user pool deletion cascading groups
* feat(cognito): enhance group listing by sorting and improve group name validation
* test(cognito): enhance group deletion test to verify group absence after user pool deletion
* feat(cognito): update group and user models to set last modified date on changes
* feat(cognito): update deleteGroup method to set last modified date for users when removing from group
2026-04-01 00:48:19 -05:00
Roberto Perez Alcolea b762becaea fix(sns): honor RawMessageDelivery attribute for SQS subscriptions (#54)
* fix(sns): honor RawMessageDelivery attribute for SQS subscriptions
* fix(sns): address PR review feedback on RawMessageDelivery

- Preserve original SNS attribute DataType (Number, Binary, etc.) by
  changing the internal messageAttributes type from Map<String,String>
  to Map<String,MessageAttributeValue> throughout the publish pipeline
- Update SnsQueryHandler and SnsJsonHandler to parse DataType from
  incoming requests and construct typed MessageAttributeValue objects
- Return Collections.emptyMap() from toSqsMessageAttributes instead
  of null for safety on non-raw delivery paths
- Use UUID-based queue names in raw delivery tests for isolation
- Add test asserting message attributes (including Number type) are
  forwarded correctly to SQS in raw delivery mode
2026-03-31 23:18:06 -05:00
Jeffen a4af506c15 fix(Cognito): OAuth/OIDC parity for RS256/JWKS, /oauth2/token, and OAuth app-client settings (#97)
* feat: add Cognito OAuth and resource server support

* chore: set FLOCI_BASE_URL for compatibility tests
2026-03-31 18:47:38 -05:00
Hector Ventura aba95933cf fix: adding aws-cli in its own floci image hectorvent/floci:x.y.z-aws (#151) 2026-03-31 18:30:29 -05:00
Cyril Schumacher 1e2950a3aa docs: improve initialization hooks documentation (#144)
* docs: add initialization hooks to navigation

* docs: improve link label for initialization hooks

* docs: expand initialization hooks documentation with examples
2026-03-31 17:12:01 -05:00
Roberto Perez Alcolea 7d6cf6179d fix(sqs): translate Query-protocol error codes to JSON __type equivalents (#59)
The AWS SDK v2 uses the __type field in JSON error responses to instantiate
typed exceptions. Query-protocol codes such as
AWS.SimpleQueueService.NonExistentQueue were being forwarded verbatim into
the JSON __type field, causing the SDK to fall back to a generic SqsException
instead of QueueDoesNotExistException.

Add a jsonType() method to AwsException that maps Query-protocol codes to
their JSON-protocol equivalents (e.g. QueueDoesNotExist, QueueNameExists).
Both AwsExceptionMapper and the inline catch in AwsJsonController now call
jsonType() so the mapping is applied consistently across all code paths.
2026-03-31 17:10:18 -05:00
Roberto Perez Alcolea ff2f68d8ab fix(s3): persist Content-Encoding header on S3 objects (#57)
Add contentEncoding field to S3Object and thread it through putObject,
copyObject, getObject, and headObject. aws-chunked is excluded from
persistence as it is a transfer-protocol marker, not a real encoding.
CopyObject respects x-amz-metadata-directive: REPLACE by adopting the
new Content-Encoding from the request instead of the source object.
2026-03-31 16:53:41 -05:00
Roberto Perez Alcolea 2f875d4169 fix(sns): enforce FilterPolicy on message delivery (#53)
FilterPolicy subscription attribute was accepted and stored but never
evaluated during publish. Messages were delivered to all confirmed
subscriptions regardless of filter rules. Now evaluates filter policies
supporting exact string matching, numeric comparisons, prefix matching,
exists operator, and anything-but operator per SNS specification.

Fixes #49
2026-03-31 16:49:02 -05:00
Fred Peña ccd630c3bf docs: expand community section with GitHub Discussions (#150) 2026-03-31 16:02:34 -05:00
Masatoshi Tadaandtada 788cf01d2c fix(sns) Allow to publish SMS using phone-number (#138)
Co-authored-by: tada <tada20591@cs.saisoncard.co.jp>
2026-03-31 16:00:46 -05:00
Dixit R Jain 35e129d024 fix(core): globally inject aws request-id headers for sdk compatibility (#146)
AWS SDKs rigorously depend on standard HTTP identification headers
(like `x-amz-request-id` and `x-amzn-RequestId`) to completely and
accurately construct the `ResponseMetadata` payload in their clients.
Because Floci lacked these headers on generic API responses, the SDK
failed to parse identifiers (resulting in `$metadata.requestId` resolving
to `undefined`).

This commit introduces a JAX-RS `AwsRequestIdFilter` to automatically
and globally append these necessary structural headers to every HTTP
response, mapped via a single uniformly-generated UUID. Preexisting
explicitly set controllers (such as Lambda's Invoke) are bypassed
to preserve context.

Added `AwsRequestIdFilterIntegrationTest` verifying end-to-end
protocol formats.

Fixes #145
2026-03-31 15:58:21 -05:00
Cristian de la Hoz a1c488994f Merge pull request #142 from hectorvent/docs/add-stars-history
docs: add stars chart history to `README.md`
2026-03-31 07:18:50 -04:00
Cristian de la Hoz 11aaebb37c docs: add stars chart history to README.md
Signed-off-by: Cristian de la Hoz <cyrondelahoz@gmail.com>
2026-03-31 07:18:13 -04:00
Juan Diego López 522b3696a6 fix(s3): expose inMemory flag in test constructor to fix S3 disk-persistence tests (#136) 2026-03-31 00:45:41 -05:00
Hector Ventura f994bfa501 chore: update GitHub Sponsors FUNDING.yml
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-03-31 00:20:06 -05:00
Hector Ventura ab072cf660 fix: for no-such-key with non-ascii key (#112) 2026-03-31 00:56:46 -04:00
Hector Ventura 68b8ed883a feat: add opensearch service emulation (#85) (#132) 2026-03-31 00:48:41 -04:00
thegagneandHector Ventura bb4f000914 feat(APIGW): add AWS integration type for API Gateway REST v1 (#108)
Add support for the API Gateway REST v1 AWS (non-proxy) integration type,
enabling direct service calls via VTL request/response mapping templates.

New components:
- VtlTemplateEngine: Apache Velocity engine with $input (body, json, path,
  params shorthand), $util (escapeJavaScript, urlEncode, base64, parseJson),
  $context, and $stageVariables
- AwsServiceRouter: parses action-based integration URIs and dispatches to
  13 internal service handlers (states, dynamodb, sqs, sns, events, etc.)

Integration features:
- Content-Type negotiation for request template selection
- passthroughBehavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER)
- Request parameter mapping (method.request.* -> integration.request.*)
- Response parameter mapping with full JSONPath body extraction
- Integration response selection via selectionPattern regex matching
- VTL directives: #set, #foreach, #if/#else

Also fixes SFN timestamps to use epoch float (e.g. 1743263483.047) matching
real AWS format.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
2026-03-30 23:20:14 -05:00
Matej ŠnuderlandDevin AI 1e59f8dc59 feat(s3): add presigned POST upload support (#120)
Implement S3 presigned POST (browser-based) uploads via multipart/form-data
POST to /{bucket}. This is the standard AWS mechanism for browser-based
file uploads using pre-signed policies.

Changes:
- S3Controller: detect multipart/form-data POST on /{bucket} and route to
  handlePresignedPost instead of returning InvalidArgument
- Parse multipart body to extract form fields (key, policy, Content-Type,
  x-amz-credential, x-amz-signature, etc.) and file data
- Validate content-length-range from the Base64-encoded policy JSON
- Store object via S3Service.putObject with Content-Type from form field
- Return 204 with ETag and Location headers (AWS-compatible response)

Tests:
- 11 new integration tests covering: basic upload, binary data, content-length
  validation (reject + accept), missing key/file fields, no-policy upload,
  Content-Type precedence (form field over file part), non-existent bucket

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-03-30 23:17:07 -05:00
Juan Diego López 190773eda6 Merge pull request #117 from hectorvent/fix/s3-memory-mode-and-storage-defaults
fix(s3): memory mode and storage defaults
2026-03-31 00:00:21 -04:00
LDallandLuis Dall 3d67bc4ba3 fix: added versionId to S3 notifications for versioning enabled buckets. (#135)
Co-authored-by: Luis Dall <Luis.Dall@claritybizsol.com>
2026-03-30 21:17:01 -05:00
paseri3739 8b6f4fa4f5 fix(dynamodb): apply filter expressions in Query (#123)
* fix(dynamodb): apply query filter expressions

* fix(dynamodb): preserve query page state before filtering
2026-03-30 21:15:14 -05:00
thegagne d1d7ec3bd3 feat(APIGW): OpenAPI/Swagger import, models, and request validation (#113)
* feat(APIGW): add AWS integration type for API Gateway REST v1

Add support for the API Gateway REST v1 AWS (non-proxy) integration type,
enabling direct service calls via VTL request/response mapping templates.

New components:
- VtlTemplateEngine: Apache Velocity engine with $input (body, json, path,
  params shorthand), $util (escapeJavaScript, urlEncode, base64, parseJson),
  $context, and $stageVariables
- AwsServiceRouter: parses action-based integration URIs and dispatches to
  13 internal service handlers (states, dynamodb, sqs, sns, events, etc.)

Integration features:
- Content-Type negotiation for request template selection
- passthroughBehavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER)
- Request parameter mapping (method.request.* -> integration.request.*)
- Response parameter mapping with full JSONPath body extraction
- Integration response selection via selectionPattern regex matching
- VTL directives: #set, #foreach, #if/#else

Also fixes SFN timestamps to use epoch float (e.g. 1743263483.047) matching
real AWS format.

* feat(APIGW): add OpenAPI/Swagger import, models, and request validation

Add ImportRestApi (POST /restapis?mode=import) and PutRestApi
(PUT /restapis/{apiId}?mode=overwrite) supporting OpenAPI 3.0 and
Swagger 2.0 specs with x-amazon-apigateway-integration extensions.

- Parse OpenAPI specs via swagger-parser, create resources/methods/integrations
- Import components.schemas as API Gateway Models with JSON Schema
- Import x-amazon-apigateway-request-validators as RequestValidators
- Validator precedence: operation > path > API-level default
- Model CRUD endpoints (create, get, list, delete)
- Request body validation against JSON Schema (Draft 4) at execute-api layer
- Required parameter presence validation (query string, header)
- mode=merge returns 400 with clear error message
- 22 integration tests, 792 total passing

* fix(APIGW): match real AWS behavior for validators and mode=merge

- Remove path-level x-amazon-apigateway-request-validator (AWS only
  supports operation-level > API-level default, verified against real AWS)
- Accept mode=merge in PutRestApi (treated as overwrite for now, since
  real AWS accepts it — returning 400 was incorrect)

Verified: 31/31 compat tests against real AWS, 39/39 against Floci.
2026-03-30 20:12:21 -05:00
yusuke-uranaka 6ff819083d feat: add Kinesis ListShards operation (#61)
- Implement ListShards handler in KinesisJsonHandler
- Support StreamName and StreamARN parameters
- Support ShardFilter with AT_LATEST type
- Support MaxResults parameter
- Add integration tests for ListShards
2026-03-30 11:05:03 -05:00
Cyril Schumacher 7b2576fb42 feat(lifecycle): add support for startup and shutdown initialization hooks (#128)
* feat(lifecycle): add support for startup and shutdown initialization hooks

* test(lifecycle): add unit tests for initialization hooks

* test(lifecycle): add integration tests for initialization hooks

* docs: add documentation and configuration for initialization hooks
2026-03-30 11:00:44 -05:00
Daniel Jipa 823770e463 feat: docker image with awscli Closes: #66) (#95)
Thanks @danjee!

This is a great addition to Floci. Your support really makes a difference. 
Hope to see you around soon!
2026-03-30 10:58:25 -05:00
thegagne 4766a7e6f5 feat(SFN): add DynamoDB AWS SDK integration and complete optimized updateItem (#103)
* feat(SFN): add DynamoDB AWS SDK integration and complete optimized updateItem

Add support for the arn:aws:states:::aws-sdk:dynamodb:* resource pattern
in Step Functions Task states, covering all 20 DynamoDB actions Floci
supports. Implement by forwarding directly to DynamoDbJsonHandler with
camelCase-to-PascalCase action name conversion.

Also complete the optimized dynamodb:updateItem integration that was
previously stubbed, and fail unsupported resources with States.TaskFailed
instead of silently passing through.

Validated against real AWS with 20/20 compatibility tests passing.

* fix(SFN): correct DynamoDB error prefix format for optimized and SDK integrations

- AWS SDK integration: use DynamoDb.ErrorCode (no double Exception suffix)
- Optimized integration: catch AwsException and use DynamoDB.ErrorCode prefix
  (uppercase DB, matching real AWS behavior)

Validated error format against real AWS for ResourceNotFoundException
and ConditionalCheckFailedException.
2026-03-30 09:49:35 -05:00
Roberto Perez Alcolea b0f5ae22cd feat(s3): add Range header support for GetObject (#44)
Implement HTTP Range header parsing for S3 GetObject requests.
Supports standard range formats: bytes=start-end, bytes=start-,
and bytes=-suffix. Returns 206 Partial Content with Content-Range
header for valid ranges, and 416 Range Not Satisfiable for invalid
ranges. Also adds Accept-Ranges: bytes to GET and HEAD responses.

Fixes #40
2026-03-30 00:33:38 -05:00
Hector Ventura 293aeeb6c6 docs: updating readme with supported services and new banner 2026-03-30 00:25:28 -05:00
Hector Ventura f992ee2294 Merge branch 'main' into fix/s3-memory-mode-and-storage-defaults 2026-03-29 23:05:59 -05:00
Hector Ventura b84a1281f8 fix(storage): fix storage global config issue and memory s3 directory creation 2026-03-29 23:05:13 -05:00
Julian Bruder 8882a8ebe2 fix(dynamodb): respect if_not_exists for update_item (#102)
* fix(dynamodb): respect `if_not_exists` for `update_item`

* remove unnecessary comment

* ignore zed-settings

* fully respect locale & exists-branches

* apply suggested changes from review
2026-03-29 16:37:28 -05:00
Cristian de la Hoz b6d1b36b12 docs(github): add pull request review instructions (#107)
Document repository-specific guidance for Copilot pull request reviews so feedback stays aligned with Floci's AWS compatibility and architecture expectations.
2026-03-29 16:31:33 -05:00
Hector Ventura 38912326c9 fix(s3): allow upload up to 512MB by default. close #19 (#110)
* fix(s3): allow upload up to 512MB by default. close #19
2026-03-29 16:20:47 -05:00
Kurt McAlpineandHector Ventura 1377868094 fix: resolve compatibility test failures across multiple services (#109)
- Bind Lambda RuntimeApiServer to IPv4 (0.0.0.0) and increase max body
  size to 256M
- Fix PortAllocator to wrap around using modular arithmetic
- Add Content-Type header to AwsExceptionMapper JSON error responses
- Merge multi-line x-amz-object-attributes headers in S3 GetObject
- Wrap SNS query handler methods with proper AwsException error handling
- Add Docker group, VHost DNS, and FLOCI_HOSTNAME to CI compatibility
  workflow

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
2026-03-29 00:57:18 -05:00
Roberto Perez AlcoleaandHector Ventura 66af545053 feat(s3): add conditional request headers (If-Match, If-None-Match, If-Modified-Since, If-Unmodified-Since) (#48)
* feat(s3): add conditional request headers (If-Match, If-None-Match, If-Modified-Since, If-Unmodified-Since)

Implement precondition evaluation for GetObject and HeadObject per
HTTP/S3 spec. Evaluation order: If-Match (412) → If-Unmodified-Since
(412, only when If-Match absent) → If-None-Match (304) →
If-Modified-Since (304, only when If-None-Match absent). Returns
S3-style XML error bodies for 412 responses. Supports comma-separated
ETags and wildcard (*) in If-Match/If-None-Match.

Fixes #46

* fix(s3): remove javadoc comments, add missing HEAD precondition tests

- Remove Javadoc from checkPreconditions, eTagMatches and parseHttpDate
- Add inline comment explaining the double-fetch optimization in getObject
- Add HEAD tests for If-Match (200/412), If-Modified-Since (304) and If-Unmodified-Since (412)
- Adjust cleanupAndDeleteBucket from @Order(100) to @Order(70)
- Renumber conditional header test orders to stay sequential

---------

Co-authored-by: Hector Ventura <hectorvent@gmail.com>
2026-03-29 00:16:39 -05:00
Fred Peña 8047bef7e8 Add contributors section to README
Signed-off-by: Fred Peña <f.ant.pena@gmail.com>
2026-03-29 00:35:33 -04:00
Fred Peña 21ac169604 Update contributor badge link in README.md
Signed-off-by: Fred Peña <f.ant.pena@gmail.com>
2026-03-29 00:29:25 -04:00
Fred Peña 693323ff28 Merge pull request #111 from fredpena/main
Add GitHub Contributors badge to README
2026-03-29 00:22:25 -04:00
Fred Peña c4d8ab46b9 Add GitHub Contributors badge to README 2026-03-29 00:21:09 -04:00
Cristian de la Hoz 54523ca7bc ci: scope workflow triggers to relevant file changes (#106) 2026-03-28 17:03:45 -05:00