GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: plumb mtls endpoint to TransportChannelProvider by rmehta19 · Pull Request #3673 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Conversation

@rmehta19

@rmehta19 rmehta19 commented Mar 4, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR plumbs the MTLS endpoint (separately from the resolved endpoint) from the EndpointContext to the InstantiatingGrpcChannelProvider.

Why not just set the MTLS endpoint in EndpointContext if S2A can be used?

  • Although we can decide whether or not to try to use S2A in EndpointContext, we could fail to use S2A in InstantiatingGrpcChannelProvider (if autoconfig doesn't return an address), in which case we fall back to using a TLS connection
  • DirectPath supersedes S2A in InstantiatingGrpcChannelProvider, and the decision to use DirectPath is made in InstantiatingGrpcChannelProvider, not EndpointContext. We may decide to use S2A in EndpointContext, but when we go to create the channel in InstantiatingGrpcChannelProvider, we may find that we should be using DirectPath, in which case we need to use the non-MTLS endpoint

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rmehta19
plumb mtls endpoint separately.
f0c638d
@product-auto-label product-auto-label Bot added the size: m Pull request size is medium. label Mar 4, 2025
@rmehta19
remove comment.
70153f7
rmehta19
rmehta19 commented Mar 4, 2025
View reviewed changes
Comment thread gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rmehta19
move withUseS2A above needsMtlsEndpoint check.
59f3bf7
@rmehta19

rmehta19 commented Mar 4, 2025

Copy link
Copy Markdown
Contributor Author

@lqiu96 , please review, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rmehta19
add interface additions to clirr-ignored-diffeences.
716c9ee
@rmehta19 rmehta19 changed the title feat: plumb mtls endpoint to TransportChannelProvider fix: plumb mtls endpoint to TransportChannelProvider Mar 4, 2025
@rmehta19
Merge branch 'main' into plumb-mtls-endpoint
ac95145
@rmehta19

rmehta19 commented Mar 7, 2025

Copy link
Copy Markdown
Contributor Author

Friendly ping @lqiu96 . Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lqiu96
lqiu96 reviewed Mar 11, 2025
View reviewed changes
Comment thread gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java
Comment on lines +291 to +295
@Override
public TransportChannelProvider withMtlsEndpoint(String mtlsEndpoint) {
validateEndpoint(mtlsEndpoint);
return toBuilder().setMtlsEndpoint(mtlsEndpoint).build();
}

@lqiu96 lqiu96 Mar 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be able to add @InternalApi to all the new public methods? We have a few ways to configure endpoints (i.e. ClientSettings and TransportChannelProvider for endpoint and led us to have to account for it in EndpointContext). If we add these ways for users to configure the mtls value, I think we'll need to account for it in EndpointContext as well.

Given that we can't make this package-private scope, we should let users know that they really shouldn't be tinkering with these values since they're really used to help S2A (one flow for now).

I think a small note in the comment (for this method and all the other public ones) as well warning users This public method is used by Gax to help configure S2A fallback and not intended for users or something of that variant.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rmehta19 rmehta19 Mar 11, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7e36d1a. Would you prefer making the change in EndpointContext in this PR, or a follow up?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lqiu96 lqiu96 Mar 12, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thoughts are that we just leave EndpointContext as-is since we have publicly noted that these public methods have been marked with @InternalApi and shouldn't be set/customized by the user at all. If users do set these values via these new methods, they shouldn't expect support (as this is used to help to support S2A).

The existing way of setting the mtlsEndpoint in StubSettings is supported

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rmehta19 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
lqiu96
lqiu96 reviewed Mar 11, 2025
View reviewed changes
Comment thread gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

rmehta19 added 3 commits March 11, 2025 11:12
@rmehta19
Merge branch 'main' into plumb-mtls-endpoint
812799b
@rmehta19
mark new public APIs as internal-only.
7e36d1a
@rmehta19
comment on why we use MTLS endpoint with S2A.
2afdbbc
@rmehta19

rmehta19 commented Mar 11, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the review @lqiu96 !

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rmehta19
Merge branch 'main' into plumb-mtls-endpoint
1d1e8ef
@lqiu96

lqiu96 commented Mar 12, 2025

Copy link
Copy Markdown
Member

@rmehta19 FYI I think there are lint issues and you need to run mvn fmt:format

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rmehta19 added 2 commits March 12, 2025 09:16
@rmehta19
resolve merge conflict.
50c04b0
@rmehta19
format.
92e07fe
@rmehta19

rmehta19 commented Mar 12, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Thanks @lqiu96 ! synced to HEAD and formatted.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lqiu96

lqiu96 commented Mar 12, 2025

Copy link
Copy Markdown
Member

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rmehta19
Merge branch 'main' into plumb-mtls-endpoint
c53c20e
@rmehta19

rmehta19 commented Mar 12, 2025

Copy link
Copy Markdown
Contributor Author

@lqiu96 , resolved merge conflict, could you run gcbrun again? Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lqiu96

lqiu96 commented Mar 12, 2025

Copy link
Copy Markdown
Member

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lqiu96
lqiu96 approved these changes Mar 12, 2025
View reviewed changes

@lqiu96 lqiu96 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This follows the approach that we had discussed in the previous S2A PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rmehta19 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@rmehta19

rmehta19 commented Mar 12, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @lqiu96 ! I see all the checks have passed, would you be able to merge once you get a chance?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lqiu96
lqiu96 requested a review from blakeli0 March 12, 2025 21:29
@lqiu96

lqiu96 commented Mar 12, 2025

Copy link
Copy Markdown
Member

Adding @blakeli0 to take a quick glance as well in case there is anything missed.

rmehta19 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rmehta19

rmehta19 commented Mar 17, 2025

Copy link
Copy Markdown
Contributor Author

friendly ping, @blakeli0. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blakeli0
blakeli0 reviewed Mar 18, 2025
View reviewed changes
Comment thread gax-java/gax/src/main/java/com/google/api/gax/rpc/TransportChannelProvider.java
TransportChannelProvider withEndpoint(String endpoint);

/** True for gRPC transport provider which has no mtlsEndpoint set. */
default boolean needsMtlsEndpoint() {

@blakeli0 blakeli0 Mar 18, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we tried to avoid introducing these new public interfaces by encapsulating the logic to determine if we should use S2A in EndpointContext. Now that we need to have access to mtlsEndpoint in TransportChannelProvider anyway, maybe we can move shouldUseS2A to InstantiatingGrpcChannelProvider.java? And remove withUseS2A from this interface? This could be separate PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rmehta19 rmehta19 Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that by plumbing the MTLS endpoint separately, we no longer need the shouldUseS2A logic in EndpointContext. I'll take care of this in a followup PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rmehta19 rmehta19 Mar 19, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blakeli0 I started working on this and I realized that we should keep shouldUseS2A in EndpointContext. The reason being is that we want to skip S2A if using GDCH, or if the client sets a custom endpoint. This info is only available in EndpointContext.

Given this, we probably want to keep things as is. WDYT?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Mar 19, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the client sets a custom endpoint

I see, yeah I think this info only exists in EndpointContext. cc: @lqiu96 in case there are more ideas.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rmehta19

rmehta19 commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing @blakeli0 !

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blakeli0
blakeli0 approved these changes Mar 19, 2025
View reviewed changes
@blakeli0
blakeli0 merged commit a961459 into googleapis:main Mar 19, 2025
@release-please release-please Bot mentioned this pull request Mar 19, 2025
chore(main): release 2.56.0 #3715
Merged
diegomarquezp pushed a commit that referenced this pull request Apr 18, 2025
@release-please
chore(main): release 2.56.0 (#3715)
e303ead
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](#3730))
([64ac2c1](64ac2c1))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](#3743))
([29a78d3](29a78d3))
* plumb mtls endpoint to TransportChannelProvider
([#3673](#3673))
([a961459](a961459))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](#3722))
([b1b075d](b1b075d))
</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>
@suztomo

suztomo commented Apr 18, 2025

Copy link
Copy Markdown
Member

@rmehta19 There may be test failures related to this. Can you check? googleapis/java-bigtable#2560 (comment)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request May 6, 2025
@github-cash-renovate-jvm-2 @svc-squareup-copybara
This PR contains the following updates:
738ccb1
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.api.grpc:proto-google-common-protos](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.55.3` -> `2.56.0` |
|
[com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.54.3` -> `2.55.0` |
|
[com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.54.3` -> `2.55.0` |
| [com.google.api:gax](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.64.3` -> `2.65.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |

---

### Release Notes

<details>
<summary>googleapis/sdk-platform-java
(com.google.api.grpc:proto-google-common-protos)</summary>

###
[`v2.56.0`](https://github.com/googleapis/sdk-platform-java/blob/HEAD/CHANGELOG.md#2560-2025-04-18)

##### Features

- Selective gapic generation phase II
([#&#8203;3730](googleapis/sdk-platform-java#3730))
([64ac2c1](googleapis/sdk-platform-java@64ac2c1))

##### Bug Fixes

- **hermetic-build:** use correct image name in templated graalvm jobs
([#&#8203;3743](googleapis/sdk-platform-java#3743))
([29a78d3](googleapis/sdk-platform-java@29a78d3))
- plumb mtls endpoint to TransportChannelProvider
([#&#8203;3673](googleapis/sdk-platform-java#3673))
([a961459](googleapis/sdk-platform-java@a961459))

##### Dependencies

- add opentelemetry gcp-resources to shared deps
([#&#8203;3722](googleapis/sdk-platform-java#3722))
([b1b075d](googleapis/sdk-platform-java@b1b075d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 1a1f0ef96fb9d22ffd1976f1eea8999c165d6c37
@rmehta19 rmehta19 mentioned this pull request May 28, 2025
fix: S2A- Check if a default endpoint has been set #3784
Merged
lqiu96 pushed a commit that referenced this pull request Jun 10, 2025
@release-please @lqiu96
chore(main): release 2.56.0 (#3715)
a60c8c2
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](#3730))
([64ac2c1](64ac2c1))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](#3743))
([29a78d3](29a78d3))
* plumb mtls endpoint to TransportChannelProvider
([#3673](#3673))
([a961459](a961459))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](#3722))
([b1b075d](b1b075d))
</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>
lqiu96 pushed a commit that referenced this pull request Aug 21, 2025
@release-please @lqiu96
chore(main): release 2.56.0 (#3715)
f14e0f4
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](#3730))
([64ac2c1](64ac2c1))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](#3743))
([29a78d3](29a78d3))
* plumb mtls endpoint to TransportChannelProvider
([#3673](#3673))
([a961459](a961459))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](#3722))
([b1b075d](b1b075d))
</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>
@suztomo suztomo mentioned this pull request Nov 5, 2025
chore(2.59.x): release 2.59.3 #3982
Merged
@release-please release-please Bot mentioned this pull request Dec 11, 2025
chore(protobuf-4.x-rc): release 2.65.0-rc1 #3999
Merged
chingor13 pushed a commit to googleapis/google-cloud-java that referenced this pull request Mar 24, 2026
@release-please
chore(main): release 2.56.0 (#3715)
741d398
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](googleapis/sdk-platform-java@v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](googleapis/sdk-platform-java#3730))
([d4bafa0](googleapis/sdk-platform-java@d4bafa0))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](googleapis/sdk-platform-java#3743))
([c71223d](googleapis/sdk-platform-java@c71223d))
* plumb mtls endpoint to TransportChannelProvider
([#3673](googleapis/sdk-platform-java#3673))
([d7daf89](googleapis/sdk-platform-java@d7daf89))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](googleapis/sdk-platform-java#3722))
([4b94c7d](googleapis/sdk-platform-java@4b94c7d))
</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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@blakeli0 blakeli0 blakeli0 approved these changes
@lqiu96 lqiu96 lqiu96 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size: m Pull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@rmehta19 @lqiu96 @suztomo @blakeli0
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.