Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move to using insecure grpc channels with emulator #402

Merged
merged 13 commits into from Jul 22, 2021
8 changes: 2 additions & 6 deletions google/cloud/firestore_v1/base_client.py
Expand Up @@ -178,13 +178,9 @@ def _emulator_channel(self, transport):
# "transport.create_channel" to create gRPC channels once google-auth
# extends it's allowed credentials types.
if "GrpcAsyncIOTransport" in str(transport.__name__):
return grpc.aio.secure_channel(
self._emulator_host, self._local_composite_credentials()
)
return grpc.aio.insecure_channel(self._emulator_host)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we possibly have our cake and eat it too by introducing another environment variable for these custom credentials?

else:
return grpc.secure_channel(
self._emulator_host, self._local_composite_credentials()
)
return grpc.insecure_channel(self._emulator_host)

def _local_composite_credentials(self):
"""
Expand Down