@@ -27,6 +27,11 @@ public class TunnelServiceProperties
2727 /// </summary>
2828 internal const string DevDnsName = "global.ci.tunnels.dev.api.visualstudio.com" ;
2929
30+ /// <summary>
31+ /// Default host name for the local tunnel service.
32+ /// </summary>
33+ internal const string LocalDnsName = "global.tunnels.local.api.visualstudio.com" ;
34+
3035 /// <summary>
3136 /// First-party app ID: `Visual Studio Tunnel Service`
3237 /// </summary>
@@ -46,14 +51,14 @@ public class TunnelServiceProperties
4651 internal const string PpeFirstPartyAppId = "54c45752-bacd-424a-b928-652f3eca2b18" ;
4752
4853 /// <summary>
49- /// Third-party app ID: ` DEV-VSTunnelService-3P`
54+ /// Third-party app ID for the DEV service environment.
5055 /// </summary>
5156 /// <remarks>
52- /// Used for authenticating AAD/MSA users, and service principals outside the AME tenant,
53- /// in the DEV service environment.
54- /// This is a 3P app registration in the Microsoft corp tenant, replacing the former 1P FPA .
57+ /// A 3PA registered in the test tenant, used for authenticating AAD/MSA users
58+ /// and service principals outside the AME tenant. Replaces the former 1P FPA
59+ /// (9c63851a) which was disabled .
5560 /// </remarks>
56- internal const string DevFirstPartyAppId = "906ce216-6f2e-40be-875d-7fe1a9bc288a " ;
61+ internal const string DevServiceAppId = "686ab1c6-3cd9-4a62-b228-4f71eaaaf53e " ;
5762
5863 /// <summary>
5964 /// Third-party app ID: `tunnels-prod-app-sp`
@@ -95,10 +100,28 @@ public class TunnelServiceProperties
95100 /// GitHub App Client ID for 'Visual Studio Tunnel Service - Test'
96101 /// </summary>
97102 /// <remarks>
98- /// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV
99- /// service environments.
103+ /// Used by client apps that authenticate tunnel users with GitHub, in the PPE
104+ /// service environment.
105+ /// </remarks>
106+ internal const string PpeGitHubAppClientId = "Iv1.b231c327f1eaa229" ;
107+
108+ /// <summary>
109+ /// GitHub App Client ID for 'Dev Tunnels Service - Dev'
110+ /// </summary>
111+ /// <remarks>
112+ /// Used by client apps that authenticate tunnel users with GitHub, in the DEV
113+ /// service environment.
100114 /// </remarks>
101- internal const string NonProdGitHubAppClientId = "Iv1.b231c327f1eaa229" ;
115+ internal const string DevGitHubAppClientId = "Iv23ctTiak9wLCiTcEbr" ;
116+
117+ /// <summary>
118+ /// GitHub App Client ID for 'Dev Tunnels Service - Local'
119+ /// </summary>
120+ /// <remarks>
121+ /// Used by client apps that authenticate tunnel users with GitHub, when running
122+ /// the service locally.
123+ /// </remarks>
124+ internal const string LocalGitHubAppClientId = "Iv23cttBYzKThF88PiPR" ;
102125
103126 private TunnelServiceProperties (
104127 string serviceUri ,
@@ -128,16 +151,29 @@ private TunnelServiceProperties(
128151 $ "https://{ PpeDnsName } /",
129152 PpeFirstPartyAppId ,
130153 PpeThirdPartyAppId ,
131- NonProdGitHubAppClientId ) ;
154+ PpeGitHubAppClientId ) ;
132155
133156 /// <summary>
134157 /// Gets properties for the service in the development environment.
135158 /// </summary>
136159 public static TunnelServiceProperties Development { get ; } = new TunnelServiceProperties (
137160 $ "https://{ DevDnsName } /",
138- DevFirstPartyAppId ,
161+ DevServiceAppId ,
162+ DevThirdPartyAppId ,
163+ DevGitHubAppClientId ) ;
164+
165+ /// <summary>
166+ /// Gets properties for the service when running locally.
167+ /// </summary>
168+ /// <remarks>
169+ /// Uses the same service app IDs as the development environment, but a different
170+ /// GitHub app with localhost callback URLs.
171+ /// </remarks>
172+ public static TunnelServiceProperties Local { get ; } = new TunnelServiceProperties (
173+ $ "https://{ LocalDnsName } /",
174+ DevServiceAppId ,
139175 DevThirdPartyAppId ,
140- NonProdGitHubAppClientId ) ;
176+ LocalGitHubAppClientId ) ;
141177
142178 /// <summary>
143179 /// Gets properties for the service in the specified environment.
@@ -157,6 +193,7 @@ public static TunnelServiceProperties Environment(string environmentName)
157193 "prod" or "production" => TunnelServiceProperties . Production ,
158194 "ppe" or "preprod" or "staging" => TunnelServiceProperties . Staging ,
159195 "dev" or "development" => TunnelServiceProperties . Development ,
196+ "local" => TunnelServiceProperties . Local ,
160197 _ => throw new ArgumentException ( $ "Invalid service environment: { environmentName } ") ,
161198 } ;
162199 }
0 commit comments