Skip to content

fix(auth): add ES256 length validation - #20949

Merged
shollyman merged 1 commit into
googleapis:mainfrom
shollyman:idtoken-validation
Nov 22, 2026
Merged

shollyman merged 1 commit into
googleapis:mainfrom
shollyman:idtoken-validation

Conversation

@shollyman

Copy link
Copy Markdown
Contributor

This PR propagates similar length validation from googleapis/google-api-go-client#3668 into the corresponding package in google-cloud-go.

This PR mostly propagates similar length validation from
googleapis/google-api-go-client#3668 into the
corresponding package in google-cloud-go
@shollyman
shollyman marked this pull request as ready for review November 21, 2026 02:23
@shollyman
shollyman requested review from a team as code owners November 21, 2026 02:23

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

Copy link
Copy Markdown
Contributor

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 adds a validation check to ensure that ES256 signatures have the correct length of exactly twice the es256KeySize before parsing, preventing potential out-of-bounds errors. Additionally, it introduces a new test function TestValidateES256Length to verify this validation logic and refactors createES256JWT to use FillBytes for cleaner signature generation. There are no review comments, and I have no feedback to provide.

Comment thread auth/credentials/idtoken/validate.go Resolved
@shollyman
shollyman merged commit 35958cc into googleapis:main Nov 22, 2026
17 checks passed
@release-please release-please Bot mentioned this pull request Nov 22, 2026
shollyman pushed a commit that referenced this pull request Nov 25, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>auth: 0.24.5</summary>

##
[0.24.5](auth/v0.24.4...auth/v0.24.5)
(2026-11-25)


### Bug Fixes

* **auth/credentials/downscope:** Update universe resolution
([#20967](#20967))
([16e0475](16e0475))
* **auth:** Add ES256 length validation
([#20949](#20949))
([35958cc](35958cc))
* **auth:** Improve directpath resolution
([#21004](#21004))
([ceeb6a1](ceeb6a1))
</details>

<details><summary>bigquery: 1.86.4</summary>

##
[1.86.4](bigquery/v1.86.3...bigquery/v1.86.4)
(2026-11-25)


### Bug Fixes

* **bigquery/storage/managedwriter:** Address panic on client close
([#20932](#20932))
([7a5e14f](7a5e14f))
</details>

<details><summary>profiler: 0.7.2</summary>

##
[0.7.2](profiler/v0.7.1...profiler/v0.7.2)
(2026-11-25)


### Bug Fixes

* **profiler:** Universe resolution improvements
([#20991](#20991))
([5cec789](5cec789))
</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 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.

2 participants