diff --git a/fence/config-default.yaml b/fence/config-default.yaml index 279c048fb..da2bc1bfb 100755 --- a/fence/config-default.yaml +++ b/fence/config-default.yaml @@ -691,6 +691,10 @@ GS_BUCKETS: {} # bucket3: # region: 'us-east-1' +# When using the Cleversafe storageclient, whether or not to send verify=true +# for requests +VERIFY_CLEVERSAFE_CERT: true + # Names of the S3 buckets to which data files can be uploaded. They should be # configured in `S3_BUCKETS`. ALLOWED_DATA_UPLOAD_BUCKETS: [] diff --git a/fence/resources/storage/storageclient/cleversafe.py b/fence/resources/storage/storageclient/cleversafe.py index 104d1d94d..2517b13f9 100644 --- a/fence/resources/storage/storageclient/cleversafe.py +++ b/fence/resources/storage/storageclient/cleversafe.py @@ -12,6 +12,8 @@ from .base import StorageClient, User, Bucket, handle_request from .errors import RequestError, NotFoundError +from fence.config import config + class CleversafeClient(StorageClient): """ @@ -182,7 +184,11 @@ def _request(self, method, operation, payload=None, **kwargs): ) url = base_url + "?" + urlencode(dict(**kwargs)) return requests.request( - method, url, auth=self._auth, data=payload, verify=False + method, + url, + auth=self._auth, + data=payload, + verify=config["VERIFY_CLEVERSAFE_CERT"], ) # self-signed certificate @property