Skip to content

Rate limiting bypasses and remaining server reliability items (split from #193) #198

Closed

Description

@jrosskopf

Left over from #193 after #197 (schedule validation, stale-snapshot serving, no error leaks). From the crew review, reported, not yet reproduced:

Rate limiting

  • user / user-or-ip keys hash the raw Authorization header before authentication, so rotating invalid tokens gives a fresh bucket per request (src/rate_limit_key_builder.cpp ~26).
  • Endpoint lookup is by path only, not method: GET /items unlimited can exempt a limited POST /items (src/rate_limit_middleware.cpp ~16).
  • The bucket key includes the literal request path, so /items/:id gets a bucket per id (src/rate_limit_key_builder.cpp ~73).

Other

  • Schema/catalog/audit SQL is built without identifier quoting/escaping (cache_manager.cpp CREATE SCHEMA and audit INSERT; database_manager.cpp ATTACH).
  • rollback-window and delete-handling are parsed but never used; compaction schedule is ignored and compaction runs once per endpoint.
  • REST create/update/delete are in-memory only while the MCP create/delete persist/remove the YAML; EndpointRepository maps look unsynchronised (config_manager.cpp ~2225).
  • Debug logging dumps the template context incl. connection properties (src/sql_template_processor.cpp ~244).
  • Remote --config s3://... cannot boot (the VFS provider needs an initialised DatabaseManager, which is created after config load).
  • Startup race: the scheduler's first refresh and the cache warm-up both touch readiness; warm-up re-initialises it, so /health can briefly report ready before caches are registered.

Fix each with a real-binary test first.

Activity

  1. added a commit that references this issue on Oct 4, 2026
  2. jrosskopf commented on Nov 21, 2026

    @jrosskopf
    ContributorAuthor

    #230 fixed the startup-readiness race, identifier quoting and the debug-log secret leak (the rate-limit bypasses, REST persistence and compaction were already fixed earlier). Still open: booting from a remote --config URL, tracked in batch F.

  3. jrosskopf commented on Nov 21, 2026

    @jrosskopf
    ContributorAuthor

    The last open item, booting from a remote --config, is fixed in #231 (bootstrap DuckDB with httpfs reads the config before DatabaseManager exists). Closing; all items in this issue are now addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions