MySQL sslConfig CA is never used: server certificate not verified
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
Hướng nghiên cứu
Bắt đầu từ ingestion/src/metadata/utils/ssl_manager.py và theo dõi cách SSLManager.setup_ssl tạo dict ssl cho MySQL, Doris và StarRocks. Kiểm tra cách PyMySQL đọc các tùy chọn SSL bên trong dict đó; hoàn thành khi CA được dùng để xác minh máy chủ và CA sai khiến kết nối thất bại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Connector
MySQL
Feature area
Authentication / Connection
Describe the bug
A MySQL connection with sslConfig.caCertificate set encrypts the connection but never verifies the server certificate, and sslCertificate/sslKey are never presented.
SSLManager.setup_ssl for MysqlConnection (also Doris and StarRocks) builds connectionArguments["ssl"] = {"ssl_ca": ..., "ssl_cert": ..., "ssl_key": ...}. That dict is passed to PyMySQL as ssl=, and PyMySQL's _create_ssl_ctx reads the keys ca, cert and key. With no ca it sets verify_mode = CERT_NONE and check_hostname = False:
>>> Connection._create_ssl_ctx(None, {"ssl_ca": "ca.pem"}) # what OpenMetadata passes
verify_mode=CERT_NONE check_hostname=False
>>> Connection._create_ssl_ctx(None, {"ca": "ca.pem"})
verify_mode=CERT_REQUIRED check_hostname=True
(PyMySQL 2.2.8, as shipped with openmetadata-ingestion 2.1.0.0.) ssl_ca/ssl_cert/ssl_key are valid as top-level pymysql.connect keyword arguments, but not inside the ssl dict.
To Reproduce
- Set
sslConfig.caCertificateon a MySQL service. - Build the connection arguments with
SSLManager.setup_ssland pass the resultingssldict topymysql.connections.Connection._create_ssl_ctx. - The context has
verify_mode=CERT_NONEandcheck_hostname=False, as shown above. I have not run a live connection against a wrong CA.
Expected behavior
The CA is used to verify the server (ca, cert, key inside the ssl dict), so a wrong CA fails the connection.
OS
Kubernetes (ingestion-base image)
Python version
3.12
OpenMetadata version
2.0.6
OpenMetadata Ingestion package version
openmetadata-ingestion==2.0.6.0; same code on main (ingestion/src/metadata/utils/ssl_manager.py).
Pre-submission checklist
- I searched for duplicate issues.
- I removed credentials, hostnames, emails, and other sensitive data from logs and config.
- Ngôn ngữ chính
- TypeScript
- Star
- 15.4k
- Fork
- 2.4k
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 774
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của open-metadata/OpenMetadata
-
Default Anthropic model in the LLM configuration is a retired model (claude-3-5-sonnet-20240620)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-metadata/OpenMetadata#36757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
open-metadata/OpenMetadata#36739 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Detail Bug] Usage ingestion publishes table usage and join dates one day earlier on UTC-negative host timezonesCó thể đã có người làm @detail-app đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-metadata/OpenMetadata#36604 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
open-metadata/OpenMetadata#36496 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Java SDK glossary term assets GET sends RequestOptions as a request bodyCó thể đã có người làm @LubabaKhalid đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-metadata/OpenMetadata#36150 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của open-metadata/OpenMetadata
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
transitmatters/shutdown-tracker#155 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Popping out a single panel leaves its always render overlay in the main window, blocking clicksĐang mởbug triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
"Claude Code request is missing its initial user message" when the prompt starts with an image pathĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
earendil-works/pi-claude-code#31 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
bug pending triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
privatenumber/cleye#48 ·