Epic: one identity, one place to edit it (ADR 0038) #64

Stängd
öppnade 2026-08-02 08:05:05 +00:00 av supernaut · 1 kommentar
Ägare

Summary

Give every identity field exactly one place it can be changed, so no field is
visible in two systems holding different values.

A user currently faces three account surfaces — Gitborg Auth, the portal, and the
Git application — with nothing to say which is authoritative. That is an
integration gap rather than a presentation problem: Forgejo reads OIDC claims
once, when the account is created on first sign-in, and never again. Its copies
of the full name and email address are a local fork with no merge path back, in
either direction. So the email address is editable in the one place where
editing it has no effect.

What we're building

  • Ownership split. Gitborg Auth owns identity data. The portal is the single
    place it is edited — a verified email change needs to send mail, and the
    identity provider cannot. The Git application keeps what only it has: SSH and
    GPG keys, access tokens, notifications.
  • Enforcement. The reconciler (ADR 0035) gains an identity projection
    alongside the entitlement one, pushing the display name and email onto the Git
    account and following operator-initiated renames. Accounts are joined on the
    OIDC subject, never the username — which is exactly what a rename changes.
  • Concealment. The systems that do not own a field hide it, using the styling
    hook each already ships. Concealment and enforcement are separate mechanisms
    and both are required: concealment alone leaves the API open, enforcement alone
    means users edit a field and watch it silently revert.
  • Verified email change. The portal sends a confirmation link to the proposed
    address; nothing changes until it is opened, and the previous address is
    notified afterwards.
  • Username becomes fixed at sign-up. It is the owner segment of every
    repository URL an account holds, so renaming is an operator action.

Decision record

ADR 0038 — Identity field ownership and the single edit surface
(decisions/0038-identity-field-ownership.md).

Tasks

  • Decision record: bitborg-docs#65
  • Identity projection + deployment: tracked in the reconciler repository;
    the pinned-image bump and rollout are bitborg-infra#323
  • Conceal and disable the fields elsewhere: bitborg-infra#324
  • Portal profile section + verified email change: bitborg-web#148

Out of scope

  • Self-service username changes. A rename moves every repository URL the account
    owns and breaks links in workflows and documentation, so it stays an operator
    action — the projection carries it across.
  • Granting self-service email editing in the identity provider. It has no mail
    sender, so it cannot verify an address, and this one is also the
    account-recovery address.
  • Forgejo's additional email addresses. Those are commit attribution rather
    than identity and stay available deliberately; only the choice of primary
    address is withdrawn.

Notes discovered during delivery

  • Forgejo does populate full_name on JIT account creation, contrary to the
    open upstream issue. There was no blank-name backlog, so a run correcting
    nothing is the expected steady state — verify the projection with a positive
    test, never by expecting a spike.
  • Accounts created locally that have never completed an OIDC sign-in carry no
    external identity, so they are correctly skipped and stay unmanaged until first
    sign-in links them.
## Summary Give every identity field **exactly one place it can be changed**, so no field is visible in two systems holding different values. A user currently faces three account surfaces — Gitborg Auth, the portal, and the Git application — with nothing to say which is authoritative. That is an integration gap rather than a presentation problem: Forgejo reads OIDC claims once, when the account is created on first sign-in, and never again. Its copies of the full name and email address are a local fork with no merge path back, in either direction. So the email address is editable in the one place where editing it has no effect. ## What we're building - **Ownership split.** Gitborg Auth owns identity data. The portal is the single place it is edited — a verified email change needs to send mail, and the identity provider cannot. The Git application keeps what only it has: SSH and GPG keys, access tokens, notifications. - **Enforcement.** The reconciler (ADR 0035) gains an identity projection alongside the entitlement one, pushing the display name and email onto the Git account and following operator-initiated renames. Accounts are joined on the OIDC subject, never the username — which is exactly what a rename changes. - **Concealment.** The systems that do not own a field hide it, using the styling hook each already ships. Concealment and enforcement are separate mechanisms and both are required: concealment alone leaves the API open, enforcement alone means users edit a field and watch it silently revert. - **Verified email change.** The portal sends a confirmation link to the proposed address; nothing changes until it is opened, and the previous address is notified afterwards. - **Username becomes fixed** at sign-up. It is the owner segment of every repository URL an account holds, so renaming is an operator action. ## Decision record ADR 0038 — Identity field ownership and the single edit surface (`decisions/0038-identity-field-ownership.md`). ## Tasks - **Decision record:** bitborg-docs#65 - **Identity projection + deployment:** tracked in the reconciler repository; the pinned-image bump and rollout are bitborg-infra#323 - **Conceal and disable the fields elsewhere:** bitborg-infra#324 - **Portal profile section + verified email change:** bitborg-web#148 ## Out of scope - Self-service username changes. A rename moves every repository URL the account owns and breaks links in workflows and documentation, so it stays an operator action — the projection carries it across. - Granting self-service email editing in the identity provider. It has no mail sender, so it cannot verify an address, and this one is also the account-recovery address. - Forgejo's *additional* email addresses. Those are commit attribution rather than identity and stay available deliberately; only the choice of primary address is withdrawn. ## Notes discovered during delivery - Forgejo **does** populate `full_name` on JIT account creation, contrary to the open upstream issue. There was no blank-name backlog, so a run correcting nothing is the expected steady state — verify the projection with a positive test, never by expecting a spike. - Accounts created locally that have never completed an OIDC sign-in carry no external identity, so they are correctly skipped and stay unmanaged until first sign-in links them.
Upphovsperson
Ägare

Build scope delivered. Every identity field now has exactly one place it can be changed, and no field is offered in two systems.

Live and verified in production:

  • Enforcement — the reconciler projects the display name and email onto the Git account, joined on the OIDC subject. Proven positively: a deliberately wrong value was corrected on the next run, with the identity link untouched.
  • Concealment — verified against live pages signed in as an OIDC account. Full Name, set-as-primary, password and account deletion are all gone from the Git application; username, display name and the email block are gone from the identity provider, which now points at the account dashboard instead.
  • Editing — the portal is the single edit surface. Display name writes straight through; email goes through a confirmation loop, because the identity provider has no mail sender and cannot verify an address.

Two things learned that are worth carrying forward, both recorded in the tasks:

  1. Forgejo does populate the full name at account creation, contrary to the upstream issue. There was no backlog to correct, so "the projection produced no output" cannot distinguish working from inert — verify it positively.
  2. The concealment selectors were first derived from upstream template source rather than rendered markup, and that missed two elements. Check rendered pages whenever the concealment health gate fires on an upgrade.

Closing per the epic convention: what remains is operational rather than build work. Accounts created locally that have never completed an OIDC sign-in carry no external identity, so their names stay unmanaged until they sign in once — that resolves itself per user and needs no further building.

Build scope delivered. Every identity field now has exactly one place it can be changed, and no field is offered in two systems. Live and verified in production: - **Enforcement** — the reconciler projects the display name and email onto the Git account, joined on the OIDC subject. Proven positively: a deliberately wrong value was corrected on the next run, with the identity link untouched. - **Concealment** — verified against live pages signed in as an OIDC account. Full Name, set-as-primary, password and account deletion are all gone from the Git application; username, display name and the email block are gone from the identity provider, which now points at the account dashboard instead. - **Editing** — the portal is the single edit surface. Display name writes straight through; email goes through a confirmation loop, because the identity provider has no mail sender and cannot verify an address. Two things learned that are worth carrying forward, both recorded in the tasks: 1. Forgejo *does* populate the full name at account creation, contrary to the upstream issue. There was no backlog to correct, so "the projection produced no output" cannot distinguish working from inert — verify it positively. 2. The concealment selectors were first derived from upstream template source rather than rendered markup, and that missed two elements. Check rendered pages whenever the concealment health gate fires on an upgrade. Closing per the epic convention: what remains is operational rather than build work. Accounts created locally that have never completed an OIDC sign-in carry no external identity, so their names stay unmanaged until they sign in once — that resolves itself per user and needs no further building.
supernaut lade till detta till projektet Bitborg Roadmap 2026-08-02 10:11:31 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-docs#64
Ingen beskrivning angiven.