Comments (3)
I think this is a bug in java code. Signing URLs with gsutil works fine:
#> gsutil cat gs://bucket_generation_signed/some.txt
Si sapis, sis apis
#> gsutil cat gs://bucket_generation_signed//some.txt
Qui ventum seminat, turbinem metet.
#> gsutil signurl -d 10m my.json gs://bucket_generation_signed/some.txt
URL HTTP Method Expiration Signed URL
gs://bucket_generation_signed/some.txt GET 2020-01-28 15:52:17 https://storage.googleapis.com/bucket_generation_signed/some.txt?x-goog-signature=...
#> gsutil signurl -d 10m my.json gs://bucket_generation_signed//some.txt
URL HTTP Method Expiration Signed URL
gs://bucket_generation_signed//some.txt GET 2020-01-28 15:52:07 https://storage.googleapis.com/bucket_generation_signed//some.txt?x-goog-signature=...
Signing URLs with java doesn't work as expected:
String bucketName = "bucket_generation_signed";
String blobName = "some.txt";
Blob blob1 = storage.get(BlobId.of(bucketName, blobName));
URL url1 = blob1.signUrl(20, TimeUnit.MINUTES, Storage.SignUrlOption.withV4Signature());
Blob blob2 = storage.get(BlobId.of(bucketName, "/" + blobName));
URL url2 = blob2.signUrl(20, TimeUnit.MINUTES, Storage.SignUrlOption.withV4Signature());
System.out.println(blob1.getName() + ": " + url1);
System.out.println(blob2.getName() + ": " + url2);
output:
some.txt: https://storage.googleapis.com/bucket_generation_signed/some.txt?X-Goog-Algorithm=...
/some.txt: https://storage.googleapis.com/bucket_generation_signed/some.txt?X-Goog-Algorithm=...
from java-storage.
Deduping against inconsistency FR (#84) that's prioritized right now.
Storage Conformance tests now include a test for this case.
from java-storage.
@frankyn FR (#84) sounds good and storage conformance tests are extremely good. One note: the current problem is reproducible with both V2 and V4, when #84 states only about V4.
from java-storage.
Related Issues (20)
- RemoteStorageHelper possibility to provide own Credentials
- samples: audit precondition comments in samples
- Handle generation numbers in BlobId#{to,from}GsUtilUri HOT 5
- test: update signed url conformance test cases HOT 3
- Improve the example of setClientEndpoint adding how to change oauth endpoint
- google-cloud-storage: auto-value is included in published version of dependencies HOT 1
- Storage: com.google.storage.v2.Bucket: getAclList() and getDefaultObjectAclList() always return empty lists HOT 4
- GCS Streaming upload does not respect host in StorageOption HOT 1
- Download an object's last n bytes HOT 2
- Search: java.net.MalformedURLException when using Blob WriteChannel HOT 3
- com.example.storage.ITBucketSnippets: testChangeDefaultStorageClass failed HOT 1
- com.example.storage.ITBucketSnippets: testDisableLifecycleManagement failed HOT 1
- com.example.storage.ITBucketSnippets: testDefaultKMSKey failed HOT 1
- com.example.storage.ITBucketSnippets: testBucketRetention failed HOT 1
- Java-Storage: GCS object larger than 129 GB not downloading to local system HOT 4
- replace usages of the word Apiary with Json
- Re-enable conformance tests for resumable uploads when testbench is fixed
- Cloud strorage v2 API, writeObject missing header x-goog-request-params for client streaming call HOT 9
- Cloud storage v2 API, add support for batch operations HOT 2
- Retrying idempotent requests that return 503 backendError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-storage.