googleapis / googleapis/google-cloud-java
[sdk-platform-java] DirectPath should only use the TLS endpoint
- 主要语言
- Java
- 星标
- 2.1k
- 派生
- 1.2k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 157
描述
DirectPath channel [creation logic](https://github.com/googleapis/sdk-platform-java/blob/4aaea1ec89737ea150acb918584a234fcf426810/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java#L630-L638) 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](https://github.com/googleapis/sdk-platform-java/blob/4aaea1ec89737ea150acb918584a234fcf426810/gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java#L351-L373).
(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
贡献指南
调研方向
先从链接行中的 gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java 的 DirectPath 通道创建逻辑开始,然后阅读链接行中的 gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java 的端点解析逻辑。跟踪 DirectPath、S2A、TLS 和 mTLS 选项之间的交互,并根据 issue 中列出的四种端点选择情况确认完成情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- networking, security
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100