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

Support AAD auth with for vscode tunnel #8908

Closed
dmgonch opened this issue Aug 31, 2023 · 8 comments
Closed

Support AAD auth with for vscode tunnel #8908

dmgonch opened this issue Aug 31, 2023 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality tunnels verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@dmgonch
Copy link

dmgonch commented Aug 31, 2023

Azure users should be able to use their Azure creds to set up a vscode tunnel and connect to it without going to GitHub.

May be a something like below:

code tunnel --accept-server-license-terms --name test --auth aad
@connor4312 connor4312 added the feature-request Request for new features or functionality label Aug 31, 2023
@connor4312 connor4312 added this to the September 2023 milestone Aug 31, 2023
@hunter86bg
Copy link

Hey All,

Do you think this one might come soon ?

@connor4312
Copy link
Member

connor4312 commented Oct 17, 2023

This'll be supported on tomorrow's Insiders. At that time you'll need the latest version of VS Code Insiders as well as the prerelease version of Remote - Tunnels and Remote Explorer extensions.

@connor4312 connor4312 added the verification-needed Verification of issue is requested label Oct 23, 2023
@DonJayamanne
Copy link

@connor4312
I've got the latest insiders and pre-release of Tunnels extension
But the CLI doesn't seem to support --auth

❯ code-insiders tunnel --accept-server-license-terms --name test --auth aad
error: unexpected argument '--auth' found

Usage: code-tunnel-insiders tunnel --accept-server-license-terms --name <NAME>

For more information, try '--help'.
❯ code-insiders -h                                                         
Visual Studio Code - Insiders 1.84.0-insider

Usage: code-insiders [options][paths...]

@connor4312
Copy link
Member

There's no --auth argument. There's a --provider argument, but if you don't pass that, it'll ask you what auth provider you want to use.

@DonJayamanne
Copy link

DonJayamanne commented Oct 25, 2023

Still no joy

❯ code-insiders tunnel --accept-server-license-terms --name test --provider
error: unexpected argument '--provider' found

Usage: code-tunnel-insiders tunnel --accept-server-license-terms --name <NAME>
    
    

❯ code-insiders --version
1.84.0-insider
7dff07893ac160244db210e574eccc05f1cba2cb
arm64


❯ code-insiders tunnel -h
Create a tunnel that's accessible on vscode.dev from anywhere. Run `code tunnel --help` for more usage info

Usage: code-tunnel-insiders tunnel [OPTIONS] [COMMAND]

Commands:
  prune       Delete all servers which are currently not running
  kill        Stops any running tunnel on the system
  restart     Restarts any running tunnel on the system
  status      Gets whether there is a tunnel running on the current machine
  rename      Rename the name of this machine associated with port forwarding service
  unregister  Remove this machine's association with the port forwarding service
  user        
  service     (Preview) Manages the tunnel when installed as a system service,
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

ADVANCED OPTIONS:
      --random-name                  Randomly name machine for port forwarding service
      --no-sleep                     Prevents the machine going to sleep while this command runs
      --name <NAME>                  Sets the machine name for port forwarding service
      --accept-server-license-terms  If set, the user accepts the server license terms and the server will be started without a user prompt

GLOBAL OPTIONS:
      --cli-data-dir <CLI_DATA_DIR>  Directory where CLI metadata should be stored [env: VSCODE_CLI_DATA_DIR=]
      --verbose                      Print verbose output (implies --wait)
      --log <level>                  Log level to use [possible values: trace, debug, info, warn, error, critical, off]



❯ code-insiders tunnel --accept-server-license-terms --name test
*
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
[2023-10-25 14:00:15] info Using Github for authentication, pass the `--provider` option to change this.
To grant access to the server, please log into https://github.com/login/device and use code 1212-12121

@connor4312
Copy link
Member

Ah, right, the --provider argument is only on code tunnel user login. I'll adjust the help text to reflect that.

Note that the CLI version in VS Code desktop is not able to interact with the user, so Github auth is used by default. The standalone CLI (or running the code-tunnel-insiders.exe directly) will be interactive.

@hunter86bg
Copy link

So, what is the exact process to start VS Code Server on a machine, so I can auth with AAD and to connect with a web browser to it ?

@joaomoreno
Copy link
Member

joaomoreno commented Oct 25, 2023

@connor4312 Preparing us to verify this would've been as easy as the following:


Verification steps:

Make sure code-insiders tunnel user login --provider microsoft logs the user into Microsoft and not GitHub.

@joaomoreno joaomoreno added the verified Verification succeeded label Oct 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality tunnels verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants