Skip to content

Secrets-Manager auth: no runtime refresh, and config-service endpoints never load their users #257

Backlog

Description

@jrosskopf

Follow-up from #254. auth.from-aws-secretmanager fetches each secret once, at startup (AuthMiddleware::initializeAwsSecretsManager → AwsHelper), and keeps the user list in memory keyed by secret-name.

  1. No rotation without restart. A changed secret (a user added or removed, a new password) takes effect only after a restart. A removed user can log in until then, and successful PBKDF2 checks are also cached for 300 s. Proposal:
    • an optional refresh: <duration> (or the existing scheduler) that re-fetches in the background and swaps the map atomically;
    • on a failed fetch, keep the old list and log a warning;
    • a config-service action to force a re-fetch.
  2. Endpoints created or updated through the config service with from-aws-secretmanager (or a new secret-name) never trigger a fetch, so every login is refused (fails closed). Also, the config-service JSON serialiser (config_manager.cpp, the from-aws-secretmanager block) writes only secret-name and region, so a persisted endpoint loses secret-id, secret-key and init. Proposal: load lazily on create or reload, off the request path, and decide how credentials round-trip (probably env-only).
  3. A config reload does not re-run AuthMiddleware::initialize, so a secret-name added in YAML also needs a restart.

Until then the docs say "restart to rotate".

Activity

  1. added
    enhancement
    on Nov 24, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions