Skip to content

auth-server: durable (Postgres) persistence for sessions and clients #319

Description

@bordumb

Context

The open-sourced auths-auth-server (#317) ships with in-memory + git-backed stores only. The sqlx/Postgres adapters were dropped because sqlx pulls a native sqlite3 driver (libsqlite3-sys) that collides with auths-core's sqlite crate — two packages declaring links = "sqlite3", which cargo forbids.

The Postgres adapter source + migrations remain in the tree (migrations/), and the store ports (ports/session_store.rs, ports/client_store.rs) are storage-agnostic.

Task

Restore durable persistence without the native-lib conflict. Options:

  • Make the Postgres path opt-in and stop sqlx pulling the sqlite driver (drop the macros/migrate features and use runtime sqlx::query, or otherwise ensure only sqlx-postgres is in the graph), OR
  • Use a different Postgres client that doesn't link sqlite, OR
  • Reconcile auths-core's sqlite dependency so both can coexist.

Acceptance

  • cargo deny/build green with Postgres enabled (no duplicate links = "sqlite3").
  • Session + client stores persist across restarts; covered by tests behind a postgres feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions