Add ssl options to sync configuration and client#333
Add ssl options to sync configuration and client#333IgorChvyrov-sm merged 13 commits intofeature_proxy_configurationfrom
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
|
Can we add some tests for this? |
Sure, it not marked as ready yet, will do |
nthmost-orkes
left a comment
There was a problem hiding this comment.
Might be some missing implementation in this PR, based on the README -- correct me if I am wrong:
(1)
In src/conductor/client/configuration/configuration.py:96:
self.key_file = None
Should perhaps be:
self.key_file = None or os.getenv("CONDUCTOR_KEY_FILE")
(2)
Looking at the tests, we aren't catching whether environment variables exist-- tests/unit/configuration/test_configuration.py doesn't test:
- CONDUCTOR_KEY_FILE
- CONDUCTOR_VERIFY_SSL
- CONDUCTOR_SSL_CA_CERT_DATA
Also I don't see how CONDUCTOR_VERIFY_SSL actually functions within the code. Grep for CONDUCTOR_VERIFY_SSL in src/* gets me nothing, but it IS in the example at examples/sync_ssl_example.py:37:
os.environ["CONDUCTOR_VERIFY_SSL"] = "true"
The actual implementation in src/conductor/client/configuration/configuration.py:88:
self.verify_ssl = True # Hardcoded / no env variable read here
(3)
Also... (sorry 😆 ) I'd suggest adding all of the parameters to the example code in examples/sync_ssl_example.py:60-64 and examples/async/async_ssl_example.py:49-53
Suggestion:
# SSL with client certificate authentication
client_cert_config = Configuration(
base_url="https://play.orkes.io",
ssl_ca_cert="/path/to/ca-certificate.pem",
# Add these missing parameters:
cert_file="/path/to/client-certificate.pem",
key_file="/path/to/client-key.pem",
)
# Conflicts: # tests/unit/configuration/test_configuration.py
98a39d9
into
feature_proxy_configuration
Changes: