googleapis / googleapis/google-cloud-java

[java-storage] Allow to create presigned URLs using HMAC keys

未关闭
#12,638 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api: storage type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
157

描述

**Is your feature request related to a problem? Please describe.**
Currently `com.google.cloud.storage.StorageImpl` class allows to create a presigned URL using RSA algorithm. One can pass their own `ServiceAccountSigner` implementation (via `StorageOptions.setCredentials()`) but the algorithm name literal is deeply hard-coded as `GOOG4-RSA-SHA256` (also in `com.google.cloud.storage.SignatureInfo`). It's not possible to efficiently reuse current code to sign URL via HMAC keys (https://cloud.google.com/storage/docs/authentication/signatures#signing-process).

**Describe the solution you'd like**
Allow to pass an algorithm via `StorageOptions`.

**Describe alternatives you've considered**
The only solution I see is to copy/fork all the code. Reflection seems to be too fragile.

贡献指南

打开贡献指南

调研方向

首先阅读 com.google.cloud.storage.StorageImpl 和 com.google.cloud.storage.SignatureInfo,重点关注选择 GOOG4-RSA-SHA256 算法的位置,以及 StorageOptions 如何提供凭据。当调用方可以通过 StorageOptions 配置签名算法,并使用 HMAC 密钥创建预签名 URL,而无需复制或 fork 现有代码时,这项工作就完成了。

由索引模型根据 Issue 内容生成。

评估

技术栈
gcp, java
领域
cloud, security
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。