boundary icon indicating copy to clipboard operation
boundary copied to clipboard

RDP connect helper outputs unexpected URL format for macOS 14.5 (Sonoma)

Open learhy opened this issue 1 year ago • 0 comments
trafficstars

Describe the bug

In macOS Sonoma, the open command seems to require stricter URL handling. As a result, the following command no longer works:

open -W -a "/Applications/Microsoft Remote Desktop.app" -u 'rdp://full%20address=s:127.0.0.1:51246'

This command generates the following error:

Unable to interpret 'rdp://full%20address=s:127.0.0.1:51246' as a URL

Instead, you must use percent-encoding format (ie, %3A, which is the URL encoding for :)

open -W -a "/Applications/Microsoft Remote Desktop.app" -u 'rdp://full%20address=s%3A127.0.0.1%3A51647'

To Reproduce

Steps to reproduce the behavior:

  1. Open the Terminal application on a macOS Sonoma system.

  2. Execute the commands:

boundary connect -target-id <rdp-target-id>

open -W -a "/Applications/Microsoft Remote Desktop.app" -u 'rdp://full%20address=s:127.0.0.1:port-from-output-above'
  1. Observe the error message indicating that the URL could not be interpreted.

This obviously also impacts the rdp connect helper:

boundary connect rdp -target-id ttcp_CPHHKitqQk
Credentials:
  Credential Source ID:   credup_Vjy4uaxptZ
  Credential Source Name: aws-ec2-rdp-server
  Credential Store ID:    csst_GaJN5lkjnR
  Credential Store Type:  static
  Credential Type:        username_password
  Secret:
        password:   5XemW$*vpF&qC9!i)I-4*u5k2o(i8ueo
        username:   Administrator

Unable to interpret 'rdp://full%20address=s:127.0.0.1:52073' as a path or URL

Expected behavior

Since Boundary can't exactly control how Apple writes its software, I suggest the boundary connect rdp helper automatically format the correct connection URL as described above when running on affected versions of macOS.

(note-- i've only tested this on sonoma, could be problematic for earlier versions as well)

learhy avatar Jun 25 '24 01:06 learhy