Skip to content

v0.39.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 17:49
· 32 commits to main since this release
Immutable release. Only release title and notes can be modified.
5a3dd30

What changes in 0.39.0

0.39.0 prepares every app to run as interchangeable pods over its own Postgres (overnightworks/platform#581). webauth now mints the session id itself. A new contract kit lets each app prove its own store adapter against webauth's ports.

Per app

  • songmaker: create takes session_id. Drop default=_session_token in db/models.py and store the given id; the column does not change. Run the kit in the Postgres store test.
  • presentator: SqliteSessionRecordStore.create takes session_id and stores it; the column does not change. Run the kit in the store test, now and after the move to Postgres.
  • skat, hopin: build the new Postgres adapter against this create signature and prove it with the kit.

Breaking

  • SessionRecordStore.create(..., *, session_id: str) (#755, PR #756; docs/host-contract.md, MEMSTORE-02, -12, -21, -22, SIGNIN-71).
    • webauth mints the id at sign-in (secrets.token_urlsafe(32)), and a store keeps exactly the id it is given.
    • A store refuses an id it already holds, expired rows included, and never overwrites it.
    • SingleProcessStores does the same.
    • Migration: see "Per app"; no store mints an id any more.

New

  • webauth.store_contract (#757, PR #758; docs/host-contract.md, "Proving a store adapter", STORECHECK-01 to STORECHECK-06).
    • The host builds a StoreAdapter(accounts, sessions, transaction, transaction_in_another_process=None) in its own fixture and runs every check of STORE_CHECKS against it, for example by parametrizing its database test over the tuple.
    • Each StoreCheck raises AssertionError with a reason, whatever the assert setting. It mints its own subjects, usernames and ids, so the checks run in parallel against a shared database; the host removes the rows they leave.
    • The checks cover create/load, duplicate ids, unknown and deleted ids, prune_overflow, delete_for_user, touch and replace_refresh_token, exact subject comparison in get, and writes on a missing account.
    • One check proves that two SignInTransaction entries exclude each other across processes. It needs transaction_in_another_process: a picklable callable without arguments, such as a frozen dataclass holding the database location. A single-worker host leaves it unset and skips the checks whose crosses_processes is true.
    • It adds no dependency beyond webauth's own and needs no test framework. No check covers SessionTransaction.

Not visible to a host

  • The host contract states the group check in the token exchange section as the service's alone (#747), and names the platform as owner of the reachability infrastructure (#753).
  • The real-browser proof runs against the platform's Keycloak hold (#751).

Full Changelog: v0.38.0...v0.39.0