feat: add break-glass user email update (#29256)

Adds an owner-only experimental API and hidden CLI command for
break-glass user email corrections.

The operation verifies the existing email, updates it transactionally,
clears outstanding password-reset state, revokes the target user's Coder
sessions and API tokens, and records successful and failed authenticated
attempts in the audit log. External-auth links remain unchanged.

Generated by Coder Agents.
This commit is contained in:
Cian Johnston authored and GitHub committed 2026-09-14 14:33:36 +01:00
1 parent 1321b41854
commit 2cf819bfca
19 files changed
+915

No files matched your search

+5
View File
@@ -1327,6 +1327,11 @@ func New(options *Options) *API {
httpmw.ReportCLITelemetry(api.Logger, options.Telemetry),
)
r.Route("/users/email", func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Put("/", api.putUserEmailExperimental)
})
// NOTE(DanielleMaywood):
r.Route("/users/{user}/skills", func(r chi.Router) {
r.Use(