-
Notifications
You must be signed in to change notification settings - Fork 495
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
Specify how to enable ssl hostname verification for python client #6538
Conversation
@saimedhi - Can you please review/sign off on this for technical accuracy? Thank you. |
Hello @AurelienSylvan, May I know if you've tested using ssl_assert_hostname as a comma-separated list of hosts to enable hostname verification? From what I've gathered in the urllib3 documentation:
Thanks for your contribution! :) |
@saimedhi Anyway, i'll correct that. |
1741cde
to
468994a
Compare
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.
Hello @AurelienSylvan,
I know it's challenging to cover everything in just one line. I believe it would be beneficial to include detailed explanations, such as when to use it, its default value, and examples, in the opensearch-py guide here. We can then reference this documentation as needed. What are your thoughts on this approach?
Hello @saimedhi I don't get your point concerning the opensearch-py guide. Are you saying we should move this documentation into the opensearch-py repo ? Or add a reference somewhere ? |
Signed-off-by: Aurélien Sylvan <[email protected]>
Signed-off-by: Aurélien Sylvan <[email protected]>
Signed-off-by: Aurélien Sylvan <[email protected]>
Thanks for the quick response, @AurelienSylvan! I've submitted a PR in opensearch-py for the ssl_assert_hostname guide. You're welcome to check it out and leave any comments or suggestions. Feel free to use it as a reference for your own PR. |
hosts = [{'host': host, 'port': port}], | ||
http_compress = True, # enables gzip compression for request bodies | ||
use_ssl = True, | ||
verify_certs = False, |
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.
To enable hostname verification, set verify_certs to True.
Please review this PR at your convenience. You may also wait until it's merged to avoid potential revisions and include some content here.
``` | ||
{% include copy.html %} | ||
|
||
If you need to enable ssl hostname verification to the same host, specify None, or leave it to its default value. |
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.
I believe this case isn't necessary. We can just add it as a comment in the previous case, as seen in this PR. Feel free to share your thoughts on the PR if you have any other ideas. Thank you :)
Hello @AurelienSylvan! I'm pleased to inform you that the pertinent guide has now been added to opensearch-py. Can we please close the PR? Thank you sincerely for your contributions! |
Yep ! Let's close it. Thank you. |
Closing this issue as documentation has been added to the opensearch-py library about handling ssl hostname verification. |
Description
Python client documentation does not specify how to properly enable ssl hostname verification. The trick is that the
False
value when disabled needs to become a string when enabled, which is confusing.Issues Resolved
None
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.