Entitlements fail open: group-less/JIT owners get unlimited quota (quota.default = -1) #120
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#120
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Severity: CRITICAL — surfaced by the pre-onboarding infra audit (2026-07-19).
#85was closed intending to set[quota.default] TOTAL = 0to close the fail-open window, but the fix could not land: the in-file comment (ansible/roles/forgejo/templates/app.ini.j2:183-197) records that on Forgejo 16[quota.default]is composed restrictively for everyone (not just group-less users as on v15), so0broke all users — even members of unlimited groups couldn't push/merge. SoTOTALis back to-1(unlimited) and the window#85was meant to close is still open.How it fails open
[quota.default]governs any owner in no quota group. It is-1(unlimited). The reconciler (roles/reconciler, timer*:0/15) is the only thing that puts a user into a quota group.Ask
Close the JIT/reconciler-down window with a mechanism that survives the v16 restrictive-compose behaviour, e.g.:
[quota]group precedence).Refs closed #85, ADR 0017/0029.
✅ Resolved + verified live (2026-07-19, PRs #150 + #152).
Fail-closed default:
[quota].DEFAULT_GROUPS = participantis live in the running Forgejo config. Verified via the admin quota API that it did NOT break anyone (the[quota.default]=0incident is not reproduced):supernaut→lfs-basic(base=size:repos:all/assets:all -1, unlimited repos + tier LFS cap);kofish→lfs-xl(base -1+ 50 GiB LFS). Grouped users show ONLY their explicit group, soDEFAULT_GROUPSacts as a fallback for group-less owners only.gitborg→org-unlimited(size:all -1).participantgroup (browse + issues yes, uploads no) until the reconciler assigns their real tier — the intended fail-closed behaviour.Defense-in-depth (PR #150):
ReconcilerStaledeadman alert (a dead reconciler that would silently stop entitlement sync is now detected) + reconcile interval 15 → 5 min (shrinks the group-less window). Forgejo healthy after the app.ini restart.Rollback if ever needed:
forgejo_quota_default_groups: ""+ apply.