File tree 3 files changed +9
-3
lines changed
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Changelog
4
4
1.8.0
5
5
=====
6
6
* Fixed the behaviour of ``S3FSStore `` when providing a custom endpoint.
7
+ * Added ``verify `` constructor argument to ``S3FSStore `` that disables SSL verification. Use it in an URI as ``?verify=false ``.
7
8
8
9
1.7.0
9
10
=====
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ def __init__(
32
32
reduced_redundancy = False ,
33
33
public = False ,
34
34
metadata = None ,
35
+ verify = True ,
35
36
):
36
37
if isinstance (bucket , str ):
37
38
import boto3
@@ -47,6 +48,7 @@ def __init__(
47
48
self .reduced_redundancy = reduced_redundancy
48
49
self .public = public
49
50
self .metadata = metadata or {}
51
+ self .verify = verify
50
52
51
53
# Get endpoint URL
52
54
self .endpoint_url = self .bucket .meta .client .meta .endpoint_url
@@ -66,7 +68,7 @@ def _create_filesystem(self) -> "S3FileSystem":
66
68
if not has_s3fs :
67
69
raise ImportError ("Cannot find optional dependency s3fs." )
68
70
69
- client_kwargs = {}
71
+ client_kwargs = {"verify" : self . verify }
70
72
if self .endpoint_url :
71
73
client_kwargs ["endpoint_url" ] = self .endpoint_url
72
74
@@ -187,4 +189,6 @@ def _from_parsed_url(
187
189
# The bucket will be created in the `create_filesystem` method if it doesn't exist.
188
190
bucket = resource .Bucket (bucket_name )
189
191
190
- return cls (bucket )
192
+ verify = query .get ("verify" , "true" ).lower () == "true"
193
+
194
+ return cls (bucket , verify = verify )
Original file line number Diff line number Diff line change 7
7
8
8
storage = pytest .importorskip ("google.cloud.storage" )
9
9
10
- S3_URL = "s3://minio:miniostorage@127.0.0.1:9000/bucketname?create_if_missing=true&is_secure=false"
10
+ S3_URL = "s3://minio:miniostorage@127.0.0.1:9000/bucketname?create_if_missing=true&is_secure=false&verify=false "
11
11
12
12
"""
13
13
When using the `s3` scheme in a URL, the new store creation returns an `S3FSStore`.
@@ -26,6 +26,7 @@ def test_new_s3fs_creation():
26
26
bucket_name = "bucketname-minio" ,
27
27
is_secure = False ,
28
28
),
29
+ verify = False ,
29
30
)
30
31
31
32
actual = get_store_from_url (S3_URL )
You can’t perform that action at this time.
0 commit comments