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

Feature Request: Signed URLs for Google Cloud Storage Blobs and Buckets #2702

Closed
ChengyuanZhao opened this issue Dec 12, 2017 · 3 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

@ChengyuanZhao
Copy link

Would it be possible to add functionality to Blob and Bucket to provide signed URLs?

We were discussing this topic (spring-attic/spring-cloud-gcp#251) and it looks like the existing instructions on the dev site has users construct that URL themselves.

@vchudnov-g vchudnov-g added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Dec 13, 2017
@yihanzhen
Copy link
Contributor

yihanzhen commented Dec 13, 2017

Hi @ChengyuanZhao -

The client library does support signed URLs for Blobs, here is a sample code for your reference:

Storage storage = StorageOptions.getDefaultInstance().getService();
String bucketName = "[BUCKET_NAME]";
String blobName = "[BLOB_NAME]";
String keyPath = "[PATH_TO_KEY]";
URL signedUrl = storage.signUrl(BlobInfo.newBuilder(bucketName, blobName).build(), 
        14, TimeUnit.DAYS, SignUrlOption.signWith(ServiceAccountCredentials.fromStream(
        new FileInputStream(keyPath))));

Signed Url for Blobs is in the works along with #2629. Please stand by.

@yihanzhen
Copy link
Contributor

Move this issue to feature backlog and close it here. This place can continue to be used for discussion.

@minherz
Copy link
Contributor

minherz commented Jul 7, 2018

client library does not support it for all platforms. For example, StorageClient class for .NET does not have method SignUrl.

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

5 participants