Skip to content

fix(boundary): guard cancel on unable to authorize connection - #6780

Open
shoemoney wants to merge 1 commit into
hashicorp:mainfrom
shoemoney:fix/boundary-cancel-guard
Open

fix(boundary): guard cancel on unable to authorize connection#6780
shoemoney wants to merge 1 commit into
hashicorp:mainfrom
shoemoney:fix/boundary-cancel-guard

Conversation

@shoemoney

Copy link
Copy Markdown

Fixes proxy cancel storm when authorization fails.

Bug: Start() calls p.cancel() unconditionally for any runTcpProxyV1 error at proxy.go:286, including unable to authorize connection. This kills all active connections even though existing sessions remain valid. websocket.go already handles this case by signaling connsLeft 0 without canceling.

Fix: Guard p.cancel() with strings.Contains check for unable to authorize connection, allowing active connections to continue while preventing new ones.

Evidence: Verified RED to GREEN. go test ./proxy passes on stashed baseline and patched tree (3.02s). Formatter blast radius limited to api/proxy/proxy.go.

Fix verified RED->GREEN. Start() unconditionally cancels context on unable to authorize connection killing all active connections at proxy.go:286
@shoemoney
shoemoney requested a review from a team as a code owner August 26, 2026 00:01
@github-actions github-actions Bot added the api label Aug 26, 2026
@hashicorp-cla-app

hashicorp-cla-app Bot commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant