-
Notifications
You must be signed in to change notification settings - Fork 389
Add 1-Way and 2-Way TLS Support to Bulk Import Functions #2672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Welcome @abd-770! It looks like this is your first PR to milvus-io/pymilvus 🎉 |
|
@longjiquan @XuanYang-cn |
|
@longjiquan @XuanYang-cn |
|
@abd-770 We are reviewing this PR. In the mean time, could you please fix the DCO error? |
|
The "**kwargs" is passed into _post_request() method for each API, and eventually passed into the requests.post() method. I suppose you can call the get_import_progress() like this: |
|
@yhmo @XuanYang-cn We can also update the documentation for the same and provide certificate path to the syntax of the function. |
|
request has two parameters for tls: In pymilvus, for one-way tls, the client needs to pass a ca file: https://github.com/milvus-io/pymilvus/blob/master/examples/cert/example_tls1.py Looks like the "verify" parameter is for one-way tls, only passing one path of ca file. It can be a boolean value which means internal ca. I think the cert_path should cover the three cases, I suggest to rename the cert_path to "cert" If cert is a bool, pass it as "verify". |
|
@yhmo Meanwhile for this PR, can we get it merged?
For this case, you mean setting the value of verify=true? |
|
You can read the source code of "requests.api", under the path The description of "param verify" and "param cert". |
|
@yhmo @XuanYang-cn |
Signed-off-by: Abdullah Ahmed <[email protected]>
Signed-off-by: Abdullah Ahmed <[email protected]>
|
@yhmo @XuanYang-cn @longjiquan Please review this PR. |
|
@abd-770 THX for the effort. Please fix the coding style check use the following instructions: |
|
@abd-770 To verify the new parameters for bulk_import/get_import_progress/list_import_jobs, you can call them with fake collection name and fake file paths. If the tls parameter takes effect, you will see error like "collection doesn't exist" returned from the server, instead of a connection exception. |
Signed-off-by: Abdullah-Ahmed2 <[email protected]>
XuanYang-cn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abd-770, XuanYang-cn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…io#2672) Issue: milvus-io#2671 This PR addresses the above issue by adding optional CA certificate support to the below bulk import functions: - **bulk_import** - **get_import_progress** - **list_import_jobs** Now, users with TLS-mode milvus can use these functions in pymilvus, using their SSL-certificate. Co-authored-by: Abdullah-Ahmed2 <[email protected]> Signed-off-by: yangxuan <[email protected]>
…2739) Issue: #2671 This PR addresses the above issue by adding optional CA certificate support to the below bulk import functions: - **bulk_import** - **get_import_progress** - **list_import_jobs** Now, users with TLS-mode milvus can use these functions in pymilvus, using their SSL-certificate. Signed-off-by: yangxuan <[email protected]> Co-authored-by: Abdullah Ahmed <[email protected]> Co-authored-by: Abdullah-Ahmed2 <[email protected]>
Description:
This PR implements support for both client verification of server (1-way TLS) and mutual authentication (2-way TLS) for all the bulk import functions in pymilvus.
Now, users with TLS-mode milvus can use these functions in pymilvus, using their certificate's.