Oregami
Repositories/oxedyne/fe2o3

fe2o3_steel/src/srv/member/session.rs

11 operations, oldest first

created by r1870400018:72144, which is this file's identity for as long as the history lasts, whatever it is later renamed to

read the file · who wrote it · compare two states

An operation carries no clock of its own. Each row is therefore dated by the first mark written after it by the same replica, which is one copy of the repository, and that mark is where the command that wrote the operation ended.

+ signed and verified, ? signed by a key this forge does not carry, - unsigned

OperationAuthorWhatWhen
+r1870400018:72144replica 1870400018created fe2o3_steel/src/srv/member/session.rs40 days ago under "fe2o3_steel: member sessions -- srv::member::session, server-side sessions for a site's signed-in members in the vhost's Ozone store, audited first against the Daimond gateway's sess: records (verdicts in the module header, 2026-10-11). The browser holds a 32-byte random Token (64 hex, never Debug-printed); the store holds only its SHA3-256 hash as <prefix>s/<hex> -> {principal, data, created, last_seen}. SessionCfg {prefix, idle_secs, absolute_secs, per_principal, touch_secs}; Sessions::load rebuilds the RAM map and principal index from one prefix scan, dropping the expired; start (oldest past the cap ended first), check (idle and absolute expiry, last_seen written at most once per touch_secs), end, end_id, end_all, sweep, list. The db is the (Arc<RwLock<VhostDb>>, Uid) of HandlerCtx.db; every write awaits the store's durable ack under one state lock, and a revocation deletes the record before the map entry so a restart cannot revive it. Clock::Manual for tests. tests/member_session.rs: start/check/end, idle and absolute expiry, sweep, the cap, end_all and end_id across a restart, load keeping the live and dropping the expired, and the token absent from the store's files (Zoapedia F7a)"
+r1870400018:72145replica 1870400018inserted 21.4 KiB40 days ago under "fe2o3_steel: member sessions -- srv::member::session, server-side sessions for a site's signed-in members in the vhost's Ozone store, audited first against the Daimond gateway's sess: records (verdicts in the module header, 2026-10-11). The browser holds a 32-byte random Token (64 hex, never Debug-printed); the store holds only its SHA3-256 hash as <prefix>s/<hex> -> {principal, data, created, last_seen}. SessionCfg {prefix, idle_secs, absolute_secs, per_principal, touch_secs}; Sessions::load rebuilds the RAM map and principal index from one prefix scan, dropping the expired; start (oldest past the cap ended first), check (idle and absolute expiry, last_seen written at most once per touch_secs), end, end_id, end_all, sweep, list. The db is the (Arc<RwLock<VhostDb>>, Uid) of HandlerCtx.db; every write awaits the store's durable ack under one state lock, and a revocation deletes the record before the map entry so a restart cannot revive it. Clock::Manual for tests. tests/member_session.rs: start/check/end, idle and absolute expiry, sweep, the cap, end_all and end_id across a restart, load keeping the live and dropping the expired, and the token absent from the store's files (Zoapedia F7a)"
+r1870400018:72168replica 1870400018inserted 123 bytes40 days ago under "fe2o3_net: stateless WebAuthn challenges -- webauthn::challenge, so an unauthenticated flood of ceremony starts holds no server state and cannot evict another browser's challenge (Zoapedia review N5). Challenges::mint(purpose, now) returns 32 random bytes for publicKey.challenge and a base64url cookie carrying the nonce, an expiry TTL_SECS (120 s) ahead and the Purpose (Create or Get) under an HMAC-SHA256 tag keyed per process; check(cookie, client_challenge, purpose, now) verifies the tag, the purpose, the expiry and that the browser's challenge is the cookie's, then records the nonce in a guard::nonce::NonceTracker so a replay inside the window is refused. The used-set is bounded by its window and with_max_used, failing closed when full. A restart voids open challenges. tests/webauthn_challenge.rs: a challenge checks once; expired, wrong-purpose, wrong-challenge, tampered, junk and foreign-key cookies are refused without spending the real one; ten thousand mints hold no state and checks stop at the used-set's bound (Zoapedia F7b)"
+r1870400018:72169replica 1870400018replaced 77 bytes with 10 bytes40 days ago under "fe2o3_net: stateless WebAuthn challenges -- webauthn::challenge, so an unauthenticated flood of ceremony starts holds no server state and cannot evict another browser's challenge (Zoapedia review N5). Challenges::mint(purpose, now) returns 32 random bytes for publicKey.challenge and a base64url cookie carrying the nonce, an expiry TTL_SECS (120 s) ahead and the Purpose (Create or Get) under an HMAC-SHA256 tag keyed per process; check(cookie, client_challenge, purpose, now) verifies the tag, the purpose, the expiry and that the browser's challenge is the cookie's, then records the nonce in a guard::nonce::NonceTracker so a replay inside the window is refused. The used-set is bounded by its window and with_max_used, failing closed when full. A restart voids open challenges. tests/webauthn_challenge.rs: a challenge checks once; expired, wrong-purpose, wrong-challenge, tampered, junk and foreign-key cookies are refused without spending the real one; ten thousand mints hold no state and checks stop at the used-set's bound (Zoapedia F7b)"
+r1870400018:72172replica 1870400018replaced 95 bytes with 12 bytes40 days ago under "fe2o3_net: stateless WebAuthn challenges -- webauthn::challenge, so an unauthenticated flood of ceremony starts holds no server state and cannot evict another browser's challenge (Zoapedia review N5). Challenges::mint(purpose, now) returns 32 random bytes for publicKey.challenge and a base64url cookie carrying the nonce, an expiry TTL_SECS (120 s) ahead and the Purpose (Create or Get) under an HMAC-SHA256 tag keyed per process; check(cookie, client_challenge, purpose, now) verifies the tag, the purpose, the expiry and that the browser's challenge is the cookie's, then records the nonce in a guard::nonce::NonceTracker so a replay inside the window is refused. The used-set is bounded by its window and with_max_used, failing closed when full. A restart voids open challenges. tests/webauthn_challenge.rs: a challenge checks once; expired, wrong-purpose, wrong-challenge, tampered, junk and foreign-key cookies are refused without spending the real one; ten thousand mints hold no state and checks stop at the used-set's bound (Zoapedia F7b)"
+r1870400018:72173replica 1870400018replaced 138 bytes with 4 bytes40 days ago under "fe2o3_net: stateless WebAuthn challenges -- webauthn::challenge, so an unauthenticated flood of ceremony starts holds no server state and cannot evict another browser's challenge (Zoapedia review N5). Challenges::mint(purpose, now) returns 32 random bytes for publicKey.challenge and a base64url cookie carrying the nonce, an expiry TTL_SECS (120 s) ahead and the Purpose (Create or Get) under an HMAC-SHA256 tag keyed per process; check(cookie, client_challenge, purpose, now) verifies the tag, the purpose, the expiry and that the browser's challenge is the cookie's, then records the nonce in a guard::nonce::NonceTracker so a replay inside the window is refused. The used-set is bounded by its window and with_max_used, failing closed when full. A restart voids open challenges. tests/webauthn_challenge.rs: a challenge checks once; expired, wrong-purpose, wrong-challenge, tampered, junk and foreign-key cookies are refused without spending the real one; ten thousand mints hold no state and checks stop at the used-set's bound (Zoapedia F7b)"
+r1870400018:72463replica 1870400018inserted 1.2 KiB40 days ago under "fe2o3_steel: Sessions::set_data replaces a live session's app data, written through before the map changes, so Zoapedia's re-challenge (Z7c, review S2) can record reauth_at in the session; an ended, expired or unknown session answers false and is not revived. Test: member_session set_data_writes_through_and_survives_a_restart; member_session 7 pass"
+r1870400018:72530replica 1870400018replaced 264 bytes with 645 bytes40 days ago under "fe2o3_steel: member sessions adopt an existing secret and check quietly -- Token::from_secret takes an app's pre-existing 32-byte secret as the token (hash unchanged, SHA3-256 of the bytes); Sessions::adopt(db, token, principal, data, created, last_seen) -> Outcome<bool> writes the hashed record with the original times, so idle and absolute expiry fall exactly where they would have, answering false and writing nothing for one already expired or one the per-principal cap would end first (oldest first, as start), the insert awaited before the map changes; adopting the same hash again rewrites one record with the earlier created and the later last_seen, and a hash held for another principal is refused; last_seen outside [created, now] is refused. Sessions::peek authenticates as check, ending an expired session, but never writes or moves last_seen, for a background wake or socket re-check. The module header now names the adopt route (the browser keeps its cookie; no forced sign-in) and peek, and adopt documents that it cannot revive a revoked session for anyone but a holder of its secret. tests/member_session.rs: 7 new (adopt across a reload, both expiries exact, expired writes nothing, adopt twice = one record keeping the later use, the cap oldest first, peek leaves last_seen across a reload, the raw secret absent from the store's files). RED on 994dafff: 28 compile errors (from_secret, adopt, peek); GREEN 13/13 (Daimond GW-SESSION F1)"
+r1870400018:72531replica 1870400018inserted 3.8 KiB40 days ago under "fe2o3_steel: member sessions adopt an existing secret and check quietly -- Token::from_secret takes an app's pre-existing 32-byte secret as the token (hash unchanged, SHA3-256 of the bytes); Sessions::adopt(db, token, principal, data, created, last_seen) -> Outcome<bool> writes the hashed record with the original times, so idle and absolute expiry fall exactly where they would have, answering false and writing nothing for one already expired or one the per-principal cap would end first (oldest first, as start), the insert awaited before the map changes; adopting the same hash again rewrites one record with the earlier created and the later last_seen, and a hash held for another principal is refused; last_seen outside [created, now] is refused. Sessions::peek authenticates as check, ending an expired session, but never writes or moves last_seen, for a background wake or socket re-check. The module header now names the adopt route (the browser keeps its cookie; no forced sign-in) and peek, and adopt documents that it cannot revive a revoked session for anyone but a holder of its secret. tests/member_session.rs: 7 new (adopt across a reload, both expiries exact, expired writes nothing, adopt twice = one record keeping the later use, the cap oldest first, peek leaves last_seen across a reload, the raw secret absent from the store's files). RED on 994dafff: 28 compile errors (from_secret, adopt, peek); GREEN 13/13 (Daimond GW-SESSION F1)"
+r1870400018:72532replica 1870400018inserted 592 bytes40 days ago under "fe2o3_steel: member sessions adopt an existing secret and check quietly -- Token::from_secret takes an app's pre-existing 32-byte secret as the token (hash unchanged, SHA3-256 of the bytes); Sessions::adopt(db, token, principal, data, created, last_seen) -> Outcome<bool> writes the hashed record with the original times, so idle and absolute expiry fall exactly where they would have, answering false and writing nothing for one already expired or one the per-principal cap would end first (oldest first, as start), the insert awaited before the map changes; adopting the same hash again rewrites one record with the earlier created and the later last_seen, and a hash held for another principal is refused; last_seen outside [created, now] is refused. Sessions::peek authenticates as check, ending an expired session, but never writes or moves last_seen, for a background wake or socket re-check. The module header now names the adopt route (the browser keeps its cookie; no forced sign-in) and peek, and adopt documents that it cannot revive a revoked session for anyone but a holder of its secret. tests/member_session.rs: 7 new (adopt across a reload, both expiries exact, expired writes nothing, adopt twice = one record keeping the later use, the cap oldest first, peek leaves last_seen across a reload, the raw secret absent from the store's files). RED on 994dafff: 28 compile errors (from_secret, adopt, peek); GREEN 13/13 (Daimond GW-SESSION F1)"
+r1870400018:72533replica 1870400018inserted 77 bytes40 days ago under "fe2o3_steel: member sessions adopt an existing secret and check quietly -- Token::from_secret takes an app's pre-existing 32-byte secret as the token (hash unchanged, SHA3-256 of the bytes); Sessions::adopt(db, token, principal, data, created, last_seen) -> Outcome<bool> writes the hashed record with the original times, so idle and absolute expiry fall exactly where they would have, answering false and writing nothing for one already expired or one the per-principal cap would end first (oldest first, as start), the insert awaited before the map changes; adopting the same hash again rewrites one record with the earlier created and the later last_seen, and a hash held for another principal is refused; last_seen outside [created, now] is refused. Sessions::peek authenticates as check, ending an expired session, but never writes or moves last_seen, for a background wake or socket re-check. The module header now names the adopt route (the browser keeps its cookie; no forced sign-in) and peek, and adopt documents that it cannot revive a revoked session for anyone but a holder of its secret. tests/member_session.rs: 7 new (adopt across a reload, both expiries exact, expired writes nothing, adopt twice = one record keeping the later use, the cap oldest first, peek leaves last_seen across a reload, the raw secret absent from the store's files). RED on 994dafff: 28 compile errors (from_secret, adopt, peek); GREEN 13/13 (Daimond GW-SESSION F1)"