Skip to content

Commit

Permalink
[SSH] Cast "certificate_validity" as an int before calling ListCreden…
Browse files Browse the repository at this point in the history
…tials (#7077)
  • Loading branch information
vthiebaut10 committed Mar 7, 2024
1 parent c4baba3 commit 1659fae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/ssh/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Release History
===============
upcoming
2.0.3
-----
* [Bug Fix] Ensure that certificate validity value is always an integer when retrieving relay information for connecting to Arc Machines.
* Add support to ARM64 clients when connecting to Arc Machines. Connect proxy now available for ARM64 architecture.

2.0.2
Expand Down
9 changes: 5 additions & 4 deletions src/ssh/azext_ssh/connectivity_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _list_credentials(cmd, resource_uri, certificate_validity_in_seconds):
list_cred_args = {
'endpoint_name': 'default',
'resource_uri': resource_uri,
'expiresin': certificate_validity_in_seconds,
'expiresin': int(certificate_validity_in_seconds),
'service_name': "SSH"
}

Expand Down Expand Up @@ -224,7 +224,7 @@ def get_client_side_proxy(arc_proxy_folder):
os.chmod(install_location, os.stat(install_location).st_mode | stat.S_IXUSR)
print_styled_text((Style.SUCCESS, f"SSH Client Proxy saved to {install_location}"))

_download_proxy_license()
_download_proxy_license(arc_proxy_folder)

return install_location

Expand Down Expand Up @@ -272,8 +272,9 @@ def _get_proxy_filename_and_url(arc_proxy_folder):
return request_uri, install_location, older_location


def _download_proxy_license():
proxy_dir = os.path.join('~', ".clientsshproxy")
def _download_proxy_license(proxy_dir):
if not proxy_dir:
proxy_dir = os.path.join('~', ".clientsshproxy")
license_uri = f"{consts.CLIENT_PROXY_STORAGE_URL}/{consts.CLIENT_PROXY_RELEASE}/LICENSE.txt"
license_install_location = os.path.expanduser(os.path.join(proxy_dir, "LICENSE.txt"))

Expand Down
2 changes: 1 addition & 1 deletion src/ssh/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from setuptools import setup, find_packages

VERSION = "2.0.2"
VERSION = "2.0.3"

CLASSIFIERS = [
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit 1659fae

Please sign in to comment.