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/manager.go b/go/tunnels/manager.go
index 3ea47475..b316abb4 100644
--- a/go/tunnels/manager.go
+++ b/go/tunnels/manager.go
@@ -28,14 +28,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
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/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{
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/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/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,
};
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}`);
}