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

storage: How to use custom domain but with pathstyle in URL signer options? #3866

Closed
challarao opened this issue Mar 26, 2021 · 4 comments
Closed
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@challarao
Copy link

In URLStyle(for signing options), there are three styles implemented currently bucketBoundHostname, pathStyle, virtualHostedStyle. I need to use custom domain but with path style bucket convention.

I tried to implement URLStyle interface, but its methods are private.

My assumption is that signed urls work no matter what the hostname is as long as the signing is done with the same host name. So it should be fundamentally legal.

How to achieve this using go SDK?

Example:
https://customdomain.com/bucket/key?signature....&other params

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 27, 2021
@codyoss codyoss changed the title How to use custom domain but with pathstyle in URL signer options? storage: How to use custom domain but with pathstyle in URL signer options? Mar 29, 2021
@codyoss codyoss added api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Mar 29, 2021
@tritone
Copy link
Contributor

tritone commented Mar 29, 2021

I looked into this and I think you're correct that this use case is supported in the GCS API; however it's not currently supported by the Go SDK. I'm following up internally to see if there's a reason why we decided not to support this while building this feature.

Can you speak a little more to your use case here? I think our assumption was that most users would use bucketBoundHostname for CNAMEs (or other hosts that would map to a single bucket).

@BenWhitehead BenWhitehead added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Jan 11, 2022
@tritone
Copy link
Contributor

tritone commented Feb 2, 2022

Since this is not currently supported in the library, I'm going to leave this open but change it to a feature request.

@tritone tritone added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: question Request for information or clarification. Not an issue. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Feb 2, 2022
@challarao
Copy link
Author

@tritone Sorry for a very late reply. But if I recall correctly, we had constraints around using bucket names as sub domains. It's a big project and we primarily use sub domains for differentiating between customers/deployments. I think wild cards were a bit of a problem.

@BrennaEpp BrennaEpp assigned BrennaEpp and unassigned tritone May 5, 2023
@BrennaEpp
Copy link
Contributor

Thanks for filing this issue! This was done in #8113. It should be in the next release: storage 1.31.0

With this release, you should be able to set Hostname on SignedURLOptions to obtain a URL using a custom domain with path style convention. Note that you don't have to do this step (ie. set Hostname) if you initialized the storage Client with option.WithEndpoint("custom-domain").

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 Cloud 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

6 participants