Skip to content

feat(auth): ask the default admin for a real email on first login - #673

Merged
fclairamb merged 20 commits into
mainfrom
feat/first-login-admin-email
Oct 24, 2026
Merged

fclairamb merged 20 commits into
mainfrom
feat/first-login-admin-email

Conversation

@fclairamb

@fclairamb fclairamb commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • First-login admin email: the forced first-login password screen asks the seeded admin for a real email while it still has the default address. mustChangeEmail is exposed by the API, change-password accepts an email, dash0 shows the field, and the Go client is regenerated. E2E and unit tests cover it, and the docs describe it.
  • Live incident refetch: the live-refetch damper expires before the live incident opens (batch gate fix).
  • Specs: the completed specs are archived.

Notes

  • main is merged in (11317a681). The branch also carried older copies of the worker env var and OVH SMS work, which main has since shipped in its own form: the merge keeps main's version of those.
  • The merge duplicated code in six auto-merged files; they were reverted to main's version.
  • In internal/app, 10 tests fail only on a checkout without built frontends. CI builds them.

🤖 Generated with Claude Code

fclairamb and others added 18 commits October 15, 2026 00:38
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ig overlay

The callBack was registered in NewServer with the pre-overlay JWT secret
and base URL, so the URL token never matched the handler's. Register it at
the end of InitializeSystemConfig, never derive a token from the public
default secret, skip registration on a localhost base URL, and log one
startup line. Note: job_startup.go reads SP_SERVER_BASE_URL, which never
sets cfg.Server.BaseURL (the documented variable is SP_BASE_URL).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ts against the code

SP_SERVER_CHECK_WORKER_NB, SP_SERVER_JOB_WORKER_NB and
SP_SERVER_CHECK_WORKER_FETCH_MAX_AHEAD were ignored before and apply now.
Someone who set SP_SERVER_CHECK_WORKER_NB=3 from the old docs drops from 25
to 3 runners after upgrading (the fast-lane reservation is then clamped and
warns at start).

- config.Load reads the three names by hand (koanf collapses underscores).
- The system-parameter ApplyFuncs accept the raw env string, so the
  env > DB > default overlay applies the env value.
- Docs: real YAML keys, 15s check timeout, rationale for the default of 25,
  stale SP_SERVER_*_RUNNERS names fixed in compose files and test scripts,
  unused job-worker fetch-ahead row removed.
- envcheck/docs_defaults_test.go compares every documented default with the
  code and fails on documented names nothing binds.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…onment, their documented defaults match the code, and a test keeps them matched

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
POST /auth/change-password takes an optional email while the caller still
signs in with the default admin address and must rotate its password
(mustChangeEmail on login responses and /auth/me). The address, the new
password and the cleared flag land in one update; the password-changed
confirmation goes to the new address. No email-changed notice is ever mailed
to the default address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
While /auth/me reports mustChangeEmail, the forced password screen shows an
optional email and confirm-email pair. Empty fields send no email; a
mismatch or the default address is refused before submit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…screen

Also fixes the session user type that the build caught.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t-login password screen, while the seeded admin still has the default address

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t-login password screen, while the seeded admin still has the default address

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ent (batch gate)

The incident hint landing inside the 3s per-scope cooldown is coalesced ~3s
later and raced the 4s budget under a loaded full run (flaky, passed on retry).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
fclairamb and others added 2 commits October 25, 2026 01:08
# Conflicts:
#	server/internal/app/openapi/openapi.yaml
#	server/internal/app/ovh_dlr_callback.go
#	server/internal/app/ovh_dlr_callback_test.go
#	server/internal/app/server.go
#	server/internal/config/config.go
#	server/internal/config/discord_oauth.go
#	server/internal/config/envvars.go
#	server/internal/config/envvars_test.go
#	server/internal/envcheck/docs_defaults_test.go
#	server/internal/envcheck/envcheck_test.go
#	server/internal/handlers/auth/email_change.go
#	server/internal/handlers/auth/service.go
#	server/internal/handlers/ovhsmscb/handler.go
#	server/internal/handlers/ovhsmscb/handler_test.go
#	server/internal/systemconfig/systemconfig_test.go
#	web/dash0/src/contexts/AuthContext.tsx
#	web/docs/docs/configuration/authentication.md
#	web/docs/docs/configuration/index.md
#	web/docs/docs/configuration/sms.md
#	wiki/conventions/runners.md
@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.18%. Comparing base (0db55de) to head (5db8973).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
server/internal/handlers/auth/service.go 94.87% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #673      +/-   ##
==========================================
+ Coverage   88.16%   88.18%   +0.01%     
==========================================
  Files        1288     1288              
  Lines      131310   131354      +44     
==========================================
+ Hits       115772   115834      +62     
+ Misses      15529    15511      -18     
  Partials        9        9              
Files with missing lines Coverage Δ
server/internal/handlers/auth/email_change.go 89.04% <100.00%> (+1.34%) ⬆️
server/internal/handlers/auth/handler.go 90.16% <100.00%> (+0.08%) ⬆️
server/internal/handlers/auth/service.go 89.42% <94.87%> (+0.07%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fclairamb
fclairamb merged commit e92e608 into main Oct 24, 2026
35 checks passed
@fclairamb
fclairamb deleted the feat/first-login-admin-email branch October 24, 2026 23:37
fclairamb added a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.42.0](v0.41.0...v0.42.0)
(2026-10-26)


### Features

* **ai:** hold auto-applied repairs to the previous version's hosts (+
scan specs) ([#663](#663))
([37966e2](37966e2))
* **api:** cursors on the events and incidents APIs
([#640](#640))
([bbd32b9](bbd32b9))
* **auth:** ask the default admin for a real email on first login
([#673](#673))
([e92e608](e92e608))
* **checks:** offer to resolve open incidents when a check is disabled
([#648](#648))
([9553cdc](9553cdc))
* **dash0:** locate e2e and showcase elements by data-testid, with lint
rules ([#672](#672))
([1aceb52](1aceb52))
* **mcp:** bound tool string inputs and disclose side effects
([#644](#644))
([22039c7](22039c7))
* **notifications:** ntfy notifications link to the incident
([#639](#639))
([e466060](e466060))


### Bug Fixes

* **ai:** hold AI loops to the check's hosts after a real-secrets run
([#646](#646))
([7cf836d](7cf836d))
* **ai:** hold every scheduled repair-auto run to its granted hosts
([#683](#683))
([ae9d0ef](ae9d0ef))
* **ai:** hold the repair: auto host grant when the script or env holds
a reference ([#678](#678))
([de4e718](de4e718))
* **auth:** redirect provider logins with an unknown org to the login
page instead of raw JSON
([#676](#676))
([6c4b4fd](6c4b4fd))
* custom-domain status assets, CSS sample, incident header, check scroll
([#689](#689))
([cdd89e0](cdd89e0))
* dashboard down count, mobile event log, browser retry, async report
test send ([#680](#680))
([f53c99b](f53c99b))
* **deps:** update github.com/dop251/goja digest to 1622cea
([#654](#654))
([70d3bfb](70d3bfb))
* **deps:** update github.com/dop251/goja digest to 2921f52
([#685](#685))
([8186068](8186068))
* **deps:** update github.com/dop251/goja digest to 2a9269b
([#668](#668))
([e536f52](e536f52))
* **deps:** update github.com/dop251/goja digest to 3c7039f
([#651](#651))
([bd93ee7](bd93ee7))
* **deps:** update github.com/dop251/goja digest to 6ace4dd
([#652](#652))
([0d7366c](0d7366c))
* **deps:** update github.com/dop251/goja digest to 6b6a90e
([#687](#687))
([4774086](4774086))
* **deps:** update go dependencies (non-major)
([#638](#638))
([b8453fb](b8453fb))
* **deps:** update go dependencies (non-major)
([#649](#649))
([296ecdf](296ecdf))
* **deps:** update go dependencies (non-major)
([#656](#656))
([9aef341](9aef341))
* **deps:** update module github.com/clickhouse/clickhouse-go/v2 to
v2.50.0 ([#688](#688))
([dbced61](dbced61))
* **deps:** update module github.com/gosnmp/gosnmp to v1.47.0
([#659](#659))
([575e17f](575e17f))
* **deps:** update module github.com/oapi-codegen/oapi-codegen/v2 to
v2.8.1 ([#661](#661))
([aa91cb6](aa91cb6))
* **deps:** update module github.com/ohler55/ojg to v1.28.8
([#675](#675))
([5666052](5666052))
* **deps:** update module github.com/posthog/posthog-go to v1.36.2
([#650](#650))
([fb01ef8](fb01ef8))
* **jobs:** retry a due job promptly when its claim rolls back
([#674](#674))
([f0edadd](f0edadd))
* **log:** drop error=&lt;nil&gt; from successful HTTP request logs
([#664](#664))
([4579f59](4579f59))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant