Skip to content

feat(auth): Skip RAB lookup if MDS returns a non-email.#8440

Open
vverman wants to merge 4 commits into
googleapis:regional-access-boundariesfrom
vverman:rab-skip-lookup-non-email-mds
Open

feat(auth): Skip RAB lookup if MDS returns a non-email.#8440
vverman wants to merge 4 commits into
googleapis:regional-access-boundariesfrom
vverman:rab-skip-lookup-non-email-mds

Conversation

@vverman
Copy link
Copy Markdown
Contributor

@vverman vverman commented Jun 4, 2026

In computeclient.ts, the resolveServiceAccountEmail function could return a non-email.

In such cases, we skip RAB lookup, log the skip once for user and avoid making any future MDS calls.

Added tests for this.

@vverman vverman requested a review from a team as a code owner June 4, 2026 02:29
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 updates the getRegionalAccessBoundaryUrl method in the Compute client to validate the format of the service account email, returning null if it is invalid or missing. It also adds comprehensive unit tests to verify this behavior. The feedback suggests moving the regular expression definition to a module-level constant to avoid recreating it on every function call, which improves performance.

Comment thread core/packages/google-auth-library-nodejs/src/auth/computeclient.ts
@vverman vverman requested review from feywind and nbayati June 4, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant