0

My Problem

I have multiple applications exposed via portforwarding on devtunnels through vscode server. I can access them perfectly fine, but one application needs to request another one, but it can't because its not authenticated (via github). So I dont know how to authenticate one application to access the devtunnels.ms website.

What I tried

I can access it from my browser (because I am authenticated). I tried to access on app from the other and its not working (I expected it to work, but I understand now why it doesnt work. But I dont get this problem solved alone...)

Longer and more detailed Text

Hello :)

I just setup a vscode server with the vscode cli tool via code tunnel. (https://code.visualstudio.com/docs/remote/tunnels) Everything is working fine, the ports are getting forwarded to https://<someid>-<port>.<region>.devtunnels.ms/ so I can access my Application from anywhere. On default those websites are secured, that you can only visit them when you are logged into github. My problem is now, that one Application should access content from the other Application - but it cannot access the app, because its not allowed (not logged into github). How can I allow my application to access my devtunnels.ms websites? On the following websites there are some informations about that topic, but not related to vscode server, instead to .NET and Visual Studio... Hope you understand - let me know if you need any more details or other description of the problem!

Thanks for your time and effort! Cheers!

Geilmaker
  • 471
  • 1
  • 7
  • When you create the tunnel you should set the access to the tunnel as public not private. https://learn.microsoft.com/en-us/aspnet/core/test/dev-tunnels?view=aspnetcore-7.0 – zerodoc Jul 28 '23 at 13:37
  • Thanks for your comment! Are you somehow experienced with vscode server? It's nice to know, that it's possible to have unsecured tunnels, but in my case I dont open any ports inside visual studio. VSCode Server just automatically opens these tunnels if I start an application on a specific port. But I can't find settings anywhere to modify this, neither change it to an unsecured tunnel or anything else. https://code.visualstudio.com/docs/remote/tunnels#_how-are-tunnels-secured seems like it's not possible to have an unauthenticated tunnel. – Geilmaker Jul 28 '23 at 15:01
  • I was hoping something like this would be possible, but I can't find a way to get a token from the tunnel/vscode server. https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/security#tunnel-access – Geilmaker Jul 28 '23 at 15:03
  • If you are looking for more control on the tunnel maybe use the dev tunnel CLI if you haven't already installed it. It seems to be more robust https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/get-started?tabs=windows. I do not have very much experience with dev tunnels and security I am using ngrok in which I pay for a tunnel but for testing dev tunnels works well for me. So public/private access is not one of my concerns. I would check over the documentation for the dev tunnels CLI. – zerodoc Aug 01 '23 at 14:30
  • Thanks! I will have a look into it, if I can do something "hacky". Normally I just use vscode cli and after using "code tunnel" it just runs the vscode server and automatically opens tunnels to opened ports. Nice behavior but it seems unconfigurable, or at least I can't find anything. I'll have a look if I can also run the devtunnels CLI and open those ports manually with the correct configuration. Thanks for the hint! – Geilmaker Aug 02 '23 at 09:47

0 Answers0