mirror of https://github.com/apache/jclouds.git
Disable timed temporary signed URLs for AWS-S3
This functionality uncovered subtleties in URL parameter encoding which result in random failures integration tests. References JCLOUDS-200.
This commit is contained in:
parent
435103eb35
commit
bc0abbaa07
|
@ -72,17 +72,14 @@ public class AWSS3BlobRequestSigner extends S3BlobRequestSigner<AWSS3AsyncClient
|
|||
public HttpRequest signGetBlob(String container, String name, long timeInSeconds) {
|
||||
checkNotNull(container, "container");
|
||||
checkNotNull(name, "name");
|
||||
HttpRequest request = processor.apply(Invocation.create(getMethod, ImmutableList.<Object> of(container, name)));
|
||||
return cleanRequest(signForTemporaryAccess(request, timeInSeconds));
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequest signPutBlob(String container, Blob blob, long timeInSeconds) {
|
||||
checkNotNull(container, "container");
|
||||
checkNotNull(blob, "blob");
|
||||
HttpRequest request = processor.apply(Invocation.create(createMethod,
|
||||
ImmutableList.<Object>of(container, blobToObject.apply(blob))));
|
||||
return cleanRequest(signForTemporaryAccess(request, timeInSeconds));
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds) {
|
||||
|
|
|
@ -50,7 +50,7 @@ public class AWSS3BlobSignerExpectTest extends S3BlobSignerExpectTest {
|
|||
.addHeader("Date", DATE).build();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expectedExceptions = UnsupportedOperationException.class)
|
||||
public void testSignGetBlobWithTime() {
|
||||
BlobStore getBlobWithTime = requestsSendResponses(init());
|
||||
HttpRequest compare = getBlobWithTime();
|
||||
|
@ -68,7 +68,7 @@ public class AWSS3BlobSignerExpectTest extends S3BlobSignerExpectTest {
|
|||
.addHeader("Date", DATE).build();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expectedExceptions = UnsupportedOperationException.class)
|
||||
public void testSignPutBlobWithTime() throws Exception {
|
||||
BlobStore signPutBloblWithTime = requestsSendResponses(init());
|
||||
Blob blob = signPutBloblWithTime.blobBuilder(name).payload(text).contentType("text/plain").build();
|
||||
|
|
Loading…
Reference in New Issue