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 — feat: port GDCH credentials support to Node.js Auth SDK by macastelaz · Pull Request #8301 · googleapis/google-cloud-node

Conversation

@macastelaz

@macastelaz macastelaz commented May 18, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Add support for GDCH Credentials to the Node.js Auth SDK

Manually tested - details in go/node-js-gdch-manual-test

Fixes #8289

Sorry, something went wrong.

Uh oh!

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

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@macastelaz
feat: port GDCH credentials support to Node.js Auth SDK
476f16a
gemini-code-assist[bot]
gemini-code-assist Bot reviewed May 18, 2026
View reviewed changes

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces the GdchClient to support Google Distributed Cloud Hosted (GDCH) credentials, including token exchange logic using JWT assertions and integration into the GoogleAuth class. Feedback focuses on optimizing performance by using asynchronous file operations for CA certificates and replacing new Date().getTime() with Date.now() for consistency.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

macastelaz added 3 commits May 20, 2026 08:46
@macastelaz
Make small adjustments to address gemini feedback, focusing on four t…
c5121cb
…opics. 1) Async CA file reading 2) Token response validation 3) Option synchronization and 4) Expanded unit test coverage.
@macastelaz
Fix several issues in the original implementation, identified during …
d3c4af0
…manual testing in a GDCH environment. These fixes include: 1) Correcting the type of the credential being parsed from 'gdch_credentials' to 'gdch_service_account' which is the type generated in the SA file. 2)Changing the audience property in token exchange to get the STS-Bearer instead of just Bearer token. 3) Override the requestAsync method to ensure client operations automatically read and trust custom CA certificate files specificied in the credentials json 'ca_cert_path'. 4) Fixed unit test oversight of incorrect call to nockScope.restore().
@macastelaz
Merge branch 'main' into gdch-credentials
e8080d8
@macastelaz macastelaz assigned lsirac May 22, 2026
@macastelaz
macastelaz marked this pull request as ready for review May 22, 2026 04:31
@macastelaz
macastelaz requested a review from a team as a code owner May 22, 2026 04:31
macastelaz and others added 2 commits May 21, 2026 23:36
@macastelaz @gemini-code-assist
Update core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts
a8f70af
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@macastelaz
perf(auth): cache GDCH CA cert agent to avoid redundant file reads
b2e7e41
jerrylin3321
jerrylin3321 reviewed May 24, 2026
View reviewed changes
Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

@macastelaz
Use base64urldirectly instead of doing multiple replaces to account f…
781ac2d
…or url handling. This addresses PR feedback.
@macastelaz
macastelaz force-pushed the gdch-credentials branch from 507d8f1 to 781ac2d Compare May 26, 2026 15:04
@macastelaz macastelaz assigned pearigee May 27, 2026
@pearigee
Merge branch 'main' into gdch-credentials
30169d0
@pearigee pearigee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 27, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 27, 2026
pearigee
pearigee approved these changes May 27, 2026
View reviewed changes
Comment thread core/packages/google-auth-library-nodejs/test/test.gdchclient.ts Resolved

Uh oh!

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

@macastelaz
test(auth): break up large gdch client test into smaller targeted tests
7dfe5ae
lsirac
lsirac reviewed May 28, 2026
View reviewed changes
Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/index.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/googleauth.ts Resolved

Uh oh!

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

macastelaz added 3 commits May 28, 2026 16:04
@macastelaz
feat(auth): address PR 8301 review comments for GDCH client
81be49f
@macastelaz
feat(auth): conditionally inject CA cert agent into requestAsync for …
a91f687
…private GDCH endpoints
@macastelaz
feat(auth): implement private key/token redaction and STS token reque…
d885a6e
…st timeout/retry on GdchClient
lsirac
lsirac requested changes Jun 1, 2026
View reviewed changes
Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

Comment thread core/packages/google-auth-library-nodejs/src/auth/gdchclient.ts Resolved

Uh oh!

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

@macastelaz
feat(auth): address review comments regarding nested secret redaction…
dd54865
… and required token expiration on GdchClient
lsirac
lsirac approved these changes Jun 1, 2026
View reviewed changes
@macastelaz
macastelaz merged commit 75f148c into main Jun 1, 2026
18 checks passed

Uh oh!

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

@macastelaz
macastelaz deleted the gdch-credentials branch June 1, 2026 21:57
This was referenced Jun 3, 2026
chore(main): release google-auth-library 10.7.0 #8428
Merged
chore(main): release google-auth-library 10.8.0 #8486
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Jun 18, 2026
@release-please
chore(main): release google-auth-library 10.8.0 (#8486)
c66b89e
🤖 I have created a release *beep* *boop*
---


## [10.8.0](https://togithub.com/googleapis/google-cloud-node/compare/google-auth-library-v10.7.0...google-auth-library-v10.8.0) (2026-06-18)


### Features

* Port GDCH credentials support to Node.js Auth SDK ([#8301](https://togithub.com/googleapis/google-cloud-node/issues/8301)) ([75f148c](https://togithub.com/googleapis/google-cloud-node/commit/75f148ca83618193c884e139ff8ed76e28854d2d))


### Bug Fixes

* Bump all node submodules ([#8178](https://togithub.com/googleapis/google-cloud-node/issues/8178)) ([9fd76ef](https://togithub.com/googleapis/google-cloud-node/commit/9fd76eff87b1cf02db6205f141449b31e8ab7d8f))
* Change the copyright year for files in the packages folder ([#8109](https://togithub.com/googleapis/google-cloud-node/issues/8109)) ([c1a03fe](https://togithub.com/googleapis/google-cloud-node/commit/c1a03fe604662091be283055c7d34052c64d6334))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
@jerrylin3321 jerrylin3321 mentioned this pull request Jun 21, 2026
fix: strip trailing slashes from automatic GDCH audience #8692
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lsirac lsirac lsirac approved these changes
+3 more reviewers
@jerrylin3321 jerrylin3321 jerrylin3321 left review comments
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
@pearigee pearigee pearigee approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@lsirac lsirac

@pearigee pearigee

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

auth: Add support for Google Distributed Cloud service identity authentication

Uh oh!

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

5 participants

@macastelaz @lsirac @jerrylin3321 @pearigee @yoshi-kokoro
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.