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: S2A gRPC flow creates ComputeEngineCredentials via newBuilder. by rmehta19 · Pull Request #3651 · 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 Feb 22, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

@rockspore pointed out that the credential should be created from scratch because when using toBuilder the underlying access token is copied.

This was confirmed to be a bug with local testing which:

  • deployed a GAE app, the app performs the below two actions sequentially
  • create Google API client ( allowedHardBoundAccessTokens empty in GrpcProvider) and then ping the API, logs show the bearer token is used, obtained from making call to MDS
  • create a Google API client ( allowedHardBoundAccessTokens contains MTLS_S2A in GrpcProvider) and then ping the API, logs show the bearer token is used. A call to MDS is not made.

This is likely because the credential and channel have different lifetimes.

Sorry, something went wrong.

Uh oh!

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

All reactions
rmehta19 added 2 commits February 21, 2025 16:09
@rmehta19
create new ComputeEngineCredentials via newBuilder.
1f3cdc9
@rmehta19
set parameter values.
f26b07b
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Feb 22, 2025
@rmehta19 rmehta19 changed the title fix: create new ComputeEngineCredentials via newBuilder. grpc fix: create new ComputeEngineCredentials via newBuilder. Feb 22, 2025
rockspore
rockspore reviewed Feb 22, 2025
View reviewed changes
Comment thread gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java
ComputeEngineCredentials.BindingEnforcement bindingEnforcement) {
ComputeEngineCredentials.Builder credsBuilder =
((ComputeEngineCredentials) credentials).toBuilder();
// We only set scopes and HTTP transport factory from the original credentials because

@rockspore rockspore Feb 22, 2025 •
edited
Loading

Uh oh!

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

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.

For future readers, could you explain briefly in the comment why we create it from a newBuilder()?

Sorry, something went wrong.

Uh oh!

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

All reactions

@rmehta19 rmehta19 Feb 22, 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.

Thanks! Done.

Sorry, something went wrong.

Uh oh!

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

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

@lqiu96 lqiu96 Feb 24, 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.

Ah, yes thanks! This is an known issue in the Auth Library that we're slowly trying to fix as well and sorry to see that this also bit you all.

The existing access token will be invalidated (not copied) in the future from the builder.

Sorry, something went wrong.

Uh oh!

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

All reactions
@rmehta19
return cred.
cf27512
@product-auto-label product-auto-label Bot added size: xs Pull request size is extra small. and removed size: s Pull request size is small. labels Feb 22, 2025
@rmehta19
update comment.
dbe590f
@product-auto-label product-auto-label Bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Feb 22, 2025
@rmehta19 rmehta19 changed the title grpc fix: create new ComputeEngineCredentials via newBuilder. grpc: create new ComputeEngineCredentials via newBuilder. Feb 22, 2025
@rmehta19

rmehta19 commented Feb 22, 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.

lqiu96
lqiu96 approved these changes Feb 24, 2025
View reviewed changes
@lqiu96

lqiu96 commented Feb 24, 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 commented Feb 24, 2025

Copy link
Copy Markdown
Member

Oh, can you also rename the title to follow conventional commits?

fix: S2A gRPC flow creates ComputeEngineCredentials via newBuilder.

or some similar

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 changed the title grpc: create new ComputeEngineCredentials via newBuilder. fix: S2A gRPC flow creates ComputeEngineCredentials via newBuilder. Feb 24, 2025
@rmehta19
Merge branch 'main' into build-new-cred
18f2ac6
@rmehta19

rmehta19 commented Feb 24, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @lqiu96 . I also updated the branch with upstream main, I think you will have to rerun gcbrun?

All reactions

Sorry, something went wrong.

Uh oh!

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

@lqiu96

lqiu96 commented Feb 24, 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 enabled auto-merge (squash) February 24, 2025 21:57
@lqiu96
lqiu96 merged commit 29c061e into googleapis:main Feb 24, 2025
@release-please release-please Bot mentioned this pull request Feb 24, 2025
chore(main): release 2.54.0 #3636
Merged
@rockspore rockspore mentioned this pull request Feb 25, 2025
feat: enable ALTS hard bound token in DirectPath googleapis/java-spanner#3645
Merged
JoeWang1127 added a commit that referenced this pull request Feb 25, 2025
@release-please @JoeWang1127
chore(main): release 2.54.0 (#3636)
3319c71
🤖 I have created a release *beep* *boop*
---


<details><summary>2.54.0</summary>

##
[2.54.0](v2.53.0...v2.54.0)
(2025-02-25)


### Features

* add client side logging with slf4j
([#3403](#3403))
([fe002fa](fe002fa))


### Bug Fixes

* S2A gRPC flow creates ComputeEngineCredentials via newBuilder.
([#3651](#3651))
([29c061e](29c061e))


### Dependencies

* update dependency ch.qos.logback:logback-core to v1.3.15 [security]
([#3654](#3654))
([093d867](093d867))
* update google api dependencies
([#3631](#3631))
([48db2a1](48db2a1))
* update google auth library dependencies to v1.33.1
([#3656](#3656))
([f7877a5](f7877a5))
* update google http client dependencies to v1.46.3
([#3657](#3657))
([9d5b3b5](9d5b3b5))
* update grpc to 1.70.0
([#3641](#3641))
([ad26cf9](ad26cf9))
* update grpc to 1.70.0 (missed update)
([#3658](#3658))
([6ca0599](6ca0599))
* Update opentelemetry-semconv to v1.29.0-alpha
([#3635](#3635))
([49ac09d](49ac09d))


### Documentation

* update showcase readme
([#3659](#3659))
([0ddf073](0ddf073))
</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: Joe Wang <[email protected]>
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Mar 12, 2025
@github-cash-renovate-jvm-2 @svc-squareup-copybara
This PR contains the following updates:
6e98206
| 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.53.0` -> `2.54.0` |
|
[com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.52.0` -> `2.53.0` |
|
[com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.52.0` -> `2.53.0` |
| [com.google.api:gax](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.62.0` -> `2.63.0` |
|
[com.autonomousapps.dependency-analysis](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin)
| plugin | misk/gradle/libs.versions.toml | gradle | minor | `2.10.1` ->
`2.11.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.37` -> `2.30.38` |

---

### Release Notes

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

###
[`v2.54.0`](https://github.com/googleapis/sdk-platform-java/blob/HEAD/CHANGELOG.md#2540-2025-02-25)

##### Features

- add client side logging with slf4j
([#&#8203;3403](googleapis/sdk-platform-java#3403))
([fe002fa](googleapis/sdk-platform-java@fe002fa))

##### Bug Fixes

- S2A gRPC flow creates ComputeEngineCredentials via newBuilder.
([#&#8203;3651](googleapis/sdk-platform-java#3651))
([29c061e](googleapis/sdk-platform-java@29c061e))

##### Dependencies

- update dependency ch.qos.logback:logback-core to v1.3.15 \[security]
([#&#8203;3654](googleapis/sdk-platform-java#3654))
([093d867](googleapis/sdk-platform-java@093d867))
- update google api dependencies
([#&#8203;3631](googleapis/sdk-platform-java#3631))
([48db2a1](googleapis/sdk-platform-java@48db2a1))
- update google auth library dependencies to v1.33.1
([#&#8203;3656](googleapis/sdk-platform-java#3656))
([f7877a5](googleapis/sdk-platform-java@f7877a5))
- update google http client dependencies to v1.46.3
([#&#8203;3657](googleapis/sdk-platform-java#3657))
([9d5b3b5](googleapis/sdk-platform-java@9d5b3b5))
- update grpc to 1.70.0
([#&#8203;3641](googleapis/sdk-platform-java#3641))
([ad26cf9](googleapis/sdk-platform-java@ad26cf9))
- update grpc to 1.70.0 (missed update)
([#&#8203;3658](googleapis/sdk-platform-java#3658))
([6ca0599](googleapis/sdk-platform-java@6ca0599))
- Update opentelemetry-semconv to v1.29.0-alpha
([#&#8203;3635](googleapis/sdk-platform-java#3635))
([49ac09d](googleapis/sdk-platform-java@49ac09d))

##### Documentation

- update showcase readme
([#&#8203;3659](googleapis/sdk-platform-java#3659))
([0ddf073](googleapis/sdk-platform-java@0ddf073))

</details>

<details>
<summary>autonomousapps/dependency-analysis-android-gradle-plugin
(com.autonomousapps.dependency-analysis)</summary>

###
[`v2.11.0`](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/blob/HEAD/CHANGELOG.md#Version-2110)

- \[Feat]: new task (`:computeAllDependencies`) for producing a version
catalog file containing all dependencies.
-   \[Fix]: kotlin-reflect must be on the compile classpath.
-   \[Test]: Update AGP 8.9.0 stable.
-   \[Test]: conditional signing.

</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**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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: c7d38837c081de3bba13d5d7f2d42008ba98f440
@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 @JoeWang1127
chore(main): release 2.54.0 (#3636)
1261e99
🤖 I have created a release *beep* *boop*
---


<details><summary>2.54.0</summary>

##
[2.54.0](googleapis/sdk-platform-java@v2.53.0...v2.54.0)
(2025-02-25)


### Features

* add client side logging with slf4j
([#3403](googleapis/sdk-platform-java#3403))
([da8ed28](googleapis/sdk-platform-java@da8ed28))


### Bug Fixes

* S2A gRPC flow creates ComputeEngineCredentials via newBuilder.
([#3651](googleapis/sdk-platform-java#3651))
([e97b8bd](googleapis/sdk-platform-java@e97b8bd))


### Dependencies

* update dependency ch.qos.logback:logback-core to v1.3.15 [security]
([#3654](googleapis/sdk-platform-java#3654))
([79a248e](googleapis/sdk-platform-java@79a248e))
* update google api dependencies
([#3631](googleapis/sdk-platform-java#3631))
([f0d09aa](googleapis/sdk-platform-java@f0d09aa))
* update google auth library dependencies to v1.33.1
([#3656](googleapis/sdk-platform-java#3656))
([f48ee03](googleapis/sdk-platform-java@f48ee03))
* update google http client dependencies to v1.46.3
([#3657](googleapis/sdk-platform-java#3657))
([79b7ba6](googleapis/sdk-platform-java@79b7ba6))
* update grpc to 1.70.0
([#3641](googleapis/sdk-platform-java#3641))
([945bd47](googleapis/sdk-platform-java@945bd47))
* update grpc to 1.70.0 (missed update)
([#3658](googleapis/sdk-platform-java#3658))
([41fed1b](googleapis/sdk-platform-java@41fed1b))
* Update opentelemetry-semconv to v1.29.0-alpha
([#3635](googleapis/sdk-platform-java#3635))
([9297f92](googleapis/sdk-platform-java@9297f92))


### Documentation

* update showcase readme
([#3659](googleapis/sdk-platform-java#3659))
([f4b913e](googleapis/sdk-platform-java@f4b913e))
</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: Joe Wang <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@rockspore rockspore rockspore left review comments
@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: s Pull request size is small.

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.

3 participants

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