Skip to content

Bug fix for webapp ssh#8324

Merged
yugangw-msft merged 3 commits intoAzure:devfrom
patricklee2:fab
Jan 29, 2019
Merged

Bug fix for webapp ssh#8324
yugangw-msft merged 3 commits intoAzure:devfrom
patricklee2:fab

Conversation

@patricklee2
Copy link
Contributor

@patricklee2 patricklee2 commented Jan 23, 2019

fixes #8282 #8281, #8280 , #8279

uses fabric ssh library which as a BSD 2-clause license
Added license at src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/fabric_license
im not sure if that is the correct place top out it.


This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@patricklee2 patricklee2 force-pushed the fab branch 19 times, most recently from 1772abc to bb73053 Compare January 25, 2019 00:55
@patricklee2
Copy link
Contributor Author

@yugangw-msft @panchagnula @yiliaomsft @rramachand21
This is ready for review

Copy link
Contributor

@yugangw-msft yugangw-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, the main question is on why pinning the cryptography version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest you log an verbose entry to document the exception details: logger.info(ex). My concern is catching generic exceptions above could swallow non connection related errors which ends up making the diagnosis pretty hard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Contributor

@yugangw-msft yugangw-msft Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cryptography is a pretty common dependency, why we need to pinning to a specific version?

Copy link
Contributor Author

@patricklee2 patricklee2 Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paramiko, (one of the dependency) is still using a deprecated method.
as a result, these warnings appear, and I couldn't suppress them
the fix was to pin the version.
paramiko/paramiko#1369

/home/patle/azure-cli/env/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  m.add_string(self.Q_C.public_numbers().encode_point())
/home/patle/azure-cli/env/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/home/patle/azure-cli/env/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  hm.add_string(self.Q_C.public_numbers().encode_point())

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be reasonable to have "<2.5.0"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also log an issue to track to upgrade paramiko when it rolls out the fix. Please assign that issue to both you and me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it to <2.5.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <2.5.0 now causes a conflict #9629. Please update.

time.sleep(1)
try:
c.run('cat /etc/motd', pty=True)
c.run('source /etc/profile; /bin/ash', pty=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is supposed to be /bin/bash right?

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.

4 participants