Skip to content

Upgrade notes: npm and Yarn password logins of local accounts follow the local realm's client-password setting - #811

Merged
schmitch merged 1 commit into
mainfrom
claude/793-npm-login-upgrade-note
Nov 2, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/793-npm-login-upgrade-note

Conversation

@schmitch

@schmitch schmitch commented Nov 2, 2026

Copy link
Copy Markdown
Member

Fixes #793

Problem

In 2.1, cli_auth::password_login (yarn npm login, npm login --auth-type=legacy) called verify_password_login. By its own doc that check was "Not gated by allow_password_basic", and it walked every realm (v2.1.0 crates/server/src/auth/mod.rs:981-987).

Since #647 it passes PasswordFrom::Client (crates/server/src/cli_auth.rs:154), so only the realms that accept client passwords take part. Migration 0006 sets the local realm's accept_client_passwords from allow_password_basic, which defaulted to false (v2.1.0 crates/server/src/auth/settings.rs:147).

So on a default 2.1 install, yarn npm login (Yarn's only login) answers 401 for every local account after the upgrade. 647.upgrade.md describes a change only for installs with a credential-forwarding realm, so those operators read that nothing changes for them. docs/npm.md already describes the new behaviour.

Change

A new fragment, docs/changes/2.2.0/793.upgrade.md, says:

  • these logins now follow the local realm's Accept passwords from clients (HTTP Basic);
  • the upgrade leaves that setting off where allow_password_basic was off;
  • credential-forwarding accounts are unaffected.

It names the remedies: the setting under Admin → Authentication, the browser login (npm login), or a token from the web UI.

The note only helps in 2.2.0's own notes, so it belongs before the tag. cargo xtask changelog --check passes.


Generated by Claude Code

…client-password setting

In 2.1 the npm password login (`yarn npm login`, `npm login
--auth-type=legacy`) walked every realm whatever `allow_password_basic`
said. Since #647 it goes through the realms that accept client passwords
(`PasswordFrom::Client`), and migration 0006 sets the local realm's
setting from `allow_password_basic`, off by default. On such an install
these logins answer 401 for every local account after the upgrade.
647.upgrade.md describes the change only for installs with a
credential-forwarding realm, so the operators it hits read that nothing
changes for them.

A fragment of its own says so, and names the remedies: the local realm's
setting, the browser login, or a token.

Fixes #793

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJc1H3748D8sheqhKTV
@schmitch
schmitch added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit c4f0f7d Nov 2, 2026
18 checks passed
@schmitch
schmitch deleted the claude/793-npm-login-upgrade-note branch November 2, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants