From 08cf2d62d71ea40babcdbe23cad9312bd3f3760f Mon Sep 17 00:00:00 2001 From: juanpacostaaa Date: Wed, 22 Apr 2026 13:49:40 -0700 Subject: [PATCH 1/5] Updated GitHub app ids for new apps and created new config for running service locally, and updated for all languages --- cs/src/Contracts/TunnelServiceProperties.cs | 54 ++++++++++++++++--- go/tunnels/tunnel_service_properties.go | 28 +++++++--- .../contracts/TunnelServiceProperties.java | 42 ++++++++++++--- rs/src/contracts/tunnel_service_properties.rs | 28 +++++++--- ts/src/contracts/tunnelServiceProperties.ts | 36 ++++++++++--- 5 files changed, 156 insertions(+), 32 deletions(-) diff --git a/cs/src/Contracts/TunnelServiceProperties.cs b/cs/src/Contracts/TunnelServiceProperties.cs index dfba0116..c4cc2c81 100644 --- a/cs/src/Contracts/TunnelServiceProperties.cs +++ b/cs/src/Contracts/TunnelServiceProperties.cs @@ -27,6 +27,11 @@ public class TunnelServiceProperties /// internal const string DevDnsName = "global.ci.tunnels.dev.api.visualstudio.com"; + /// + /// Default host name for the local tunnel service. + /// + internal const string LocalDnsName = "tunnels.local.api.visualstudio.com:9901"; + /// /// First-party app ID: `Visual Studio Tunnel Service` /// @@ -46,13 +51,14 @@ public class TunnelServiceProperties internal const string PpeFirstPartyAppId = "54c45752-bacd-424a-b928-652f3eca2b18"; /// - /// First-party app ID: `DEV-VSTunnels` + /// Third-party app ID: `DEV-VSTunnelService-3P` /// /// /// Used for authenticating AAD/MSA users, and service principals outside the AME tenant, - /// in the DEV service environment + /// in the DEV service environment. + /// This is a 3P app registration in the Microsoft corp tenant, replacing the former 1P FPA. /// - internal const string DevFirstPartyAppId = "9c63851a-ba2b-40a5-94bd-890be43b9284"; + internal const string DevFirstPartyAppId = "906ce216-6f2e-40be-875d-7fe1a9bc288a"; /// /// Third-party app ID: `tunnels-prod-app-sp` @@ -94,10 +100,28 @@ public class TunnelServiceProperties /// GitHub App Client ID for 'Visual Studio Tunnel Service - Test' /// /// - /// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV - /// service environments. + /// Used by client apps that authenticate tunnel users with GitHub, in the PPE + /// service environment. + /// + internal const string PpeGitHubAppClientId = "Iv1.b231c327f1eaa229"; + + /// + /// GitHub App Client ID for 'Dev Tunnels Service - Dev' + /// + /// + /// Used by client apps that authenticate tunnel users with GitHub, in the DEV + /// service environment. /// - internal const string NonProdGitHubAppClientId = "Iv1.b231c327f1eaa229"; + internal const string DevGitHubAppClientId = "Iv23ctTiak9wLCiTcEbr"; + + /// + /// GitHub App Client ID for 'Dev Tunnels Service - Local' + /// + /// + /// Used by client apps that authenticate tunnel users with GitHub, when running + /// the service locally. + /// + internal const string LocalGitHubAppClientId = "Iv23cttBYzKThF88PiPR"; private TunnelServiceProperties( string serviceUri, @@ -127,7 +151,7 @@ private TunnelServiceProperties( $"https://{PpeDnsName}/", PpeFirstPartyAppId, PpeThirdPartyAppId, - NonProdGitHubAppClientId); + PpeGitHubAppClientId); /// /// Gets properties for the service in the development environment. @@ -136,7 +160,20 @@ private TunnelServiceProperties( $"https://{DevDnsName}/", DevFirstPartyAppId, DevThirdPartyAppId, - NonProdGitHubAppClientId); + DevGitHubAppClientId); + + /// + /// Gets properties for the service when running locally. + /// + /// + /// Uses the same service app IDs as the development environment, but a different + /// GitHub app with localhost callback URLs. + /// + public static TunnelServiceProperties Local { get; } = new TunnelServiceProperties( + $"https://{LocalDnsName}/", + DevFirstPartyAppId, + DevThirdPartyAppId, + LocalGitHubAppClientId); /// /// Gets properties for the service in the specified environment. @@ -156,6 +193,7 @@ public static TunnelServiceProperties Environment(string environmentName) "prod" or "production" => TunnelServiceProperties.Production, "ppe" or "preprod" or "staging" => TunnelServiceProperties.Staging, "dev" or "development" => TunnelServiceProperties.Development, + "local" => TunnelServiceProperties.Local, _ => throw new ArgumentException($"Invalid service environment: {environmentName}"), }; } diff --git a/go/tunnels/tunnel_service_properties.go b/go/tunnels/tunnel_service_properties.go index 4429096b..cac6bd3b 100644 --- a/go/tunnels/tunnel_service_properties.go +++ b/go/tunnels/tunnel_service_properties.go @@ -38,6 +38,9 @@ var ppeDnsName = "global.rel.tunnels.ppe.api.visualstudio.com" // Global DNS name of the development tunnel service. var devDnsName = "global.ci.tunnels.dev.api.visualstudio.com" +// Default host name for the local tunnel service. +var localDnsName = "tunnels.local.api.visualstudio.com:9901" + // First-party app ID: `Visual Studio Tunnel Service` // // Used for authenticating AAD/MSA users, and service principals outside the AME tenant, @@ -50,11 +53,12 @@ var prodFirstPartyAppID = "46da2f7e-b5ef-422a-88d4-2a7f9de6a0b2" // in the PPE service environments. var ppeFirstPartyAppID = "54c45752-bacd-424a-b928-652f3eca2b18" -// First-party app ID: `DEV-VSTunnels` +// Third-party app ID: `DEV-VSTunnelService-3P` // // Used for authenticating AAD/MSA users, and service principals outside the AME tenant, -// in the DEV service environment -var devFirstPartyAppID = "9c63851a-ba2b-40a5-94bd-890be43b9284" +// in the DEV service environment. This is a 3P app registration in the Microsoft corp +// tenant, replacing the former 1P FPA. +var devFirstPartyAppID = "906ce216-6f2e-40be-875d-7fe1a9bc288a" // Third-party app ID: `tunnels-prod-app-sp` // @@ -82,6 +86,18 @@ var prodGitHubAppClientID = "Iv1.e7b89e013f801f03" // GitHub App Client ID for 'Visual Studio Tunnel Service - Test' // -// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV -// service environments. -var nonProdGitHubAppClientID = "Iv1.b231c327f1eaa229" +// Used by client apps that authenticate tunnel users with GitHub, in the PPE service +// environment. +var ppeGitHubAppClientID = "Iv1.b231c327f1eaa229" + +// GitHub App Client ID for 'Dev Tunnels Service - Dev' +// +// Used by client apps that authenticate tunnel users with GitHub, in the DEV service +// environment. +var devGitHubAppClientID = "Iv23ctTiak9wLCiTcEbr" + +// GitHub App Client ID for 'Dev Tunnels Service - Local' +// +// Used by client apps that authenticate tunnel users with GitHub, when running the +// service locally. +var localGitHubAppClientID = "Iv23cttBYzKThF88PiPR" diff --git a/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java b/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java index 375e8cad..82405f1a 100644 --- a/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java +++ b/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java @@ -32,6 +32,11 @@ public class TunnelServiceProperties { */ static final String devDnsName = "global.ci.tunnels.dev.api.visualstudio.com"; + /** + * Default host name for the local tunnel service. + */ + static final String localDnsName = "tunnels.local.api.visualstudio.com:9901"; + /** * First-party app ID: `Visual Studio Tunnel Service` * @@ -49,12 +54,13 @@ public class TunnelServiceProperties { static final String ppeFirstPartyAppId = "54c45752-bacd-424a-b928-652f3eca2b18"; /** - * First-party app ID: `DEV-VSTunnels` + * Third-party app ID: `DEV-VSTunnelService-3P` * * Used for authenticating AAD/MSA users, and service principals outside the AME - * tenant, in the DEV service environment + * tenant, in the DEV service environment. This is a 3P app registration in the + * Microsoft corp tenant, replacing the former 1P FPA. */ - static final String devFirstPartyAppId = "9c63851a-ba2b-40a5-94bd-890be43b9284"; + static final String devFirstPartyAppId = "906ce216-6f2e-40be-875d-7fe1a9bc288a"; /** * Third-party app ID: `tunnels-prod-app-sp` @@ -91,10 +97,26 @@ public class TunnelServiceProperties { /** * GitHub App Client ID for 'Visual Studio Tunnel Service - Test' * - * Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV - * service environments. + * Used by client apps that authenticate tunnel users with GitHub, in the PPE service + * environment. + */ + static final String ppeGitHubAppClientId = "Iv1.b231c327f1eaa229"; + + /** + * GitHub App Client ID for 'Dev Tunnels Service - Dev' + * + * Used by client apps that authenticate tunnel users with GitHub, in the DEV service + * environment. */ - static final String nonProdGitHubAppClientId = "Iv1.b231c327f1eaa229"; + static final String devGitHubAppClientId = "Iv23ctTiak9wLCiTcEbr"; + + /** + * GitHub App Client ID for 'Dev Tunnels Service - Local' + * + * Used by client apps that authenticate tunnel users with GitHub, when running the + * service locally. + */ + static final String localGitHubAppClientId = "Iv23cttBYzKThF88PiPR"; /** * Gets production service properties. @@ -111,6 +133,14 @@ public class TunnelServiceProperties { */ public static final TunnelServiceProperties development = TunnelServicePropertiesStatics.development; + /** + * Gets properties for the service when running locally. + * + * Uses the same service app IDs as the development environment, but a different + * GitHub app with localhost callback URLs. + */ + public static final TunnelServiceProperties local = TunnelServicePropertiesStatics.local; + /** * Gets the base URI of the service. */ diff --git a/rs/src/contracts/tunnel_service_properties.rs b/rs/src/contracts/tunnel_service_properties.rs index 6097876e..2f2f5285 100644 --- a/rs/src/contracts/tunnel_service_properties.rs +++ b/rs/src/contracts/tunnel_service_properties.rs @@ -40,6 +40,9 @@ pub const PPE_DNS_NAME: &str = "global.rel.tunnels.ppe.api.visualstudio.com"; // Global DNS name of the development tunnel service. pub const DEV_DNS_NAME: &str = "global.ci.tunnels.dev.api.visualstudio.com"; +// Default host name for the local tunnel service. +pub const LOCAL_DNS_NAME: &str = "tunnels.local.api.visualstudio.com:9901"; + // First-party app ID: `Visual Studio Tunnel Service` // // Used for authenticating AAD/MSA users, and service principals outside the AME tenant, @@ -52,11 +55,12 @@ pub const PROD_FIRST_PARTY_APP_ID: &str = "46da2f7e-b5ef-422a-88d4-2a7f9de6a0b2" // in the PPE service environments. pub const PPE_FIRST_PARTY_APP_ID: &str = "54c45752-bacd-424a-b928-652f3eca2b18"; -// First-party app ID: `DEV-VSTunnels` +// Third-party app ID: `DEV-VSTunnelService-3P` // // Used for authenticating AAD/MSA users, and service principals outside the AME tenant, -// in the DEV service environment -pub const DEV_FIRST_PARTY_APP_ID: &str = "9c63851a-ba2b-40a5-94bd-890be43b9284"; +// in the DEV service environment. This is a 3P app registration in the Microsoft corp +// tenant, replacing the former 1P FPA. +pub const DEV_FIRST_PARTY_APP_ID: &str = "906ce216-6f2e-40be-875d-7fe1a9bc288a"; // Third-party app ID: `tunnels-prod-app-sp` // @@ -84,6 +88,18 @@ pub const PROD_GITHUB_APP_CLIENT_ID: &str = "Iv1.e7b89e013f801f03"; // GitHub App Client ID for 'Visual Studio Tunnel Service - Test' // -// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV -// service environments. -pub const NON_PROD_GITHUB_APP_CLIENT_ID: &str = "Iv1.b231c327f1eaa229"; +// Used by client apps that authenticate tunnel users with GitHub, in the PPE service +// environment. +pub const PPE_GITHUB_APP_CLIENT_ID: &str = "Iv1.b231c327f1eaa229"; + +// GitHub App Client ID for 'Dev Tunnels Service - Dev' +// +// Used by client apps that authenticate tunnel users with GitHub, in the DEV service +// environment. +pub const DEV_GITHUB_APP_CLIENT_ID: &str = "Iv23ctTiak9wLCiTcEbr"; + +// GitHub App Client ID for 'Dev Tunnels Service - Local' +// +// Used by client apps that authenticate tunnel users with GitHub, when running the +// service locally. +pub const LOCAL_GITHUB_APP_CLIENT_ID: &str = "Iv23cttBYzKThF88PiPR"; diff --git a/ts/src/contracts/tunnelServiceProperties.ts b/ts/src/contracts/tunnelServiceProperties.ts index c80a81e2..521a5c01 100644 --- a/ts/src/contracts/tunnelServiceProperties.ts +++ b/ts/src/contracts/tunnelServiceProperties.ts @@ -53,6 +53,11 @@ export const ppeDnsName = 'global.rel.tunnels.ppe.api.visualstudio.com'; */ export const devDnsName = 'global.ci.tunnels.dev.api.visualstudio.com'; +/** + * Default host name for the local tunnel service. + */ +export const localDnsName = 'tunnels.local.api.visualstudio.com:9901'; + /** * First-party app ID: `Visual Studio Tunnel Service` * @@ -70,12 +75,13 @@ export const prodFirstPartyAppId = '46da2f7e-b5ef-422a-88d4-2a7f9de6a0b2'; export const ppeFirstPartyAppId = '54c45752-bacd-424a-b928-652f3eca2b18'; /** - * First-party app ID: `DEV-VSTunnels` + * Third-party app ID: `DEV-VSTunnelService-3P` * * Used for authenticating AAD/MSA users, and service principals outside the AME tenant, - * in the DEV service environment + * in the DEV service environment. This is a 3P app registration in the Microsoft corp + * tenant, replacing the former 1P FPA. */ -export const devFirstPartyAppId = '9c63851a-ba2b-40a5-94bd-890be43b9284'; +export const devFirstPartyAppId = '906ce216-6f2e-40be-875d-7fe1a9bc288a'; /** * Third-party app ID: `tunnels-prod-app-sp` @@ -112,10 +118,26 @@ export const prodGitHubAppClientId = 'Iv1.e7b89e013f801f03'; /** * GitHub App Client ID for 'Visual Studio Tunnel Service - Test' * - * Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV - * service environments. + * Used by client apps that authenticate tunnel users with GitHub, in the PPE service + * environment. + */ +export const ppeGitHubAppClientId = 'Iv1.b231c327f1eaa229'; + +/** + * GitHub App Client ID for 'Dev Tunnels Service - Dev' + * + * Used by client apps that authenticate tunnel users with GitHub, in the DEV service + * environment. + */ +export const devGitHubAppClientId = 'Iv23ctTiak9wLCiTcEbr'; + +/** + * GitHub App Client ID for 'Dev Tunnels Service - Local' + * + * Used by client apps that authenticate tunnel users with GitHub, when running the + * service locally. */ -export const nonProdGitHubAppClientId = 'Iv1.b231c327f1eaa229'; +export const localGitHubAppClientId = 'Iv23cttBYzKThF88PiPR'; // Import static members from a non-generated file, // and re-export them as an object with the same name as the interface. @@ -123,6 +145,7 @@ import { production, staging, development, + local, environment, } from './tunnelServicePropertiesStatics'; @@ -130,5 +153,6 @@ export const TunnelServiceProperties = { production, staging, development, + local, environment, }; From 8d9faa03be6561c21322bd2c4dfbe318ef54f20e Mon Sep 17 00:00:00 2001 From: juanpacostaaa Date: Wed, 22 Apr 2026 13:49:40 -0700 Subject: [PATCH 2/5] Updated GitHub app ids for new apps and created new config for running service locally, and updated for all languages --- cs/src/Contracts/TunnelServiceProperties.cs | 47 +++++++++++++++++-- go/tunnels/tunnel_service_properties.go | 21 +++++++-- .../contracts/TunnelServiceProperties.java | 35 ++++++++++++-- rs/src/contracts/tunnel_service_properties.rs | 21 +++++++-- ts/src/contracts/tunnelServiceProperties.ts | 29 ++++++++++-- 5 files changed, 136 insertions(+), 17 deletions(-) diff --git a/cs/src/Contracts/TunnelServiceProperties.cs b/cs/src/Contracts/TunnelServiceProperties.cs index 093cce4f..c4cc2c81 100644 --- a/cs/src/Contracts/TunnelServiceProperties.cs +++ b/cs/src/Contracts/TunnelServiceProperties.cs @@ -27,6 +27,11 @@ public class TunnelServiceProperties /// internal const string DevDnsName = "global.ci.tunnels.dev.api.visualstudio.com"; + /// + /// Default host name for the local tunnel service. + /// + internal const string LocalDnsName = "tunnels.local.api.visualstudio.com:9901"; + /// /// First-party app ID: `Visual Studio Tunnel Service` /// @@ -95,10 +100,28 @@ public class TunnelServiceProperties /// GitHub App Client ID for 'Visual Studio Tunnel Service - Test' /// /// - /// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV - /// service environments. + /// Used by client apps that authenticate tunnel users with GitHub, in the PPE + /// service environment. + /// + internal const string PpeGitHubAppClientId = "Iv1.b231c327f1eaa229"; + + /// + /// GitHub App Client ID for 'Dev Tunnels Service - Dev' + /// + /// + /// Used by client apps that authenticate tunnel users with GitHub, in the DEV + /// service environment. + /// + internal const string DevGitHubAppClientId = "Iv23ctTiak9wLCiTcEbr"; + + /// + /// GitHub App Client ID for 'Dev Tunnels Service - Local' + /// + /// + /// Used by client apps that authenticate tunnel users with GitHub, when running + /// the service locally. /// - internal const string NonProdGitHubAppClientId = "Iv1.b231c327f1eaa229"; + internal const string LocalGitHubAppClientId = "Iv23cttBYzKThF88PiPR"; private TunnelServiceProperties( string serviceUri, @@ -128,7 +151,7 @@ private TunnelServiceProperties( $"https://{PpeDnsName}/", PpeFirstPartyAppId, PpeThirdPartyAppId, - NonProdGitHubAppClientId); + PpeGitHubAppClientId); /// /// Gets properties for the service in the development environment. @@ -137,7 +160,20 @@ private TunnelServiceProperties( $"https://{DevDnsName}/", DevFirstPartyAppId, DevThirdPartyAppId, - NonProdGitHubAppClientId); + DevGitHubAppClientId); + + /// + /// Gets properties for the service when running locally. + /// + /// + /// Uses the same service app IDs as the development environment, but a different + /// GitHub app with localhost callback URLs. + /// + public static TunnelServiceProperties Local { get; } = new TunnelServiceProperties( + $"https://{LocalDnsName}/", + DevFirstPartyAppId, + DevThirdPartyAppId, + LocalGitHubAppClientId); /// /// Gets properties for the service in the specified environment. @@ -157,6 +193,7 @@ public static TunnelServiceProperties Environment(string environmentName) "prod" or "production" => TunnelServiceProperties.Production, "ppe" or "preprod" or "staging" => TunnelServiceProperties.Staging, "dev" or "development" => TunnelServiceProperties.Development, + "local" => TunnelServiceProperties.Local, _ => throw new ArgumentException($"Invalid service environment: {environmentName}"), }; } diff --git a/go/tunnels/tunnel_service_properties.go b/go/tunnels/tunnel_service_properties.go index bc2a59d0..cac6bd3b 100644 --- a/go/tunnels/tunnel_service_properties.go +++ b/go/tunnels/tunnel_service_properties.go @@ -38,6 +38,9 @@ var ppeDnsName = "global.rel.tunnels.ppe.api.visualstudio.com" // Global DNS name of the development tunnel service. var devDnsName = "global.ci.tunnels.dev.api.visualstudio.com" +// Default host name for the local tunnel service. +var localDnsName = "tunnels.local.api.visualstudio.com:9901" + // First-party app ID: `Visual Studio Tunnel Service` // // Used for authenticating AAD/MSA users, and service principals outside the AME tenant, @@ -83,6 +86,18 @@ var prodGitHubAppClientID = "Iv1.e7b89e013f801f03" // GitHub App Client ID for 'Visual Studio Tunnel Service - Test' // -// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV -// service environments. -var nonProdGitHubAppClientID = "Iv1.b231c327f1eaa229" +// Used by client apps that authenticate tunnel users with GitHub, in the PPE service +// environment. +var ppeGitHubAppClientID = "Iv1.b231c327f1eaa229" + +// GitHub App Client ID for 'Dev Tunnels Service - Dev' +// +// Used by client apps that authenticate tunnel users with GitHub, in the DEV service +// environment. +var devGitHubAppClientID = "Iv23ctTiak9wLCiTcEbr" + +// GitHub App Client ID for 'Dev Tunnels Service - Local' +// +// Used by client apps that authenticate tunnel users with GitHub, when running the +// service locally. +var localGitHubAppClientID = "Iv23cttBYzKThF88PiPR" diff --git a/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java b/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java index 9eec5cda..82405f1a 100644 --- a/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java +++ b/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServiceProperties.java @@ -32,6 +32,11 @@ public class TunnelServiceProperties { */ static final String devDnsName = "global.ci.tunnels.dev.api.visualstudio.com"; + /** + * Default host name for the local tunnel service. + */ + static final String localDnsName = "tunnels.local.api.visualstudio.com:9901"; + /** * First-party app ID: `Visual Studio Tunnel Service` * @@ -92,10 +97,26 @@ public class TunnelServiceProperties { /** * GitHub App Client ID for 'Visual Studio Tunnel Service - Test' * - * Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV - * service environments. + * Used by client apps that authenticate tunnel users with GitHub, in the PPE service + * environment. + */ + static final String ppeGitHubAppClientId = "Iv1.b231c327f1eaa229"; + + /** + * GitHub App Client ID for 'Dev Tunnels Service - Dev' + * + * Used by client apps that authenticate tunnel users with GitHub, in the DEV service + * environment. */ - static final String nonProdGitHubAppClientId = "Iv1.b231c327f1eaa229"; + static final String devGitHubAppClientId = "Iv23ctTiak9wLCiTcEbr"; + + /** + * GitHub App Client ID for 'Dev Tunnels Service - Local' + * + * Used by client apps that authenticate tunnel users with GitHub, when running the + * service locally. + */ + static final String localGitHubAppClientId = "Iv23cttBYzKThF88PiPR"; /** * Gets production service properties. @@ -112,6 +133,14 @@ public class TunnelServiceProperties { */ public static final TunnelServiceProperties development = TunnelServicePropertiesStatics.development; + /** + * Gets properties for the service when running locally. + * + * Uses the same service app IDs as the development environment, but a different + * GitHub app with localhost callback URLs. + */ + public static final TunnelServiceProperties local = TunnelServicePropertiesStatics.local; + /** * Gets the base URI of the service. */ diff --git a/rs/src/contracts/tunnel_service_properties.rs b/rs/src/contracts/tunnel_service_properties.rs index 529cb049..2f2f5285 100644 --- a/rs/src/contracts/tunnel_service_properties.rs +++ b/rs/src/contracts/tunnel_service_properties.rs @@ -40,6 +40,9 @@ pub const PPE_DNS_NAME: &str = "global.rel.tunnels.ppe.api.visualstudio.com"; // Global DNS name of the development tunnel service. pub const DEV_DNS_NAME: &str = "global.ci.tunnels.dev.api.visualstudio.com"; +// Default host name for the local tunnel service. +pub const LOCAL_DNS_NAME: &str = "tunnels.local.api.visualstudio.com:9901"; + // First-party app ID: `Visual Studio Tunnel Service` // // Used for authenticating AAD/MSA users, and service principals outside the AME tenant, @@ -85,6 +88,18 @@ pub const PROD_GITHUB_APP_CLIENT_ID: &str = "Iv1.e7b89e013f801f03"; // GitHub App Client ID for 'Visual Studio Tunnel Service - Test' // -// Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV -// service environments. -pub const NON_PROD_GITHUB_APP_CLIENT_ID: &str = "Iv1.b231c327f1eaa229"; +// Used by client apps that authenticate tunnel users with GitHub, in the PPE service +// environment. +pub const PPE_GITHUB_APP_CLIENT_ID: &str = "Iv1.b231c327f1eaa229"; + +// GitHub App Client ID for 'Dev Tunnels Service - Dev' +// +// Used by client apps that authenticate tunnel users with GitHub, in the DEV service +// environment. +pub const DEV_GITHUB_APP_CLIENT_ID: &str = "Iv23ctTiak9wLCiTcEbr"; + +// GitHub App Client ID for 'Dev Tunnels Service - Local' +// +// Used by client apps that authenticate tunnel users with GitHub, when running the +// service locally. +pub const LOCAL_GITHUB_APP_CLIENT_ID: &str = "Iv23cttBYzKThF88PiPR"; diff --git a/ts/src/contracts/tunnelServiceProperties.ts b/ts/src/contracts/tunnelServiceProperties.ts index 379ec3f6..521a5c01 100644 --- a/ts/src/contracts/tunnelServiceProperties.ts +++ b/ts/src/contracts/tunnelServiceProperties.ts @@ -53,6 +53,11 @@ export const ppeDnsName = 'global.rel.tunnels.ppe.api.visualstudio.com'; */ export const devDnsName = 'global.ci.tunnels.dev.api.visualstudio.com'; +/** + * Default host name for the local tunnel service. + */ +export const localDnsName = 'tunnels.local.api.visualstudio.com:9901'; + /** * First-party app ID: `Visual Studio Tunnel Service` * @@ -113,10 +118,26 @@ export const prodGitHubAppClientId = 'Iv1.e7b89e013f801f03'; /** * GitHub App Client ID for 'Visual Studio Tunnel Service - Test' * - * Used by client apps that authenticate tunnel users with GitHub, in the PPE and DEV - * service environments. + * Used by client apps that authenticate tunnel users with GitHub, in the PPE service + * environment. + */ +export const ppeGitHubAppClientId = 'Iv1.b231c327f1eaa229'; + +/** + * GitHub App Client ID for 'Dev Tunnels Service - Dev' + * + * Used by client apps that authenticate tunnel users with GitHub, in the DEV service + * environment. + */ +export const devGitHubAppClientId = 'Iv23ctTiak9wLCiTcEbr'; + +/** + * GitHub App Client ID for 'Dev Tunnels Service - Local' + * + * Used by client apps that authenticate tunnel users with GitHub, when running the + * service locally. */ -export const nonProdGitHubAppClientId = 'Iv1.b231c327f1eaa229'; +export const localGitHubAppClientId = 'Iv23cttBYzKThF88PiPR'; // Import static members from a non-generated file, // and re-export them as an object with the same name as the interface. @@ -124,6 +145,7 @@ import { production, staging, development, + local, environment, } from './tunnelServicePropertiesStatics'; @@ -131,5 +153,6 @@ export const TunnelServiceProperties = { production, staging, development, + local, environment, }; From 3fd251c8c5d90b7f86d2dd6f5e6b89e0cc0b8cf3 Mon Sep 17 00:00:00 2001 From: juanpacostaaa Date: Wed, 22 Apr 2026 13:57:12 -0700 Subject: [PATCH 3/5] Added go manager changes for new app ids that isn't generated --- go/tunnels/manager.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/go/tunnels/manager.go b/go/tunnels/manager.go index 9227fb76..99bd9510 100644 --- a/go/tunnels/manager.go +++ b/go/tunnels/manager.go @@ -27,14 +27,23 @@ var PpeServiceProperties = TunnelServiceProperties{ ServiceURI: fmt.Sprintf("https://%s/", ppeDnsName), ServiceAppID: ppeFirstPartyAppID, ServiceInternalAppID: ppeThirdPartyAppID, - GitHubAppClientID: nonProdGitHubAppClientID, + GitHubAppClientID: ppeGitHubAppClientID, } var DevServiceProperties = TunnelServiceProperties{ ServiceURI: fmt.Sprintf("https://%s/", devDnsName), ServiceAppID: devFirstPartyAppID, ServiceInternalAppID: devThirdPartyAppID, - GitHubAppClientID: nonProdGitHubAppClientID, + GitHubAppClientID: devGitHubAppClientID, +} + +// LocalServiceProperties uses the same service app IDs as the development environment, +// but a different GitHub app with localhost callback URLs. +var LocalServiceProperties = TunnelServiceProperties{ + ServiceURI: fmt.Sprintf("https://%s/", localDnsName), + ServiceAppID: devFirstPartyAppID, + ServiceInternalAppID: devThirdPartyAppID, + GitHubAppClientID: localGitHubAppClientID, } type tokenProviderfn func() string From 5d5448ae9de23510c9999b3a4930c22a767146c3 Mon Sep 17 00:00:00 2001 From: juanpacostaaa Date: Wed, 22 Apr 2026 13:59:21 -0700 Subject: [PATCH 4/5] Bumped tunnels sdk version for go for github app id changes --- go/tunnels/tunnels.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/tunnels/tunnels.go b/go/tunnels/tunnels.go index fc6953f2..2d8c7ee8 100644 --- a/go/tunnels/tunnels.go +++ b/go/tunnels/tunnels.go @@ -10,7 +10,7 @@ import ( "github.com/rodaine/table" ) -const PackageVersion = "0.1.23" +const PackageVersion = "0.1.24" func (tunnel *Tunnel) requestObject() (*Tunnel, error) { convertedTunnel := &Tunnel{ From 4c6a915359f7f787eda471eec8c2227509ec9549 Mon Sep 17 00:00:00 2001 From: juanpacostaaa Date: Wed, 22 Apr 2026 14:10:24 -0700 Subject: [PATCH 5/5] Modified and commited non-generated files for ts, rust, and java --- .../TunnelServicePropertiesStatics.java | 18 ++++++++++++-- rs/src/contracts/tunnel_environments.rs | 15 +++++++++--- .../tunnelServicePropertiesStatics.ts | 24 ++++++++++++++++--- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServicePropertiesStatics.java b/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServicePropertiesStatics.java index 1ce3c514..51cf2167 100644 --- a/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServicePropertiesStatics.java +++ b/java/src/main/java/com/microsoft/tunnels/contracts/TunnelServicePropertiesStatics.java @@ -24,7 +24,7 @@ class TunnelServicePropertiesStatics { "https://" + TunnelServiceProperties.ppeDnsName + "/", TunnelServiceProperties.ppeFirstPartyAppId, TunnelServiceProperties.ppeThirdPartyAppId, - TunnelServiceProperties.nonProdGitHubAppClientId); + TunnelServiceProperties.ppeGitHubAppClientId); /** * Gets properties for the service in the development environment. @@ -33,7 +33,19 @@ class TunnelServicePropertiesStatics { "https://" + TunnelServiceProperties.devDnsName + "/", TunnelServiceProperties.devFirstPartyAppId, TunnelServiceProperties.devThirdPartyAppId, - TunnelServiceProperties.nonProdGitHubAppClientId); + TunnelServiceProperties.devGitHubAppClientId); + + /** + * Gets properties for the service when running locally. + * + * Uses the same service app IDs as the development environment, but a different + * GitHub app with localhost callback URLs. + */ + static final TunnelServiceProperties local = new TunnelServiceProperties( + "https://" + TunnelServiceProperties.localDnsName + "/", + TunnelServiceProperties.devFirstPartyAppId, + TunnelServiceProperties.devThirdPartyAppId, + TunnelServiceProperties.localGitHubAppClientId); public static TunnelServiceProperties environment(String environmentName) { if (StringUtils.isBlank(environmentName)) { @@ -51,6 +63,8 @@ public static TunnelServiceProperties environment(String environmentName) { case "dev": case "development": return TunnelServiceProperties.development; + case "local": + return TunnelServiceProperties.local; default: throw new IllegalArgumentException("Invalid service environment: " + environmentName); } diff --git a/rs/src/contracts/tunnel_environments.rs b/rs/src/contracts/tunnel_environments.rs index cfd00c0f..e6b6d55d 100644 --- a/rs/src/contracts/tunnel_environments.rs +++ b/rs/src/contracts/tunnel_environments.rs @@ -15,9 +15,9 @@ pub fn env_production() -> TunnelServiceProperties { pub fn env_staging() -> TunnelServiceProperties { TunnelServiceProperties { service_uri: format!("https://{}", PPE_DNS_NAME), - service_app_id: PROD_FIRST_PARTY_APP_ID.to_owned(), + service_app_id: PPE_FIRST_PARTY_APP_ID.to_owned(), service_internal_app_id: PPE_THIRD_PARTY_APP_ID.to_owned(), - github_app_client_id: NON_PROD_GITHUB_APP_CLIENT_ID.to_owned(), + github_app_client_id: PPE_GITHUB_APP_CLIENT_ID.to_owned(), } } @@ -26,6 +26,15 @@ pub fn env_development() -> TunnelServiceProperties { service_uri: format!("https://{}", DEV_DNS_NAME), service_app_id: DEV_FIRST_PARTY_APP_ID.to_owned(), service_internal_app_id: DEV_THIRD_PARTY_APP_ID.to_owned(), - github_app_client_id: NON_PROD_GITHUB_APP_CLIENT_ID.to_owned(), + github_app_client_id: DEV_GITHUB_APP_CLIENT_ID.to_owned(), + } +} + +pub fn env_local() -> TunnelServiceProperties { + TunnelServiceProperties { + service_uri: format!("https://{}", LOCAL_DNS_NAME), + service_app_id: DEV_FIRST_PARTY_APP_ID.to_owned(), + service_internal_app_id: DEV_THIRD_PARTY_APP_ID.to_owned(), + github_app_client_id: LOCAL_GITHUB_APP_CLIENT_ID.to_owned(), } } diff --git a/ts/src/contracts/tunnelServicePropertiesStatics.ts b/ts/src/contracts/tunnelServicePropertiesStatics.ts index 2f715fcc..b9359b10 100644 --- a/ts/src/contracts/tunnelServicePropertiesStatics.ts +++ b/ts/src/contracts/tunnelServicePropertiesStatics.ts @@ -10,10 +10,13 @@ import { ppeThirdPartyAppId, devThirdPartyAppId, prodGitHubAppClientId, - nonProdGitHubAppClientId, + ppeGitHubAppClientId, + devGitHubAppClientId, + localGitHubAppClientId, prodDnsName, ppeDnsName, devDnsName, + localDnsName, } from './tunnelServiceProperties'; /** @@ -33,7 +36,7 @@ export const staging = { serviceUri: `https://${ppeDnsName}/`, serviceAppId: ppeFirstPartyAppId, serviceInternalAppId: ppeThirdPartyAppId, - gitHubAppClientId: nonProdGitHubAppClientId, + gitHubAppClientId: ppeGitHubAppClientId, }; /** @@ -43,7 +46,20 @@ export const development = { serviceUri: `https://${devDnsName}/`, serviceAppId: devFirstPartyAppId, serviceInternalAppId: devThirdPartyAppId, - gitHubAppClientId: nonProdGitHubAppClientId, + gitHubAppClientId: devGitHubAppClientId, +}; + +/** + * Gets properties for the service when running locally. + * + * Uses the same service app IDs as the development environment, but a different + * GitHub app with localhost callback URLs. + */ +export const local = { + serviceUri: `https://${localDnsName}/`, + serviceAppId: devFirstPartyAppId, + serviceInternalAppId: devThirdPartyAppId, + gitHubAppClientId: localGitHubAppClientId, }; /** @@ -64,6 +80,8 @@ export function environment(environmentName: string): ITunnelServiceProperties { case 'dev': case 'development': return development; + case 'local': + return local; default: throw new Error(`Invalid service environment: ${environmentName}`); }