Skip to content

feat(settings,auth): expose the audience posture in the auth settings namespace (console switch surface for self-host) #11768

Description

@os-zhuang

The audience posture shipped by #11739 (PR #11767) is authorable on AuthConfig and live-patchable via AuthManager.applyConfigPatch, and cloud gets its own switch surface (objectstack-ai/cloud#1649) — but the OPEN-SOURCE operator surface has no channel: the auth settings namespace (packages/services/service-settings/src/manifests/auth.manifest.ts + the bindAuthSettings binding in packages/plugins/plugin-auth/src/auth-plugin.ts) exposes signup_enabled / require_email_verification / membership_policy, but not the audience posture. A self-host admin therefore cannot switch invite_only | email_domain | open (or declare the domain list / self-registration permission set) from the console Settings page — only from stack config at boot.

Suggested shape, following the membership_policy precedent exactly (#5152: explicit-only application, off-vocabulary values rejected loudly and never coerced):

  • manifest entries in an audience group: a select over the closed vocabulary, a domain-list field, a permission-set name field;
  • bindAuthSettings maps them to one applyConfigPatch({ audience: {...} }) — note the patch validates the MERGED result and throws on an invalid combination (empty domain list under email_domain, missing permission set, verification contradiction), so the binding should catch and report per the existing applySettings catch;
  • the settings write path already enforces the option table on setMany; an OS_AUTH_* env override channel, if added, must run isAudiencePosture at the boundary.

Out of scope for #11739 (its declared file surface excluded packages/services/service-settings/**); filed from that dispatch as an out-of-scope finding.

Blocked-by: #11739

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions