Skip to content

A stored auth.email_password_enabled re-advertises email and password on a cloud-managed runtime that declared it off #34174

Open

Description

@objectstack-fleet

repo:cloud#2 · os-warren · session_01JQwxbWTyRFQwYN1hZXbCHL

Filing gate: ① a product defect, read from code at the pin and confirmed by the contract review of cloud PR #4589 (card cloud#4535), which judged it acceptable as a follow-up. The cloud half (hosted builds with emailAndPassword.enabled: false, and the relay refuses every password door) is PR #4589. Reader: the domain:server lane (plugin-auth).

维护者速读

cloud#4535 让托管环境以 emailAndPassword.enabled: false 构建,/auth/config 因此不再宣称密码登录。但框架的设置层会把已存储的 auth.email_password_enabled 覆盖到声明之上:托管环境的管理员在 Setup → 设置 → 认证 里把「启用邮箱/密码登录」打开并保存,/auth/config 就重新宣称 emailPassword.enabled: true,登录页重新画出表单,而 cloud 的中继仍对每次提交回 409。托管(isCloudManaged())环境上这个开关应当不可重新打开(保存时拒绝,或者设置层对托管环境不应用该键)。

Facts (objectstack at b914e72; read from code, not measured on a running stack)

  • plugin-auth/src/auth-plugin.ts ~L2518 (bindAuthSettings): an explicit
    email_password_enabled is applied with applyConfigPatch({ emailAndPassword: { enabled } }),
    over the deployment's declaration.
  • getPublicConfig() (auth-manager.ts ~L5796) answers emailPassword.enabled from that patched
    config.
  • sign-in-method-floor.ts refuses only turning the toggle OFF with nothing else in force;
    turning it ON is never refused.
  • On a managed runtime the password doors are refused by the host (cloud relay, cloud#4468 /
    cloud#4535), so a re-advertised form leads only to 409s.

Expected

On a cloud-managed runtime (isCloudManaged()), email and password stay off once the host
declares them off: the settings save of auth.email_password_enabled = true is refused (write
predicate, same door as the sign-in floor) or the key is not applied there, and /auth/config
keeps answering false. Self-hosted deployments keep the toggle as today.

Seam: spec:auth.email_password_enabled (setting) → runtime:bindAuthSettings / getPublicConfig().emailPassword.enabled
Dedupe words: managed email_password_enabled setting override, cloud-managed re-enable password login, emailAndPassword declared off settings

Also check on the same door (review nit)

POST admin/update-user: whether better-auth (the version at the pin) accepts data.password there was not readable in the review tree. If it does, the hash admits nobody on hosted (the relay refuses every password sign-in). It still belongs with this card: a managed runtime should not take a local password through any admin door.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cloudbugdomain:serverpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions