Skip to content

Commit

Permalink
removing preview and fixing issue with aad (#7042)
Browse files Browse the repository at this point in the history
  • Loading branch information
aavalang authored Nov 30, 2023
1 parent 4acf92f commit 8511b68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/bastion/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Release History
===============
0.3.0
++++++
* Removing preview flag.
* Fix for AAD login.

0.2.7
++++++
* add support for auth type password in RDP connection
Expand Down
2 changes: 1 addition & 1 deletion src/bastion/azext_bastion/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.isPreview": false,
"azext.minCliCoreVersion": "2.43.0"
}
6 changes: 4 additions & 2 deletions src/bastion/azext_bastion/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ def rdp_bastion_host(cmd, target_resource_id, target_ip_address, resource_group_
profile = Profile(cli_ctx=cmd.cli_ctx)
access_token = profile.get_raw_token()[0][2].get("accessToken")
logger.debug("Response %s", access_token)
web_address = f"https://{bastion_endpoint}/api/rdpfile?resourceId={target_resource_id}&format=rdp"
f"&rdpport={resource_port}&enablerdsaad={enable_mfa}"
web_address = f"https://{bastion_endpoint}/api/rdpfile?resourceId={target_resource_id}&format=rdp" \
f"&rdpport={resource_port}&enablerdsaad={enable_mfa}"

headers = {
"Authorization": f"Bearer {access_token}",
Expand All @@ -310,6 +310,8 @@ def rdp_bastion_host(cmd, target_resource_id, target_ip_address, resource_group_
rdpfilepath = os.path.join(tempdir, 'conn_{}.rdp'.format(uuid.uuid4().hex))
_write_to_file(response, rdpfilepath)

logger.warning("Saving RDP file to: %s", rdpfilepath)

command = [_get_rdp_path()]
if configure:
command.append("/edit")
Expand Down
2 changes: 1 addition & 1 deletion src/bastion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# HISTORY.rst entry.
VERSION = '0.2.7'
VERSION = '0.3.0'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit 8511b68

Please sign in to comment.