gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

DirectPath should only use the TLS endpoint

Open lqiu96 opened this issue 10 months ago • 0 comments

DirectPath channel creation logic should in invoked using the TLS endpoint.

Right now, DirectPath uses the endpoint that is returned back from EndpointContext and this may be resolved to be either the TLS or mTLS endpoint based on user configuration.

(Stretch) EndpointContext should be able to determine if DirectPath is enabled before resolving the endpoint. This would help both S2A and DirectPath to use the correct endpoint:

Logic should be

  • If DirectPath enabled and S2A enabled: DirectPath with TLS
  • If DirectPath enabled and S2A disabled: DirectPath with TLS
  • If DirectPath disabled and S2A enabled: S2A with mTLS
  • If DirectPath disabled and S2A disabled: Default flow with TLS

lqiu96 avatar Mar 12 '25 21:03 lqiu96