Repository navigation
docs(sso): both domain-verification steps answer 400 DOMAIN_VERIFICATION_DISABLED with the switch unset, and an unknown provider 404 RESOURCE_NOT_FOUND with it on - #22504
Merged
objectstack-fleet[bot] merged 1 commit intoOct 9, 2026
Conversation
…t-found on The callout under "Domain verification (opt-in)" said that with OS_SSO_DOMAIN_VERIFICATION unset the two steps report it differently and that verify-domain passes the inner 404 through. Both doors answer 400 DOMAIN_VERIFICATION_DISABLED with the switch unset, without reaching the inner endpoint; with it on, an unknown providerId gets 404 RESOURCE_NOT_FOUND from either door. The "match on the code" advice keeps a true reason: step 2's NO_PENDING_VERIFICATION is a 404 as well. Claude-Session: https://claude.ai/code/session_01LYXc6ckoWuZyVZpWYizdMh Co-authored-by: Claude <noreply@anthropic.com>
objectstack-fleet
Bot
deleted the
claude/issue-22493-sso-domain-verification-callout
branch
October 9, 2026 16:15
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.
Fixes #22493
Clause-②: no
What changed
content/docs/permissions/sso.mdx, the callout under Domain verification (opt-in). Only the middle sentence changed. The callout's headline, its first clause and the identity-before-capability sentence are byte-identical. Docs only: no code, no test, no changeset.Before (
origin/maine148ca98,:281–:284):After:
The page still tells readers to match on the code, but the reason is now true. With the switch on, step 2 answers both an unknown provider and a provider with no pending verification with a 404. Only the code tells them apart.
The code these answers were read from
All paths are under
packages/plugins/plugin-auth/src, read ate148ca98:auth-plugin.ts:3084–:3089and:3102–:3107: each mount runsgateAdmin(c)first. It then calls its bridge with{ domainVerificationEnabled: this.authManager!.isSsoDomainVerificationEnabled() }.register-sso-provider.ts:455and:511:if (options.domainVerificationEnabled === false) return domainVerificationDisabled();. This line comes before the inner request is built, so the vendor is never asked.register-sso-provider.ts:370–:372:domainVerificationDisabled()returns{ status: 400, … code: 'DOMAIN_VERIFICATION_DISABLED' … }. Both doors share this one helper.register-sso-provider.ts:464and:530:if (resp.status === 404 && !parsed?.code) return codelessVendorNotFound(providerId, options);register-sso-provider.ts:380–:381: whendomainVerificationEnabled === true, that 404 becomes{ status: 404, … code: 'RESOURCE_NOT_FOUND' … }.register-sso-provider.ts:541: a vendor error that carries a code passes through with the vendor's own status and code. This is how step 2'sNO_PENDING_VERIFICATIONkeeps its 404.auth-manager.ts:7036–:7040:isSsoDomainVerificationEnabled()is false unless SSO is wired. Otherwise it readsconfig.plugins.ssoDomainVerification, thenOS_SSO_DOMAIN_VERIFICATION, and defaults tofalse.The not-found answer is the bridge's own code,
RESOURCE_NOT_FOUND. The page quotes no vendor wording.Pins that hold these answers
sso-domain-verification-unknown-provider.pin.test.tsruns a realAuthManagerbehind the plugin's real route registration. Its blocks pin these answers::196: switch on, unknown provider: 404RESOURCE_NOT_FOUNDon both doors.:210: switch off: 400DOMAIN_VERIFICATION_DISABLEDon both doors, and the vendor is never asked.:232: switch on, existing provider, no pending verification: 404NO_PENDING_VERIFICATIONon verify-domain.:244: anonymous: 401UNAUTHENTICATEDon both doors, with the switch on or off.packages/qa/dogfood/test/admin-route-nonadmin-refusal.dogfood.test.ts:UNAUTHENTICATEDand 403PERMISSION_DENIEDsentence (:614–:619), and that the platform admin is not refused (:627–:632).400 DOMAIN_VERIFICATION_DISABLEDat:307and:312is in anote:string. It is not asserted. The plugin-auth file above is what pins the off answer.Test Corecheck concludedsuccessone148ca98.check:error-status-conformance, reconciles statuses onapi/error-catalog.mdxandprotocol/kernel/error-handling.mdxonly. No gate is added.Sweep for other stale copies
git grepbefore the edit, ate148ca98:inner \*\*404\*\*\|passes the innerovercontent/docs/**: 1 hit,sso.mdx:284.report that differentlyovercontent/docs/**: 1 hit,sso.mdx:282.DOMAIN_VERIFICATION_DISABLEDovercontent/**,skills/**,docs/**,apps/docs/**and*.md/*.mdx:sso.mdx:283, plus the two generated code lists (references/api/contract.mdx:143andreferences/api/error-code-ledger.mdx:310, code names only). The rest were the pending.changesetfor the code change and the releasedplugin-auth/CHANGELOG.md, which this PR does not touch.The callout was the only stale copy.
Local gates, at
620e67e2node scripts/pm/dispatch-gates.mjs --commandsderived 43 commands from merge basee148ca984, with 1 path changed (+4/−3).PREREQUISITE NOT METbecause@objectstack/lint,@objectstack/formulaand@objectstack/client-reactwere not built. Those runs measured nothing. After those packages were built, all four ran again and exited 0. The four werecheck:doc-formula-expressions,check:doc-security-posture,check:skill-examplesandcheck:docs-transcript-drift.--ranreconciliation:43 derived famil(ies) accounted for — 43 run, 0 NOT-MEASURED (a DERIVED zero — all 43 recorded an exit code and none of them is 3).The four the dispatch named:
pnpm check:doc-authoringdoc authoring guard: 418 files clean — no bare metadata literals.pnpm check:doc-anchors472 internal #fragment link(s) across 417 source file(s)all land on a real headingpnpm --filter @objectstack/lint run check:doc-security-posture28 ObjectSchema.create example(s) in 230 marked block(s) across 254 prose file(s) in 2 root(s) carry an os validate-clean security posturepnpm --filter @objectstack/spec run check:docs225 generated files in sync with packages/specNOT MEASURED here because these are CI's own shell:
ci.yml · Build Docs(the docs app build), theTest Coreshards and the type-check lanes.Acceptance notes
OS_SSO_DOMAIN_VERIFICATION.isSsoDomainVerificationEnabled()also reads the config keyplugins.ssoDomainVerification, which wins over the env var, and it is false whenever SSO itself is not wired. The callout keeps the page's existing env-var framing. Nothing changed here.:274–:277namesNO_PENDING_VERIFICATIONwithout a status. The callout now gives its status. That paragraph is otherwise untouched.content/docs/**ships in no public package'sfiles[]. I checked every tracked publicpackage.jsonand found zerofiles[]entries naming content or docs. As a control, 69 public packages do listdist.Generated by Claude Code