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: fix mtls issue in handwritten layer #226

Merged
merged 3 commits into from Oct 22, 2020
Merged

fix: fix mtls issue in handwritten layer #226

merged 3 commits into from Oct 22, 2020

Conversation

arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented Oct 21, 2020

fix #224

GAPIC client has mtls logic, which determines the api endpoint (mtls endpoint vs regular endpoint) and ssl credentials for the channel. The handwritten layer client creates its own channel, and mtls logic is completely missing. The solution is: creating a helper GAPIC client, which uses its own mtls logic to determine the mtls info (api endpoint and ssl credentials), then we can use these mtls info in the handwritten layer client initialization.
The changes are in the following 4 files:
google/cloud/pubsub_v1/publisher/client.py
google/cloud/pubsub_v1/subscriber/client.py
tests/unit/pubsub_v1/publisher/test_publisher_client.py
tests/unit/pubsub_v1/subscriber/test_subscriber_client.py

All the other files are re-generated with synthtool (they are some test/sample scripts etc).

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 21, 2020
@arithmetic1728 arithmetic1728 changed the title Mtls fix: fix mtls issue in handwritten layer Oct 21, 2020
@arithmetic1728 arithmetic1728 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 21, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 21, 2020
@arithmetic1728 arithmetic1728 marked this pull request as ready for review October 21, 2020 18:58
@arithmetic1728 arithmetic1728 requested review from a team as code owners October 21, 2020 18:58
Copy link
Contributor

@anguillanneuf anguillanneuf left a comment

Choose a reason for hiding this comment

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

Would you mind reverting the lint style changes in

  • scripts/fixup_pubsub_v1_keywords.py
  • samples/snippets/noxfile.py
  • CONTRIBUTING.rst
    As those aren't needed.

CONTRIBUTING.rst Outdated Show resolved Hide resolved
@anguillanneuf anguillanneuf self-requested a review October 21, 2020 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handwritten layer didn't handle mtls correctly
4 participants