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

Add timeout to authentication step #869

Merged
merged 7 commits into from Jun 6, 2017

Conversation

Projects
None yet
4 participants
@timsavage
Contributor

timsavage commented Dec 23, 2016

Ran into a problem with an SSH server that became non-responsive during authentication. The current behaviour of paramiko is to block while authentication is in progress leading to the client app hanging on an auth response.

Change is to add an auth_timeout option and apply the timeout in the wait_for_response method of AuthHandler.

Includes test cases for this additional code.

@coveralls

This comment has been minimized.

coveralls commented Dec 23, 2016

Coverage Status

Coverage increased (+0.09%) to 74.399% when pulling ea01666 on timsavage:add-auth-timeout into ec3fdd7 on paramiko:master.

@coveralls

This comment has been minimized.

coveralls commented Dec 23, 2016

Coverage Status

Coverage increased (+0.05%) to 74.358% when pulling ea01666 on timsavage:add-auth-timeout into ec3fdd7 on paramiko:master.

1 similar comment
@coveralls

This comment has been minimized.

coveralls commented Dec 23, 2016

Coverage Status

Coverage increased (+0.05%) to 74.358% when pulling ea01666 on timsavage:add-auth-timeout into ec3fdd7 on paramiko:master.

@coveralls

This comment has been minimized.

coveralls commented Dec 23, 2016

Coverage Status

Coverage increased (+0.08%) to 74.385% when pulling c5febfa on timsavage:add-auth-timeout into ec3fdd7 on paramiko:master.

@bitprophet bitprophet added this to the 2.2 milestone Jan 5, 2017

@bitprophet

This comment has been minimized.

Member

bitprophet commented Jan 5, 2017

Thanks! Added to milestone as a reminder to review later.

@bitprophet bitprophet merged commit c5febfa into paramiko:master Jun 6, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
self.assertTrue('Authentication timeout' in str(evalue))
finally:
# Restore value
self.tc.auth_timeout = auth_timeout

This comment has been minimized.

@ploxiln

ploxiln Jun 6, 2017

Contributor

setUp() is run for every test method, so it's a new client for every test, so this shouldn't be needed

bitprophet added a commit that referenced this pull request Jun 6, 2017

@timsavage timsavage deleted the timsavage:add-auth-timeout branch Nov 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment