Repository navigation
feat(http): support OAuth2 token request timeouts - #388
Closed
brandondomingue-cb wants to merge 1 commit into
Closed
brandondomingue-cb wants to merge 1 commit into
brandondomingue-cb wants to merge 1 commit into
Conversation
brandondomingue-cb
deleted the
review/oauth-client-credentials-timeout
branch
October 12, 2026 21:40
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.
Summary
Add an optional
token_request_timeoutduration toOAuth2ClientCredentials(tokenRequestTimeoutin JSON). Apply it to the HTTP client used by the OAuth2 client-credentials token source.A stalled token endpoint currently can block token acquisition indefinitely. This allows deployments to bound that HTTP request without changing the behavior of existing configurations.
Behavior and compatibility
InvalidArgument.http.Client.Timeout, covering connection establishment, redirects, response headers, and reading the response body, including a body that keeps trickling data.The change is limited to the HTTP client implementation, the protobuf schema and its generated Go binding, Bazel dependencies, and regression tests. No deployment configuration or credentials are included.
Validation
bazel test --nocache_test_results --test_output=all --test_arg=-test.v //pkg/http/client:client_test: 11 leaf cases covering validation, JSON configuration, omitted-timeout compatibility, and three endpoint stalls (no headers, partial body, and trickling body), followed by recovery and token reuse.bazel test --nocache_test_results --test_output=errors //pkg/http/...: both HTTP client and HTTP server test targets executed and passed.git diff --checkpassed.//pkg/proto/configuration/http/client:client_go_protowith--output_groups=go_generated_srcsand verified it against the checked-in binding.Native race validation was blocked before test execution by a local macOS SDK/linker mismatch; no race-test pass or full-repository test pass is claimed.
Generated with Toshi