JCLOUDS-1271: Deprecate signRemoveBlob

URL signing should always use authentication parameters instead of
headers yet no provider supports DELETEs with the former.
This commit is contained in:
Andrew Gaul 2017-04-19 18:08:52 -07:00
parent f0e11d5c2e
commit 2e7de9f850
7 changed files with 7 additions and 0 deletions

View File

@ -85,6 +85,7 @@ public class AtmosBlobRequestSigner implements BlobRequestSigner {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Deprecated
@Override @Override
public HttpRequest signRemoveBlob(String container, String name) { public HttpRequest signRemoveBlob(String container, String name) {
checkNotNull(container, "container"); checkNotNull(container, "container");

View File

@ -88,6 +88,7 @@ public class RegionScopedTemporaryUrlBlobSigner implements BlobRequestSigner {
return sign("PUT", container, blob.getMetadata().getName(), GetOptions.NONE, timestamp.get() + timeInSeconds); return sign("PUT", container, blob.getMetadata().getName(), GetOptions.NONE, timestamp.get() + timeInSeconds);
} }
@Deprecated
@Override @Override
public HttpRequest signRemoveBlob(String container, String name) { public HttpRequest signRemoveBlob(String container, String name) {
return sign("DELETE", container, name, GetOptions.NONE, timestamp.get() + YEAR); return sign("DELETE", container, name, GetOptions.NONE, timestamp.get() + YEAR);

View File

@ -95,6 +95,7 @@ public class S3BlobRequestSigner<T extends S3Client> implements BlobRequestSigne
return cleanRequest(authSigner.signForTemporaryAccess(request, timeInSeconds)); return cleanRequest(authSigner.signForTemporaryAccess(request, timeInSeconds));
} }
@Deprecated
@Override @Override
public HttpRequest signRemoveBlob(String container, String name) { public HttpRequest signRemoveBlob(String container, String name) {
checkNotNull(container, "container"); checkNotNull(container, "container");

View File

@ -71,6 +71,7 @@ public interface BlobRequestSigner {
* @throws UnsupportedOperationException * @throws UnsupportedOperationException
* if not supported by the provider * if not supported by the provider
*/ */
@Deprecated
HttpRequest signRemoveBlob(String container, String name); HttpRequest signRemoveBlob(String container, String name);
/** /**

View File

@ -75,6 +75,7 @@ public class LocalBlobRequestSigner implements BlobRequestSigner {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Deprecated
@Override @Override
public HttpRequest signRemoveBlob(String container, String name) { public HttpRequest signRemoveBlob(String container, String name) {
HttpRequest request = HttpRequest.builder().method("DELETE").endpoint(String.format("%s/%s/%s", endpoint.get(), container, HttpRequest request = HttpRequest.builder().method("DELETE").endpoint(String.format("%s/%s/%s", endpoint.get(), container,

View File

@ -41,6 +41,7 @@ public class RequestSigningUnsupported implements BlobRequestSigner {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Deprecated
@Override @Override
public HttpRequest signRemoveBlob(String container, String name) { public HttpRequest signRemoveBlob(String container, String name) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();

View File

@ -83,6 +83,7 @@ public class AzureBlobRequestSigner implements BlobRequestSigner {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Deprecated
@Override @Override
public HttpRequest signRemoveBlob(String container, String name) { public HttpRequest signRemoveBlob(String container, String name) {
checkNotNull(container, "container"); checkNotNull(container, "container");