Repository navigation
v0.39.0
·
32 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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:
createtakessession_id. Dropdefault=_session_tokenindb/models.pyand store the given id; the column does not change. Run the kit in the Postgres store test. - presentator:
SqliteSessionRecordStore.createtakessession_idand 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
createsignature 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.
SingleProcessStoresdoes the same.- Migration: see "Per app"; no store mints an id any more.
- webauth mints the id at sign-in (
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 ofSTORE_CHECKSagainst it, for example by parametrizing its database test over the tuple. - Each
StoreCheckraisesAssertionErrorwith 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,touchandreplace_refresh_token, exact subject comparison inget, and writes on a missing account. - One check proves that two
SignInTransactionentries exclude each other across processes. It needstransaction_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 whosecrosses_processesis true. - It adds no dependency beyond webauth's own and needs no test framework. No check covers
SessionTransaction.
- The host builds a
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