GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — fix(mtls): Fix EndpointContext's determineEndpoint logic to respect env var by andyrzhao · Pull Request #3912 · googleapis/sdk-platform-java
This repository was archived by the owner on Oct 29, 2026. It is now read-only.
Conversation
Contributor
Only attempt to create a default MtlsProvider in "determineEndpoint" if client certificate usage is enabled by the env var GOOGLE_API_USE_CLIENT_CERTIFICATE. Advisory Note: GOOGLE_API_USE_CLIENT_CERTIFICATE will default to true (if not set) in a future release, so if you do not wish to enable mTLS (such as for testing environments) please explicitly set GOOGLE_API_USE_CLIENT_CERTIFICATE to false before executing your test suite. Fixes #3911 ☕️
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
lqiu96
reviewed
Uh oh!
There was an error while loading. Please reload this page.
lqiu96
reviewed
Comment on lines
+303
to
+307
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There may be a reason for this and I've since lost the context for this. Do you remember why this is logged and not thrown back to the user? This IOException occurs when trying to create the MtlsProvider when a user enables Mtls (via Env Var).
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this warning is logged when the SDK detects the necessary mTLS config on the device, but the mTLS helper fails unexpectedly (ex. WARNING: DefaultMtlsProviderFactory encountered unexpected IOException: SecureConnect: Cert provider command failed with exit code: 139). In this case, mTLS is still disabled, the app doesn't crash, but a warning is logged because the helper command should not be failing - this reveals an underlying bug with the helper that should be fixed by the owning team. In other words, WARN if the user intends to use mTLS and it fails, and NO WARN if user never intended to use mTLS.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, in that case can the logs add some like Would there be any possible security implications where we fall back to TLS and not use mTLS without erroring out? This may be already covered/ approved, but I'm wondering if the user doesn't see this warning and assumes that they're running on mTLS when it turns out it isn't.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question - what happens is that if the user (or the workload) is under CAA-policy enforcement ("require mTLS"), they will receive an "Access Denied" error when trying to access GCP resources. I will include the message you suggested to help with debugging.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One follow up question for this. What about if the user/ workload is not under CAA-policy enforcement? Or is that going to be enabled for everyone in the future?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the user/workload is not under CAA-policy enforcement, then the requests will simply succeed even when hitting the non-mTLS endpoints.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
lqiu96
approved these changes
mpeddada1
added a commit
that referenced
this pull request
🤖 I have created a release *beep* *boop* --- <details><summary>2.62.3</summary> ## [2.62.3](v2.62.2...v2.62.3) (2025-10-02) ### Bug Fixes * **mtls:** Fix EndpointContext's determineEndpoint logic to respect env var ([#3912](#3912)) ([e5948d0](e5948d0)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Mridula <[email protected]>
lqiu96
pushed a commit
that referenced
this pull request
…nv var (#3912) Only attempt to create a default MtlsProvider in "determineEndpoint" if client certificate usage is enabled by the env var GOOGLE_API_USE_CLIENT_CERTIFICATE. Advisory Note: GOOGLE_API_USE_CLIENT_CERTIFICATE will default to true (if not set) in a future release, so if you do not wish to enable mTLS (such as for testing environments) please explicitly set GOOGLE_API_USE_CLIENT_CERTIFICATE to false before executing your test suite. Fixes #3911 ☕️
lqiu96
pushed a commit
that referenced
this pull request
🤖 I have created a release *beep* *boop* --- <details><summary>2.62.3</summary> ## [2.62.3](v2.62.2...v2.62.3) (2025-10-02) ### Bug Fixes * **mtls:** Fix EndpointContext's determineEndpoint logic to respect env var ([#3912](#3912)) ([e5948d0](e5948d0)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Mridula <[email protected]>
chingor13
pushed a commit
to googleapis/google-cloud-java
that referenced
this pull request
🤖 I have created a release *beep* *boop* --- <details><summary>2.62.3</summary> ## [2.62.3](googleapis/sdk-platform-java@v2.62.2...v2.62.3) (2025-10-02) ### Bug Fixes * **mtls:** Fix EndpointContext's determineEndpoint logic to respect env var ([#3912](googleapis/sdk-platform-java#3912)) ([16591aa](googleapis/sdk-platform-java@16591aa)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Mridula <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reviewers1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
size: s
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Availability check for mtls is always executed, even when the application wants to use plain textUh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |