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:
Andrew Gaul 2013-08-06 14:15:02 -07:00
parent 435103eb35
commit bc0abbaa07
2 changed files with 4 additions and 7 deletions

View File

@ -72,17 +72,14 @@ public class AWSS3BlobRequestSigner extends S3BlobRequestSigner<AWSS3AsyncClient
public HttpRequest signGetBlob(String container, String name, long timeInSeconds) { public HttpRequest signGetBlob(String container, String name, long timeInSeconds) {
checkNotNull(container, "container"); checkNotNull(container, "container");
checkNotNull(name, "name"); checkNotNull(name, "name");
HttpRequest request = processor.apply(Invocation.create(getMethod, ImmutableList.<Object> of(container, name))); throw new UnsupportedOperationException();
return cleanRequest(signForTemporaryAccess(request, timeInSeconds));
} }
@Override @Override
public HttpRequest signPutBlob(String container, Blob blob, long timeInSeconds) { public HttpRequest signPutBlob(String container, Blob blob, long timeInSeconds) {
checkNotNull(container, "container"); checkNotNull(container, "container");
checkNotNull(blob, "blob"); checkNotNull(blob, "blob");
HttpRequest request = processor.apply(Invocation.create(createMethod, throw new UnsupportedOperationException();
ImmutableList.<Object>of(container, blobToObject.apply(blob))));
return cleanRequest(signForTemporaryAccess(request, timeInSeconds));
} }
private HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds) { private HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds) {

View File

@ -50,7 +50,7 @@ public class AWSS3BlobSignerExpectTest extends S3BlobSignerExpectTest {
.addHeader("Date", DATE).build(); .addHeader("Date", DATE).build();
} }
@Test @Test(expectedExceptions = UnsupportedOperationException.class)
public void testSignGetBlobWithTime() { public void testSignGetBlobWithTime() {
BlobStore getBlobWithTime = requestsSendResponses(init()); BlobStore getBlobWithTime = requestsSendResponses(init());
HttpRequest compare = getBlobWithTime(); HttpRequest compare = getBlobWithTime();
@ -68,7 +68,7 @@ public class AWSS3BlobSignerExpectTest extends S3BlobSignerExpectTest {
.addHeader("Date", DATE).build(); .addHeader("Date", DATE).build();
} }
@Test @Test(expectedExceptions = UnsupportedOperationException.class)
public void testSignPutBlobWithTime() throws Exception { public void testSignPutBlobWithTime() throws Exception {
BlobStore signPutBloblWithTime = requestsSendResponses(init()); BlobStore signPutBloblWithTime = requestsSendResponses(init());
Blob blob = signPutBloblWithTime.blobBuilder(name).payload(text).contentType("text/plain").build(); Blob blob = signPutBloblWithTime.blobBuilder(name).payload(text).contentType("text/plain").build();