fix(mail): replace the Sweego API key with one from the correct account #273
Inga granskare
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!273
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/sweego-api-key-account"
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?
Replaces
vault_sweego_api_keywith a key issued from the correct Sweego account.Symptom
After #272 applied, Forgejo's SMTP test mail delivered fine and the received headers showed
dkim=passformail.gitborg.se. But a real sign-up produced no email, and the portal logged:Root cause
The portal and Forgejo authenticate to Sweego by different credentials:
vault_forgejo_mailer_*(SMTP relay)vault_sweego_api_key(HTTP API)Only the SMTP credentials came from the right account. The previous API key belonged to a
different Sweego account — so it authenticated successfully, which is precisely why the failure
was 422 and not 401, but that account has no verified
mail.gitborg.sesending domain. Sweegoaccepted the request and rejected the sender.
The status code was the tell: a revoked or malformed key gives 401/403. A 422 means "I know who you
are, and you may not send this."
Effect: sign-up completed and provisioned the Kanidm account, but the credential-reset link was
never delivered — silent from the user's side, since portal email is best-effort by design so as not
to fail a sign-up that already succeeded.
Note on the dry-run
web : Create the web Sweego API key podman secretreportsskippingunder--check, becausepodman commands do not execute in check mode. The dry-run is therefore structurally blind to this
change and shows only the consequent restart. Expected, but worth knowing: a check-mode diff cannot
confirm a secret rotation here.
Two gaps this exposes — not fixed here
sendEmailin bitborg-web recordsres.statusand throwsaway the response body, so the 422's explanation never reached the logs. Diagnosis required
account knowledge rather than evidence.
EMAIL_FROM's domain. A valid key for thewrong account passes every check we have — CI, the health gates, and the apply itself. This is
the same class of defect as gitborg/gitborg-web#113: a credential and a sender that must agree,
with nothing asserting they do.
Verification
Sign-up end-to-end after this applies, and confirm the setup-link mail arrives with
dkim=passandd=mail.gitborg.se.