You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: auth and audit without the store do not refuse a second host (auth also not a network filesystem) #941
Follow-up from #927. Observed by reading the code on main (eccd51f); not reproduced on two real hosts.
The host check that #936 added for several serving processes lives in the store database: the store_servers lease (hostname plus Linux boot id) and the statfs network-filesystem refusal (packages/store/src/topology.ts). Sites without the store get less:
auth (packages/auth/src/auth.ts) opens data/auth.sqlite with WAL and a busy timeout, but it neither reads the filesystem type nor keeps a lease. A site running auth without the store, on two hosts sharing auth.sqlite over NFS/SMB/EFS, activates on both. Better Auth's session and rate-limit tables then rely on WAL and fcntl locking across hosts, which SQLite does not support.
audit (packages/audit/src/store.ts) refuses a Linux network filesystem, but keeps no lease. So an audit-only site on two hosts is not refused on macOS or Windows, where the check is skipped, or on a filesystem type missing from the list.
PR #946 documents the gap in docs/STORE.md ("Only the store detects another host") and in the auth and audit READMEs, but nothing enforces it.
Proposed behavior and alternatives
auth: refuse a network filesystem with the same statfs list the store and audit use. That is a small change.
A host lease that does not depend on the store. Options:
a shared helper, used by auth and audit, writing a lease table into their own databases;
have core refuse the setup when a site declares any SQLite-backed extension without the store. That seems too coarse.
Or leave it documented-only, on the grounds that several hosts are unsupported whichever extension is in use.
Portability: the lease reads /proc/sys/kernel/random/boot_id on Linux and falls back to the hostname elsewhere, as the store's does.
Activity
test(store): a Linux multi-process harness in CI, and per-process thr…
feat(core,auth,audit): refuse a second host and a network filesystem …
chore(package-audit): budgets for the disk-full docs on top of #941 (#…
Disk-full evidence for store, auth and audit; the auth mount answers …
One serving process per database: replace the host lease with an OS l…