-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: support mtls env variables #589
Conversation
Codecov Report
@@ Coverage Diff @@
## master #589 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 1519 1519
Branches 309 309
=========================================
Hits 1519 1519 Continue to review full report at Codecov.
|
@software-dov @busunkim96 Please take a look at this PR when you have time. Since it has a breaking change, it is nice to have client libs not yet converted to pick up this change as early as possible. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. There are a few things I want to discuss before approving.
Implement the two mtls env variables mentioned in https://google.aip.dev/auth/4114
New behavior summary:
(1) GOOGLE_API_USE_CLIENT_CERTIFICATE env variable:
Values:
"true": use client cert if exists
"false" (default): never use client cert, even if it exists or it is explicitly provided by user
(2) GOOGLE_API_USE_MTLS_ENDPOINT env variable:
Values:
"never": use regular endpoint
"always": use mtls endpoint
"auto" (default): auto switch to mtls endpoint, if client cert exists and we are allowed to use it (controlled by GOOGLE_API_USE_CLIENT_CERTIFICATE)