feat(spanner): auth login support for Spanner Omni endpoints#13470
feat(spanner): auth login support for Spanner Omni endpoints#13470sagnghos wants to merge 3 commits into
Conversation
ed429f9 to
538b901
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces username and password authentication for Spanner Omni using the OPAQUE protocol. It adds the necessary gRPC service stubs, cryptographic utilities (including Argon2 stretching and Simplified SWU mapping), and a new SpannerOmniCredentials class to handle token refresh. Feedback on the changes highlights a security vulnerability in SpannerOmniCredentials where sensitive password bytes could remain in memory if an exception occurs during encoding. Additionally, improvements are suggested to enforce exact envelope size checks in LoginClient to avoid unhandled exceptions, and to ensure both username and password are non-empty in SpannerOmniHelper before attempting login.
d0d0b69 to
520c75b
Compare
1a20fa7 to
a4cfbf1
Compare
a4cfbf1 to
0012a2d
Compare
This PR introduces native authentication support for Spanner Omni endpoints using the OPAQUE password-authenticated key exchange protocol.
Key Changes:
Login.java,Authentication.java,LoginServiceGrpc.java) and a gRPCLoginClientto handle the authentication handshake with Omni endpoints.LoginClientutilizingOpaqueUtilto perform the secure two-step OPAQUE authentication flow over gRPC.ConnectionOptionsandSpannerOptions.Builderwith a newlogin(username, password)method to wire up Omni credentials. The channel initialization logic was moved toprepareBuilder()to ensure the builder pattern remains order-independent.To run Integration Tests with auth login run below command with default username/password
Design Document: Spanner Omni Auth Login