Repository navigation
Conversation
Spanner Omni instances are often deployed in local or edge environments (such as local Docker containers for development and testing) where TLS certificates are not configured. In these scenarios, clients authenticate using a username and password over an unencrypted connection. Previously, when a connection requested plaintext communication, the connection pool unconditionally stripped all credentials and failed to properly configure plaintext transport on the underlying client. This made it impossible to authenticate with local Spanner Omni instances because the credentials were discarded and token refreshes attempted to use TLS against an unencrypted endpoint. This change ensures that plaintext Spanner Omni connections retain their credentials and configure plaintext transport correctly. Connections to Cloud Spanner and the emulator continue to have their credentials stripped to prevent credential leakage over unencrypted channels.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates SpannerPool to support SpannerOmniCredentials when using plain text connections. It replaces the manual plaintext channel configuration with builder.usePlainText() and allows credentials to be retained if they are an instance of SpannerOmniCredentials. Additionally, several unit tests have been added to SpannerPoolTest to verify the creation of Spanner instances with Omni credentials under different configurations. I have no feedback to provide.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spanner Omni instances are often deployed in local or edge environments (such as local Docker containers for development and testing) where TLS certificates are not configured. In these scenarios, clients authenticate using a username and password over an unencrypted connection.
Previously, when a connection requested plaintext communication, the connection pool unconditionally stripped all credentials and failed to properly configure plaintext transport on the underlying client. This made it impossible to authenticate with local Spanner Omni instances because the credentials were discarded and token refreshes attempted to use TLS against an unencrypted endpoint.
This change ensures that plaintext Spanner Omni connections retain their credentials and configure plaintext transport correctly. Connections to Cloud Spanner and the emulator continue to have their credentials stripped to prevent credential leakage over unencrypted channels.