rename: seven Forgejo service-account email addresses still on gitborg-*@gitborg.se #390
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#390
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?
All seven Forgejo service accounts still carry
gitborg-*@gitborg.seemail addresses. Theusernames moved to
bitborg-*in ADR 0039 tranche 1; the addresses were deliberately left asLEGACY-PINs and are the lastgitborgstrings on those accounts.Plus one derived consumer:
renovate_git_authorinroles/renovate/defaults/main.ymlisBitborg Renovate <gitborg-renovate@gitborg.se>, which appears as the commit author on everyRenovate PR — the most visible of the set.
⚠️ The ordering hazard — this is not a declaration edit
create-user.ymlis create-only: it never reconciles an existing account's email. So editingforgejo_service_accountson its own does not change the server — it silently drifts thedeclaration away from live state, and
changed=0would keep reporting convergence while the twodisagree. This is the same trap the username rename had to route around, and the note beside
forgejo_service_accountsingroup_vars/all/vars.ymlalready records it.So the order must be: change each address on the live server first (admin API), then update
the declaration to match — the reverse of the usual flow.
❓ Decide the target domain before touching anything
The pinned note says these "flip with the mail domain, not with the account name", which is what made
them look like §5 work. But they are on the apex
@gitborg.se, not@mail.gitborg.se— so §5(the sending domain, now
email.bitborg.se) did not actually govern them. The apex moved on2026-08-04 in §4b, which is arguably when these became actionable.
no-reply@email.bitborg.seis a sending identity and is wrong for an account's own address, sincethese are the addresses Forgejo would send to. Most likely target is
bitborg-*@bitborg.se.Open question worth answering first: do these need to be deliverable at all? Forgejo requires an
email per account and enforces uniqueness, but bot accounts may never need to receive. If any of them
does (password reset, notification), the mailbox has to exist — §4b moved three real mailboxes, and
these seven are not among them.
Acceptance
forgejo_service_accountsmatches live stateafterwards — assert the match against the API, not against the template.
renovate_git_authormoved with them; confirm on a freshly opened Renovate PR, since the authoris baked in at commit time.
audit bot and the CI token would both fail loudly and late).
changed=0, and theLEGACY-PINmarkers are gone from those lines.Done 2026-08-10 — server first, then the declaration (infra #416).
What changed
All seven addresses →
bitborg-*@noreply.git.bitborg.se, plusrenovate_git_author.The domain question, answered
The description asked whether these need to be deliverable at all. They don't — none of the seven has a mailbox, and §4b moved only three real ones, none of them these. So
bitborg-*@bitborg.sewould have declared seven deliverable-looking addresses that bounce, carrying today's latent problem onto the new domain.Forgejo's own noreply domain is the honest answer: explicitly non-deliverable, unique per account, and already the convention the org account uses (
bitborg@noreply.git.bitborg.se).One risk checked rather than assumed: Forgejo reserves that domain for the generated
<login>@<noreply>pseudo-address, so it might have rejected it as a real user email. 16.0.1 accepts it.changed=0is not the evidence, and can't becreate-user.ymlcannot reconcile an email, so it reports converged whatever the declaration says — the exact trap this issue described. The assertion is against the API: all seven re-read with independent calls after the write.No account lost a PAT. 10 tokens across the seven, counts unchanged before and after:
Two API details worth keeping
PATCH /admin/users/{u}treatslogin_nameandsource_idas a pair — sendinglogin_namewith an email is a 422 ("source_id and login_name must be specified together"). Sendemailalone.GET /users/{u}/tokensneeds basic auth and 401s with a PAT. The working endpoint isGET /admin/users/{u}/tokens— the onetoken-auditalready uses. A PAT-survival check built on the wrong endpoint returns nothing on both sides and passes vacuously.Required a temporary
write:adminPAT; no standing token has it, deliberately (ADR 0024 —webhook-adminandtoken-auditare both read:admin,vault_forgejo_admin_tokenwas removed). Minted, used, revoked, never vaulted.One acceptance criterion still pending
The author is baked in at commit time and
renovate_git_authoronly reaches the host on an apply, which has not run yet. Check the first Renovate PR after the next apply — the timer is Mondays 00:30 UTC. Reopen if the author line still readsgitborg-renovate@gitborg.se.Found while verifying, out of scope
Two accounts not in
forgejo_service_accountsand not sign-up drill accounts (those aredrill-signup-<ts>), still carrying the old brand in both username and address:Left untouched — deleting accounts is destructive and outside this issue. Note they also occupy two
gitborg-*names, which interacts with the reserved-username reasoning in §9.