Skip to content

fix(auth): Fix UserCredentials serialization clientSecret leak#13465

Open
lsirac wants to merge 3 commits into
mainfrom
fix-usercredentials-sec-leak
Open

fix(auth): Fix UserCredentials serialization clientSecret leak#13465
lsirac wants to merge 3 commits into
mainfrom
fix-usercredentials-sec-leak

Conversation

@lsirac

@lsirac lsirac commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a critical security issue where the plaintext clientSecret of UserCredentials was being leaked and written to disk under the key quota_project, instead of the actual quotaProjectId under quota_project_id.

@lsirac lsirac requested review from a team as code owners June 14, 2026 18:54

@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 fixes a bug in UserCredentials.java where the quotaProjectId was incorrectly serialized as quota_project with the value of clientSecret. It is now correctly serialized as quota_project_id with the value of quotaProjectId. Additionally, the @test annotation was added to a test in DefaultCredentialsProviderTest.java, and test coverage was updated in UserCredentialsTest.java to verify that the quota project ID is correctly saved and restored. There are no review comments, and I have no additional feedback to provide.

@lsirac lsirac force-pushed the fix-usercredentials-sec-leak branch from 8a9ccdf to a1cbd31 Compare June 14, 2026 19:19
@lsirac lsirac requested a review from lqiu96 June 15, 2026 15:41
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.

3 participants