Repository navigation
fix(auth): [FDE-2844] sign in through the router and discover the tenant data host - #171
Merged
Merged
Conversation
…ant data host Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dnjg
marked this pull request as ready for review
October 30, 2026 01:56
dnjg
enabled auto-merge
October 30, 2026 01:56
tim-thacker-nullify
approved these changes
Oct 30, 2026
whiskeylotus
pushed a commit
that referenced
this pull request
Oct 30, 2026
Adopts #171's model: a router login stored under the router key with a selected org (DataHost, Installation, QueryParameters, which v0.26.0 also reads), and the router as the default host. On top of it: - Router environments: prod (nullify.ai) and dev (router.dev.nullify.ai), each accepting only its own tenant origins from the org list. - Login on a tenant asks it where to sign in (/auth/cli/config); a router login binds every tenant it lists and retires their old tenant logins. - One org list and one picker (Org) for login, 'org use', 'auth switch --installation' (hidden alias) and the per-command resolver; every choice saves through SelectOrg. - Org precedence: --org, NULLIFY_ORG, NULLIFY_GITHUB_OWNER_ID, git remote owner, saved default (an unavailable one is an error, never another org), only org. A v0.26.0 selection is taken over as the default. - Host input parsed as a URL authority: fragment, userinfo and port are rejected (api.attacker.example#.nullify.ai no longer passes). - Credential and host writes under a cross-process lock; a refresh is saved only over the login it started from and never changes the org; one refresh per auth host at a time in a process. - MCP: data host fixed per server, default org fixed at start, per-call org from a cached list refetched once on a miss, results name the org. Plan-Step: 5/9 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
SSO (Entra/GitLab) users on routed tenants could not use the CLI: the tenant host offers only GitHub sign-in, and the router host that offers SSO serves no data endpoints.
nullify auth loginwith no host (ornullify.ai/app.nullify.ai/api.nullify.ai) signs in through the router, then calls/admin/installationsand stores the selected installation's data host and query parameters. Several installations prompt on a TTY or take--installation;nullify auth switch --installationchanges the selection.nullifyBaseUrlmust be a plainhttps://api.<tenant>.nullify.aiorigin before the token is sent to it.--host <tenant>and existing config hosts keep the single-host behaviour, including refresh query parameters and the GitHub Actions exchange (which is refused on the router host).nullify opensends router users toapp.nullify.ai; wizard, help text, README andinstall.shupdated.Not run live: a browser SSO login against the router followed by a data call to a routed tenant. That is the acceptance test before release.
Follow-ups:
penteststill sends no tenant query parameters; the transports attach the token without checking the request host.Need help on this PR? Tag
@codesmith-botwith what you need.