Skip to content

RDP-specific Coder Desktop deep link #96

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

Closed
ThomasK33 opened this issue Mar 6, 2025 · 0 comments · Fixed by #147
Closed

RDP-specific Coder Desktop deep link #96

ThomasK33 opened this issue Mar 6, 2025 · 0 comments · Fixed by #147
Assignees

Comments

@ThomasK33
Copy link
Member

ThomasK33 commented Mar 6, 2025

Add RDP-specific logic into Coder Desktop so that all coder apps marked with external=true and a URL matching to coder://v0/open/agent/<agent ID>/rdp?username=<username>&password=<password> will be rendered as buttons and have RDP-specific logic in place. This logic can include fetching additional information or credentials in Coder Desktop and creating an .rdp file or comparable integrations.

@sreya sreya self-assigned this Apr 23, 2025
@ibetitsmike ibetitsmike assigned ethanndickson and unassigned sreya Apr 23, 2025
@ethanndickson ethanndickson linked a pull request May 7, 2025 that will close this issue
ethanndickson added a commit that referenced this issue May 12, 2025
ethanndickson added a commit that referenced this issue May 12, 2025
Relates to #96.

<img width="380" alt="image" src="https://github.com/user-attachments/assets/36316e23-ba6e-40f0-ba4d-228dd9c31006" />
<img width="369" alt="image" src="https://github.com/user-attachments/assets/d9ff0c21-c4c7-485a-8767-ca1772ebecbf" />

I've had to replace the  **app** provisioning profile for this to build.
ethanndickson added a commit that referenced this issue May 12, 2025
Closes #96.

If a `coder_app` exists on the workspace, where the URL is of the form: 
```coder://dev.coder.com/v0/open/ws/<workspace>/agent/<agent>/rdp?username=administrator&password=password``` the URL will be parsed, validated, and an alert opened. 
If `Open` is clicked on the alert, the password will be written to the clipboard, where it can be pasted when prompted.

https://github.com/user-attachments/assets/da8410c7-d656-4bf7-936a-8d465953e195

We're unable to avoid the entering of the password, as the `password` field in an `.rdp` file, even if encrypted properly, is ignored by the macOS Windows RDP app.

The app supports reading credentials from the macOS keychain, and whilst we could create keychain entries, they have to be associated with an RDP config in the app, and there's no way to automate the creation of that config, and then run that config.

Further reading:
https://stackoverflow.com/questions/48713606/how-to-create-rdp-file-on-mac-os-that-allows-auto-login
https://techcommunity.microsoft.com/discussions/azurevirtualdesktopforum/macos-remote-desktop-client-app---automatic-logon-no-credential-prompt/2596451

The above demo was done by adding this app to the template:

```
resource "coder_app" "connectrdp" {
  agent_id = coder_agent.main.id
  slug = "connectrdp"
  display_name = "Coder Connect RDP"
  url = "coder://dev.coder.com/v0/open/ws/${data.coder_workspace.me.name}/agent/main/rdp?username=Administrator&password=coderRDP!"
  icon = "/icon/terminal.svg"
  external = true
}
```
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 a pull request may close this issue.

3 participants