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

Allow to create presigned URLs using HMAC keys #2560

Open
ksafonov-db opened this issue May 23, 2024 · 1 comment
Open

Allow to create presigned URLs using HMAC keys #2560

ksafonov-db opened this issue May 23, 2024 · 1 comment
Labels
api: storage Issues related to the googleapis/java-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@ksafonov-db
Copy link

ksafonov-db commented May 23, 2024

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.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label May 23, 2024
@BenWhitehead BenWhitehead added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jun 4, 2024
@BenWhitehead
Copy link
Collaborator

Thank you for the Feature Request, I'll add it to our backlog. I'm not super familiar with what differences this would require in the client so I'm not able to provide an estimate on when we might be able to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants