Skip to content

test(auth): Assert multiple scopes are space-separated in JWT claim#13474

Draft
westarle wants to merge 1 commit into
googleapis:mainfrom
westarle:fix-test-gap-jwt-scopes
Draft

test(auth): Assert multiple scopes are space-separated in JWT claim#13474
westarle wants to merge 1 commit into
googleapis:mainfrom
westarle:fix-test-gap-jwt-scopes

Conversation

@westarle

Copy link
Copy Markdown
Contributor

This commit adds a test to verify that when a Service Account is configured with multiple scopes during Self-Signed JWT authentication, the scopes are correctly serialized into a single space-separated string within the JWT's 'scope' claim.

This brings the Java library's test suite into alignment with the expected auth specification. Other Google Cloud client libraries like Go, Node.js, and Python natively assert that multiple scopes are appropriately space-separated during their JWT generation tests.

This commit adds a test to verify that when a Service Account is configured with multiple scopes during Self-Signed JWT authentication, the scopes are correctly serialized into a single space-separated string within the JWT's 'scope' claim.

This brings the Java library's test suite into alignment with the expected auth specification. Other Google Cloud client libraries like Go, Node.js, and Python natively assert that multiple scopes are appropriately space-separated during their JWT generation tests.

@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 new unit test getRequestMetadata_withMultipleScopes_selfSignedJWT to ServiceAccountCredentialsTest.java to verify that ServiceAccountCredentials correctly handles multiple scopes when configured to use JWT access with scopes. There are no review comments, and I have no additional feedback to provide.

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