fix(binjovi): grant the legacy read the backup mirror gate needs #588
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/push-mirror-legacy-rbac"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Binjovi could not read
forgejopushmirrors, solegacy_absentreturned 403 and every codeberg mirror create faileddeniedbefore it reached Forgejo.Measured, not predicted
After
v0.1.611deployed, both bootstrap operations sat atlast_error: "denied", attempt 3 of 5:The Role is
resourceNames-scoped per resource, and this resource had no rule at all.ServiceLegacyClientcannot then distinguish an absent controller object from a denied read, which is the whole point of that gate.This was my omission
The design called this rule mandatory. I scoped RBAC out of the first seanfarm change because neither repository was in the repository bindings yet — which was correct at the time — and then never brought it back when the mirrors landed. The failure is exactly the one that was predicted.
Scope
Only the two repositories binjovi declares. The other 36 mirrors still belong to forgejo-operator, and a name here would let binjovi act on one of them.
Guard
The assertion looks the rule up by resource rather than by index, so reordering the rules cannot hide it, and asserts it is read-only and exactly those two names. Both controls confirmed red before this landed:
FAIL: no forgejopushmirrors read grant; every mirror create dies deniedFAIL: ... is not the two binjovi-owned mirrors, read-onlyPassing:
binjovi-service-handoff,binjovi-repository-bootstrap,binjovi-collaborator-bootstrap,gitmirror-fleet,binjovi.After deploy
The two operations will have reached five attempts and gone terminal. A terminal operation needs a fresh one, not a retry — I will re-request both and then verify the backup from outside the cluster with
git ls-remoteand the twocheck-repository-backup.shguards, which currently holdmake rebuild.https://claude.ai/code/session_01TdW5FSvRJW8CtGnpd29Xp8