Retry access propagation when sshd offers auth methods besides publickey (CUS-800) - #446
Merged
Merged
Conversation
…key (CUS-800) The propagation retry loop is keyed on unprovisionedAccessPatterns, and the Azure jump-host and GCP providers matched the literal string "Permission denied (publickey)". sshd lists every auth method it allows, so a VM that also permits password auth reports "Permission denied (publickey,password)." — the pattern missed, the CLI treated the first failed attempt as a completed session, and connections right after a fresh grant always failed instead of retrying through the RBAC propagation window. Tolerate any parenthesized method list that includes publickey. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughAzure and Google SSH unprovisioned-access detection now recognizes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
GGonryun
approved these changes
Jul 17, 2026
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.
Problem
p0 sshto an Azure VM behind a jump host fails permanently when connecting right after a fresh grant, instead of retrying while the access role propagates.The access-propagation retry loop (up to 180s) is keyed on each provider's
unprovisionedAccessPatterns. The Azure jump-host provider (and the GCP provider) matched the literal stringPermission denied (publickey)— but sshd lists every auth method it allows, so a VM whose sshd also permits password auth reports:The pattern misses,
isAccessPropagated()returns true, and the CLI treats the first failed attempt as a completed session — it submits anssh.session.endaudit log and exits after a single try. Since Azure RBAC role assignments take up to ~1 minute to propagate to AAD SSH login, connecting immediately after a grant always fails on such VMs. Reproduced twice against a live jump-host setup (grant at 15:04:12, cert minted at 15:04:14, one attempt, immediate termination, zero retries).Fixes CUS-800.
Change
Loosen the pattern to tolerate any parenthesized method list that includes
publickey:Applied to
src/plugins/azure/ssh-jump-host.tsandsrc/plugins/google/ssh.ts(same latent bug; GCP OS Login VMs are usually publickey-only, which is why it hasn't bitten there yet).Testing
(publickey,password)and(publickey,gssapi-keyex,gssapi-with-mic,password); GCP provider retries on(publickey,password). Both written first and observed failing against the old patterns.tscclean.🤖 Generated with Claude Code