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

[SSH] Cast "certificate_validity" as an int before calling ListCredentials #7077

Merged
merged 7 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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