public class SkipMd5CheckStrategy extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DISABLE_GET_OBJECT_MD5_VALIDATION_PROPERTY
System property to disable MD5 validation for GetObject.
|
static String |
DISABLE_PUT_OBJECT_MD5_VALIDATION_PROPERTY
System property to disable MD5 validation for both PutObject and UploadPart.
|
static SkipMd5CheckStrategy |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
skipClientSideValidation(GetObjectRequest request,
ObjectMetadata returnedMetadata)
Conveience method to determine whether to do client side validation of a GetObject call based
on both the request and the response.
|
boolean |
skipClientSideValidation(PresignedUrlDownloadRequest request,
ObjectMetadata returnedMetadata)
Conveience method to determine whether to do client side validation of a
PresignedUrlDownloadRequest call based
on both the request and the response. |
boolean |
skipClientSideValidationPerGetResponse(ObjectMetadata metadata)
Determines whether the client should use the
Headers.ETAG header returned by S3 to
validate the integrity of the message client side based on the server response. |
boolean |
skipClientSideValidationPerPutResponse(ObjectMetadata metadata)
Determines whether the client should use the
Headers.ETAG header returned by S3 to
validate the integrity of the message client side based on the server response. |
boolean |
skipClientSideValidationPerRequest(GetObjectRequest request)
Based on the given
GetObjectRequest , returns whether the specified request should
skip MD5 check on the requested object content. |
boolean |
skipClientSideValidationPerRequest(PresignedUrlDownloadRequest request)
Based on the given
PresignedUrlDownloadRequest , returns whether the specified request should
skip MD5 check on the requested object content. |
boolean |
skipClientSideValidationPerRequest(PresignedUrlUploadRequest request)
Determines whether the client should use the
Headers.ETAG header returned by S3 to
validate the integrity of the message client side. |
boolean |
skipClientSideValidationPerRequest(PutObjectRequest request)
Determines whether the client should use the
Headers.ETAG header returned by S3 to
validate the integrity of the message client side. |
boolean |
skipClientSideValidationPerRequest(UploadPartRequest request)
Determines whether the client should use the
Headers.ETAG header returned by S3 to
validate the integrity of the message client side. |
boolean |
skipClientSideValidationPerUploadPartResponse(ObjectMetadata metadata)
Determines whether the client should use the
Headers.ETAG header returned by S3 to
validate the integrity of the message client side based on the server response. |
boolean |
skipServerSideValidation(PutObjectRequest request)
Determines whether the client should calculate and send the
Headers.CONTENT_MD5
header to be validated by S3 per the request. |
boolean |
skipServerSideValidation(UploadPartRequest request)
Determines whether the client should calculate and send the
Headers.CONTENT_MD5
header to be validated by S3 per the request. |
public static final String DISABLE_GET_OBJECT_MD5_VALIDATION_PROPERTY
public static final String DISABLE_PUT_OBJECT_MD5_VALIDATION_PROPERTY
public static final SkipMd5CheckStrategy INSTANCE
public boolean skipClientSideValidationPerGetResponse(ObjectMetadata metadata)
Headers.ETAG
header returned by S3 to
validate the integrity of the message client side based on the server response. We skip the
client side check if any of the following conditions are true:
public boolean skipClientSideValidationPerPutResponse(ObjectMetadata metadata)
Headers.ETAG
header returned by S3 to
validate the integrity of the message client side based on the server response. We skip the
client side check if any of the following conditions are true:
public boolean skipClientSideValidationPerUploadPartResponse(ObjectMetadata metadata)
Headers.ETAG
header returned by S3 to
validate the integrity of the message client side based on the server response. We skip the
client side check if any of the following conditions are true:
public boolean skipClientSideValidation(GetObjectRequest request, ObjectMetadata returnedMetadata)
SkipMd5CheckStrategy.skipClientSideValidationPerRequest(GetObjectRequest)
and
SkipMd5CheckStrategy.skipClientSideValidationPerGetResponse(ObjectMetadata)
for more details on the
criterion.request
- Original GetObjectRequest
returnedMetadata
- Metadata returned in S3Object
public boolean skipClientSideValidation(PresignedUrlDownloadRequest request, ObjectMetadata returnedMetadata)
PresignedUrlDownloadRequest
call based
on both the request and the response. See
SkipMd5CheckStrategy.skipClientSideValidationPerRequest(PresignedUrlDownloadRequest)
and
SkipMd5CheckStrategy.skipClientSideValidationPerGetResponse(ObjectMetadata)
for more details on the
criterion.request
- Original PresignedUrlDownloadRequest
returnedMetadata
- Metadata returned in S3Object
public boolean skipClientSideValidationPerRequest(PutObjectRequest request)
Headers.ETAG
header returned by S3 to
validate the integrity of the message client side. We skip the client side check if any of
the following conditions are true:
public boolean skipClientSideValidationPerRequest(UploadPartRequest request)
Headers.ETAG
header returned by S3 to
validate the integrity of the message client side. We skip the client side check if any of
the following conditions are true:
public boolean skipServerSideValidation(PutObjectRequest request)
Headers.CONTENT_MD5
header to be validated by S3 per the request.
Currently we always try and do server side validation unless it's been explicitly disabled by the "com.ibm.cloud.objectstorage.services.s3.disablePutObjectMD5Validation" property. Whether or not we actually calculate the MD5 header is determined in the client based on the source of the data (i.e. if it's a file we calculate, if not then we don't)
public boolean skipServerSideValidation(UploadPartRequest request)
Headers.CONTENT_MD5
header to be validated by S3 per the request.
Currently we always try and do server side validation unless it's been explicitly disabled by the "com.ibm.cloud.objectstorage.services.s3.disablePutObjectMD5Validation" property. Whether or not we actually calculate the MD5 header is determined in the client based on the source of the data (i.e. if it's a file we calculate, if not then we don't)
public boolean skipClientSideValidationPerRequest(GetObjectRequest request)
GetObjectRequest
, returns whether the specified request should
skip MD5 check on the requested object content. Specifically, MD5 check should be skipped if
one of the following conditions are true:
public boolean skipClientSideValidationPerRequest(PresignedUrlDownloadRequest request)
PresignedUrlDownloadRequest
, returns whether the specified request should
skip MD5 check on the requested object content. Specifically, MD5 check should be skipped if
one of the following conditions are true:
public boolean skipClientSideValidationPerRequest(PresignedUrlUploadRequest request)
Headers.ETAG
header returned by S3 to
validate the integrity of the message client side. We skip the client side check if any of
the following conditions are true:
Copyright © 2024. All rights reserved.