Commit Graph
13 Commits
Author SHA1 Message Date
TiM 7d70f64162 feat(docs): generate Supported Actions tables from handler source (#1641)
* feat(docs): generate Supported Actions tables from handler source

The "Supported Actions" tables in docs/services/*.md were hand-maintained and
drifted from the handlers. For example secrets-manager.md omitted RestoreSecret,
which SecretsManagerJsonHandler dispatches, and acm.md listed RenewCertificate,
which is not implemented anywhere in src/.

Derive the action list from handler source so it cannot drift, while keeping the
hand-written Description column:

- tools/docs/regen_action_docs.py extracts actions from `case "X" ->` switch arms
  (including multi-label arms) and JAX-RS REST controllers, and rewrites only the
  rows between the <!-- floci:actions --> markers. Descriptions are preserved by
  action name; new actions get a "-" placeholder. PascalCase-only matching avoids
  picking up SCREAMING_CASE labels from non-action switches.
- tools/docs/services.yaml registers 18 single-table switch services and lists the
  remaining switch handlers under deferred_handlers, so the new-service sentinel
  fires only on a genuinely unregistered handler.
- make docs-sync / docs-check / docs-test, plus a Python-only CI workflow that
  gates on handler, doc, and tooling changes.
- Migrate 18 service docs into marker blocks, reconciling real drift (adds
  RestoreSecret, ImportCertificate, and others; drops the unimplemented
  RenewCertificate).

Revives the parser and CI gate from #738 by @ericbsantana and completes the
description-preservation its spec described. REST-mode, mixed-mode, multi-table,
non-tabular, S3, and ecr docs are deferred and tracked in deferred_handlers.

* docs: drop standalone design spec from action-docs tooling

Remove ideas/auto-generated-action-tables.spec.md and the four references
to it (CONTRIBUTING.md, Makefile, regen_action_docs.py docstring,
services.yaml). It was a planning artifact; the operational docs live in
CONTRIBUTING.md and the tooling is self-documenting. The #738 / @ericbsantana
credit is preserved in the PR description.

* chore: address review on action-docs tooling

- pin actions/checkout to v7.0.0 in docs-actions workflow to match the
  repo-wide bump (#1690), so dependabot does not immediately flag the new file
- document in the generator docstring that a switch case label counts as
  supported purely by existing, so a per-action UnsupportedOperation stub
  would be a false positive (handlers here reject from the default arm)

* docs: regenerate action tables against current handler source

Resync the generated Supported Actions tables to handler source after
rebasing onto the latest main:

- cloudformation: add DescribeStackInstance and DescribeStackSetOperation
  now emitted by the handler, and keep the implemented StackSet descriptions
- cloudtrail: add LookupEvents
- firehose: add UpdateDestination
- step-functions: add PublishStateMachineVersion, ListStateMachineVersions,
  DeleteStateMachineVersion
- register the cloudcontrol handler in deferred_handlers so the strict
  unregistered-handler gate passes (no standalone action table yet)

* fix(docs): prevent action-table generator from silently dropping actions

Address the latest review pass on the action-docs tooling:

- switch extraction now captures case arms whose labels wrap across lines
  (valid Java 14+ syntax). The capture group excludes only `{ } ;` boundaries,
  so it spans newlines between labels but stops at the arm's `->`. A wrapped
  arm was previously missed, and docs-check would stay green because the doc
  and the generated output agreed on the omission, defeating the whole
  drift-prevention guarantee.
- REST extraction skips Javadoc / inline comments between a verb annotation
  and the method signature; such a line otherwise reset the lookahead and
  dropped the action.
- parse_marker_block raises a descriptive error when a marker is not on its
  own line, instead of a bare "substring not found".
- doc, source, and registry reads/writes are pinned to UTF-8 so generation is
  locale-independent (the docs contain non-ASCII text).
- the docs-actions push trigger watches Makefile and the workflow file,
  matching its pull_request trigger.

Adds regression tests for the multi-line arm and comment-skip paths (20 total).
2026-07-06 21:02:04 -05:00
nblomquistandnathan 326b495496 feat(iot) Feature/issue 1038 iot core (#1359)
* feat: add IoT endpoint and thing registry

* feat: add IoT thing tagging

* feat: add IoT certificates and shadows

* feat: add IoT MQTT broker

* feat: upgrade IoT MQTT broker to Moquette 0.18

* feat: restore IoT reserved MQTT topics

* feat: add IoT topic rules engine

* feat: improve IoT thing registry compatibility

* feat: complete IoT MVP 1 compatibility

* feat: complete IoT MVP 2 compatibility

* feat: finish IoT MVP 2 coverage

* fix: disable IoT MQTT broker persistence

* fix(docker): include vendored Maven artifacts in source builds

* fix(iot): stabilize MQTT integration test sockets

* fix(iot): verify MQTT test connections

* fix(iot): use Paho for MQTT integration tests

* fix(iot): use Vert.x MQTT broker

---------

Co-authored-by: nathan <nathan@debian-dev-small.localdomain>
2026-06-25 22:58:44 -05:00
Hector VenturaandRicardo Medina d7f9f95873 feat(cognito): add verification code subsystem (store, dispatcher, SNS/SES inspection) (#1249)
* chore(fixtures): capture AWS Cognito auth flow fixtures for contract tests

Captures 7 wire-format fixtures against wirebit stg pool for use as ground truth
in floci compatibility tests. Includes capture script with PII sanitization and
best-effort user cleanup.

Empirical findings vs spec:
- No client-side rate-limit observed on back-to-back ResendConfirmationCode
- PreventUserExistenceErrors=LEGACY in wirebit prod/stg (older pools)
- Email Destination masking is aggressive: f***@e***

* feat(cognito): add verification code store, message dispatcher and SNS inspection

Introduces the foundation for full Cognito auth flow emulation:

- VerificationCodeService: 6-digit codes hashed with per-code salt, persisted
  via StorageFactory with TTL + 30s rate-limit + 5-attempt invalidation.
- VerificationCode model: serializable to disk for filesystem storage mode.
- CognitoMessageDispatcher: renders VerificationMessageTemplate ({####}
  placeholder + failsafe), dispatches via SesService (email) or SnsService
  (SMS) honoring DeliveryMediums.
- SnsService: now persists every phone publish() as a SentSms record and
  exposes getSentMessages()/clearSentMessages().
- SnsInspectionController: GET/DELETE /_aws/sns mirroring SesInspectionController.
- FixtureLoader + 7 AWS Cognito fixtures captured against wirebit-stg pool
  (sign-up, confirm-signup error, resend, forgot-password unknown-user, SRP
  unknown-user). Relocated from compatibility-tests/ to src/test/resources/
  so JUnit can load them via classpath.

Not yet wired to any flow — that's PR #2-5 in a stacked series.

Tests: 22 new (9 VerificationCodeService + 6 dispatcher + 4 SNS inspection +
3 FixtureLoader). Full suite 4336 passing (was 4314), ElastiCacheIntegrationTest
excluded due to local port-6379 collision.

* feat(ses): SesInspectionController supports ?email= filter

Symmetric to SnsInspectionController.?phone= (added in the verification
code store commit). Lets test helpers retrieve the latest email sent to
a specific recipient without filtering client-side over the full message
list.

GET /_aws/ses?email=user@example.com → only messages where the address
is in ToAddresses.

* fix(cognito): align verification dispatcher with AWS and current SES API

Adapt the adopted verification-code foundation to current main and AWS:
- update CognitoMessageDispatcher to the 12-arg SesService.sendEmail signature
- source the MFA SMS message from the user pool's top-level SmsAuthenticationMessage
  (it is not part of VerificationMessageTemplate, which only holds SmsMessage)
- match AWS's out-of-the-box default verification message text
- document the 30s resend window and 5-attempt cap as emulation heuristics (not
  AWS-published constants) and add TODOs for DefaultEmailOption, medium preference,
  and per-purpose TTL that the auth-flow wiring must honour

Co-authored-by: Ricardo Medina <34877263+ricardomedina98@users.noreply.github.com>

* refactor(cognito): drop dead code flagged by static analysis

- remove no-op ctorRequest local in scripts/aws-fixtures-capture.mjs
- drop the unused purpose parameter from emailTemplateKey() and its call site

Co-authored-by: Ricardo Medina <34877263+ricardomedina98@users.noreply.github.com>

* chore(cognito): remove the one-off AWS fixture-capture dev script

The captured aws-cognito/*.json fixtures remain (FixtureLoader uses those); the Node capture tool is not needed in the repo.

---------

Co-authored-by: Ricardo Medina <34877263+ricardomedina98@users.noreply.github.com>
2026-06-11 00:47:33 -05:00
Hector Ventura f191982f25 fix(dynamodb): merge nested map paths in ProjectionExpression (#1099)
When multiple ProjectionExpression paths share the same parent map
(e.g. data.title, data.answer, data.sources), copyPath() created a
fresh ObjectNode for each path and overwrote the previous projection.
Only the last sibling path was returned.

Fix: reuse the existing destination node when the parent key has already
been projected, so all sibling paths accumulate into the same node.
Applied to both the {"M": ...} DynamoDB-typed branch and the isObject()
plain-object fallback.

Additional fixes applied during review:
- List index [n] branch: same overwrite guard added (was also
  unconditionally overwriting dest[seg] on repeated access)
- Leaf deep-copy: dest.set(seg, child.deepCopy()) prevents placing a
  live source reference into the destination, which a subsequent sibling
  path could have mutated via the isObject() reuse logic
- Test cleanup: replaced @Order(100) teardown with @AfterAll so the
  table is always deleted even when a test fails
- Added direct ProjectionEvaluator unit test for the isObject() branch

Closes #852
2026-05-30 16:05:17 -05:00
Hector Ventura 17841d2d5a fix: removing log file 2026-04-08 01:53:46 -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
Mahamed-Belkheir e8c6440489 feat: add scheduled rules support for EventBridge Rules (#217) 2026-04-05 20:08:52 -05:00
Julian Bruder e78c833794 fix(s3): Evaluate S3 CORS against incoming HTTP Requests (#131) 2026-04-03 00:58:00 -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
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 5675b3c1ef docs(contributing): add canonical agent guide reference (#104)
Document AGENT.md as the canonical repository guide and fix contributing docs to point to it instead of a missing file.

Closes #10
2026-03-28 12:10:19 -05:00
Hector Ventura 7b9b58bde2 chore: improve documentation 2026-03-17 18:01:05 -05:00
Hector Ventura 61433f59ab firt commit 2026-03-15 17:43:56 -05:00