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

feat(transport): add an env variable to disable DirectPath #1447

Merged
merged 2 commits into from
Feb 18, 2022

Conversation

mohanli-ml
Copy link
Contributor

Add an environment variable GOOGLE_CLOUD_DISABLE_DIRECT_PATH to disable DirectPath. We expect users to use the EnableDirectPath option to control DirectPath for most cases, and this environment variable is for special cases like running both DP and GFE traffic on the same VM. As a result, only when this env variable is explicitly set to true will DirectPath be disabled.

Same PR for Java: googleapis/gax-java#1412.

@codyoss
Copy link
Member

codyoss commented Feb 17, 2022

@mohanli-ml is this a part of any AIP? I think any envvar related to auth needs to be well documented for our users. Is there a plan for this?

@mohanli-ml
Copy link
Contributor Author

@codyoss Sorry we do not have a doc.

The environment variable is not used for auth, its purpose is to provide service owners a more granular control of DirectPath. For now we use GCP project number ACL to control directPath, but we meet the situation where the same VM runs both CFE and DP probers. In this case ACL is not enough, and we need a more granular control.

Only when this environment variable be set to "true" will DirectPath be disabled, otherwise the logic is the same as current.

Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

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

LGTM, let make sure we have a documentation plan for when this becomes more publicly available.

@mohanli-ml
Copy link
Contributor Author

Sure. Could you help to merge this PR? Thanks!

@codyoss codyoss enabled auto-merge (squash) February 18, 2022 21:51
@codyoss codyoss merged commit 7bce545 into googleapis:main Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants