aws / aws/sagemaker-python-sdk
Support custom SSL certificate bundles
- Ngôn ngữ chính
- Python
- Star
- 2.3k
- Fork
- 1.3k
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 35
Mô tả
**Describe the feature you'd like**
Support custom SSL verification control in SageMaker Python SDK.
`Boto3` supports the [verify](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html#boto3.session.Session.client) parameter when creating a client, which allows either disabling SSL verification or setting a custom certificate bundle. Alternatively, a custom certificate bundle can be set through the `config` file or by the `AWS_CA_BUNDLE` environment variable.
However, these are not exposed or respected by the SageMaker Python SDK. This prevents SageMaker code from being used behind some corporate firewalls.
The lack of this feature has been noted in https://github.com/aws/sagemaker-python-sdk/discussions/3656
**How would this feature be used? Please describe.**
Corporate firewalls may re-encrypt an SSL connection with their own certificate. Unless this certificate is configured as a root certificate, SSL verification fails. This change will allow use of the SageMaker Python SDK behind such MITM-based firewalls.
**Describe alternatives you've considered**
N/A
**Additional context**
The specific error raised by SageMaker:
```
SSLError: SSL validation failed for https://sts.us-west-2.amazonaws.com/ [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1147)
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định SDK tạo các client Boto3 như thế nào và các thiết lập session hoặc config được truyền qua ra sao. So sánh các điểm vào đó với tham số verify của Boto3 và hành vi của AWS_CA_BUNDLE. Công việc được xem là hoàn tất khi các caller có thể điều khiển việc xác minh SSL hoặc sử dụng một certificate bundle tùy chỉnh, với các test bao phủ những đường dẫn cấu hình được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, python
- Lĩnh vực
- cloud, security
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100