docs(docs/admin/users): document login_type=none deprecation and password conversion - #27333
Closed
jakehwll wants to merge 1 commit into
Closed
docs(docs/admin/users): document login_type=none deprecation and password conversion#27333jakehwll wants to merge 1 commit into
login_type=none deprecation and password conversion#27333jakehwll wants to merge 1 commit into
Conversation
…ssword conversion
Contributor
Docs preview📖 View docs preview for |
jakehwll
added a commit
that referenced
this pull request
Jul 28, 2026
… login (#26851) > 🤖 This PR was modified by Coder Agents on behalf of Jake Howell. Deprecates `login_type=none` (legacy passwordless machine users) in favour of premium **service accounts**, and migrates existing accounts off the deprecated path while preserving their identity. Resolves [DEVEX-226]. ## What this does - **Creation is gated** — `POST /users` and `coder users create` reject `login_type=none` (and the deprecated `--disable-login`) unless a service account is requested. - **Existing users are converted** — migration `000554_legacy_none_login_to_password` rewrites legacy non-system, non–service-account `login_type='none'` accounts to `login_type='password'`. Email addresses are **preserved** and existing API tokens remain valid. Admins can set a password if interactive login is desired. ## Why convert to `password` and not `is_service_account`? Migration `000433_add_is_service_account_to_users` adds two CHECK constraints: - `users_email_not_empty`: `(is_service_account = true) = (email = '')` - `users_service_account_login_type`: `is_service_account = false OR login_type = 'none'` Turning a real, email-bearing `login_type=none` user into a service account would require **blanking their email**. Converting to `password` instead preserves the account and its email. >⚠️ **Breaking / one-way.** The `down` migration cannot restore which users originally had `login_type='none'`. Decision log - **Goal:** move existing `login_type=none` users off the deprecated path while preserving their identity/email. - **Constraint discovered:** the `is_service_account` CHECK constraints (migration `000433`) make a literal `none → service account` conversion require blanking emails, so this PR converts to `password` instead to keep emails intact. - **Implementation:** creation-gating in `cli/usercreate.go` and `coderd/users.go`, matching test updates, plus the `000554_legacy_none_login_to_password.{up,down}.sql` migration. - **CI fix:** the branch was behind `main` and its migration originally numbered `000534`, which collided with main's `000534_drop_chat_model_configs_provider`. Merged `main` and renumbered to `000554` (next free after main's `000553`). `make gen` produces no drift (the migration is data-only). > The service-account conversion alternative (#27182, which blanked emails) was closed in favour of this password-preserving approach. > > Docs follow-up: #27333. [DEVEX-226]: https://linear.app/issue/DEVEX-226 --------- Co-authored-by: Sushant P <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs follow-up for #26851 (DEVEX-226). Documents the deprecation of
login_type=noneand the conversion of existing accounts. Merge after #26851, since it describes that PR's behavior.What this does
Updates
docs/admin/users/headless-auth.md:coder users create --login-type none(and the deprecated--disable-login) now error unless--service-accountis passed, and thatPOST /usersreturns400forlogin_type: "none"without a service account. Uses the exact error strings fromcli/usercreate.goandcoderd/users.go.login_type=noneusers topasswordlogin, preserving their email and existing API tokens (matching fix!: deprecatelogin_type=none, convert existing users to password login #26851). An admin must reset the password before web-UI login; token automation is unaffected. One-way conversion.No new pages, so no
manifest.jsonchange.Verification
login_type=none, convert existing users to password login #26851 (cli/usercreate.go,coderd/users.go); upgrade behavior matches000548_legacy_none_login_to_password.up.sql.make lint/emdash,markdownlint-cli2, andvaleall pass on the edited page.