Skip to content
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

Allow configuration of SSL Ciphers #1755

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Allow configuration of SSL Ciphers #1755

merged 1 commit into from
Mar 22, 2019

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Mar 21, 2019

Additional support for #1741 . While testing SSL connections w/ python3.7 locally, I found that the default ssl ciphers that my python3.7 install supported were not sufficient to establish a connection with my kafka broker. This PR adds a new configuration option ssl_ciphers that will be passed through to SSLContext.set_ciphers() and may allow use of ciphers that are available but not enabled by default on a particular python / openssl installation. In my case, this was DHE-DSS-AES128-GCM-SHA256 . Without this configuration, my connection attempts failed with ssl.SSLError UNKNOWN_PROTOCOL


This change is Reviewable

@jeffwidman
Copy link
Collaborator

Test failure looks unrelated, but might be legit bug rather than transient error? I didn't investigate further:

____________________________ test_connection_delay _____________________________
conn = <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>
    def test_connection_delay(conn):
        conn.last_attempt = time.time()
>       assert round(conn.connection_delay()) == round(conn.config['reconnect_backoff_ms'])
E       assert 49.0 == 50.0
E        +  where 49.0 = round(49.48000907897949)
E        +    where 49.48000907897949 = <bound method BrokerConnection.connection_delay of <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>>()
E        +      where <bound method BrokerConnection.connection_delay of <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>> = <kafka.conn.BrokerConnection object at 0x0000000004cc50f8>.connection_delay
E        +  and   50.0 = round(50)
test/test_conn.py:84: AssertionError

@dpkp
Copy link
Owner Author

dpkp commented Mar 22, 2019

flaky test -- i'll fix that in a separate PR

@jeffwidman jeffwidman merged commit 0bc7518 into master Mar 22, 2019
@jeffwidman jeffwidman deleted the ssl_set_ciphers branch March 22, 2019 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants