Skip to content

Azure: reach and signInTo take a tenant domain - #111

Open
odgrim wants to merge 1 commit into
track-a/azure-select-rollbackfrom
track-a/azure-tenant-domains
Open

odgrim wants to merge 1 commit into
track-a/azure-select-rollbackfrom
track-a/azure-tenant-domains

Conversation

@odgrim

@odgrim odgrim commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Change

A block's tenant written as a domain works in reach and signInTo, as Runbooks main accepted "tenant ID or domain". Before this, reach answered unknown "ids[n] is not a tenant id", and signInTo refused the domain with invalidParams, so the row's "Sign in to" always failed.

  • reach asks az for a token with --tenant <domain>, as a domain pin already did. The answer is classified as for an ID. A reached domain is named by the tenant its token is for.
  • signInTo signs in with az login --tenant <domain>.
  • Text that is neither a GUID nor a domain stays unknown in reach, now "ids[n] is neither a tenant id nor a domain", and invalidParams in signInTo.

Decisions

  • az resolves the domain. No domain list is kept or matched: any domain az accepts works, the same way the tenant pin already resolves one.
  • reach answers with the id as asked, the domain, not the tenant id it resolved to. Runbooks matches a reached id to its row exactly.
  • A refused domain carries no name. Without a token there is no tenant id to name it by, and the domain itself reads well as the row's label.
  • The fake's login now resolves a domain through its domain map, as its token already did.

Gaps

  • reach_ids has no 256-character check of its own: a ReachId can't exceed it.
  • Untested: that a mixed-case domain is echoed as asked, not lowercased; the 253-character and 63-character-label bounds, the only bounds on signInTo's id before az login --tenant; and the trailing-hyphen check.
  • A domain az can't resolve is likely noAccess with real az (AADSTS90002); the fake answers unknown. Not run against real az.
  • A domain's token refusal says "Sign in with that tenant ID". A non-ASCII domain or a trailing dot gets the generic refusal, with no hint to use the xn-- form.

Evidence

  • reach_and_sign_in_to_take_a_tenant_domain failed before the change: left: [String("fabrikam.onmicrosoft.com"), Null, String("unknown")] right: [String("fabrikam.onmicrosoft.com"), Null, String("needsMfa")].
  • A hand mutant naming no reached domain fails it (181 passed, 1 failed).
  • reach_answers_each_id_as_asked and sign_in_to_refuses_what_it_cannot_sign_in_to pinned the old refusal of a domain. They now use "not a tenant".
  • mise run check at 06fe37d: 504 tests run: 504 passed, 0 skipped, lint clean, semver no publishable crates.
  • Audit dependencies is red, as on main, until the pin-project-lite 0.2.19 lock update.
  • Rebased for the stack, 14ed055 to 6de5b70: the PR's diff has the same git patch-id --stable (9f257bcab07e) and the same changed lines, tree unchanged.

A reach id or signInTo id may be a domain such as
contoso.onmicrosoft.com, as a tenant pin already may. az resolves it:
reach asks for a token with --tenant <domain>, and signInTo signs in
with it. A reached domain is named by the tenant its token is for.
Text that is neither a GUID nor a domain stays unknown in reach and
invalidParams in signInTo.
@odgrim
odgrim force-pushed the track-a/azure-tenant-domains branch from 14ed055 to 6de5b70 Compare December 6, 2026 16:03
@odgrim
odgrim added this pull request to stack #118 December 6, 2026 16:04
@odgrim
odgrim marked this pull request as ready for review December 6, 2026 16:14

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant