diff --git a/ExternalConnectors/TSS/TSS.ico b/ExternalConnectors/DSS/DSS.ico
similarity index 100%
rename from ExternalConnectors/TSS/TSS.ico
rename to ExternalConnectors/DSS/DSS.ico
diff --git a/ExternalConnectors/TSS/SSConnectionForm.Designer.cs b/ExternalConnectors/DSS/SSConnectionForm.Designer.cs
similarity index 85%
rename from ExternalConnectors/TSS/SSConnectionForm.Designer.cs
rename to ExternalConnectors/DSS/SSConnectionForm.Designer.cs
index 3297034ba..d3ee1bad5 100644
--- a/ExternalConnectors/TSS/SSConnectionForm.Designer.cs
+++ b/ExternalConnectors/DSS/SSConnectionForm.Designer.cs
@@ -1,4 +1,4 @@
-namespace ExternalConnectors.TSS
+namespace ExternalConnectors.DSS
{
partial class SSConnectionForm
{
@@ -51,29 +51,29 @@
// tbSSURL
//
this.tbSSURL.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tbSSURL.Location = new System.Drawing.Point(260, 4);
- this.tbSSURL.Margin = new System.Windows.Forms.Padding(4);
+ this.tbSSURL.Location = new System.Drawing.Point(298, 5);
+ this.tbSSURL.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tbSSURL.Name = "tbSSURL";
- this.tbSSURL.Size = new System.Drawing.Size(536, 23);
+ this.tbSSURL.Size = new System.Drawing.Size(611, 27);
this.tbSSURL.TabIndex = 0;
//
// tbUsername
//
this.tbUsername.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tbUsername.Location = new System.Drawing.Point(260, 35);
- this.tbUsername.Margin = new System.Windows.Forms.Padding(4);
+ this.tbUsername.Location = new System.Drawing.Point(298, 47);
+ this.tbUsername.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tbUsername.Name = "tbUsername";
- this.tbUsername.Size = new System.Drawing.Size(536, 23);
+ this.tbUsername.Size = new System.Drawing.Size(611, 27);
this.tbUsername.TabIndex = 2;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.label3.Location = new System.Drawing.Point(4, 62);
- this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label3.Location = new System.Drawing.Point(5, 84);
+ this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(248, 31);
+ this.label3.Size = new System.Drawing.Size(283, 42);
this.label3.TabIndex = 5;
this.label3.Text = "Password";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -81,10 +81,10 @@
// tbPassword
//
this.tbPassword.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tbPassword.Location = new System.Drawing.Point(260, 66);
- this.tbPassword.Margin = new System.Windows.Forms.Padding(4);
+ this.tbPassword.Location = new System.Drawing.Point(298, 89);
+ this.tbPassword.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tbPassword.Name = "tbPassword";
- this.tbPassword.Size = new System.Drawing.Size(536, 23);
+ this.tbPassword.Size = new System.Drawing.Size(611, 27);
this.tbPassword.TabIndex = 4;
this.tbPassword.UseSystemPasswordChar = true;
//
@@ -92,10 +92,10 @@
//
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.btnOK.Location = new System.Drawing.Point(296, 12);
- this.btnOK.Margin = new System.Windows.Forms.Padding(4);
+ this.btnOK.Location = new System.Drawing.Point(337, 16);
+ this.btnOK.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.btnOK.Name = "btnOK";
- this.btnOK.Size = new System.Drawing.Size(88, 26);
+ this.btnOK.Size = new System.Drawing.Size(101, 35);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
@@ -104,10 +104,10 @@
//
this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnCancel.Location = new System.Drawing.Point(415, 12);
- this.btnCancel.Margin = new System.Windows.Forms.Padding(4);
+ this.btnCancel.Location = new System.Drawing.Point(474, 16);
+ this.btnCancel.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.btnCancel.Name = "btnCancel";
- this.btnCancel.Size = new System.Drawing.Size(88, 26);
+ this.btnCancel.Size = new System.Drawing.Size(101, 35);
this.btnCancel.TabIndex = 11;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
@@ -129,7 +129,7 @@
this.tableLayoutPanel1.Controls.Add(this.tbOTP, 1, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
- this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
+ this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
@@ -137,17 +137,17 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 159);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(914, 212);
this.tableLayoutPanel1.TabIndex = 12;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
- this.label5.Location = new System.Drawing.Point(260, 124);
- this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label5.Location = new System.Drawing.Point(298, 168);
+ this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(536, 35);
+ this.label5.Size = new System.Drawing.Size(611, 44);
this.label5.TabIndex = 15;
this.label5.Text = "For SSO to work, additional IIS configuration is required!";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -156,10 +156,10 @@
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.label1.Location = new System.Drawing.Point(4, 0);
- this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label1.Location = new System.Drawing.Point(5, 0);
+ this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(248, 31);
+ this.label1.Size = new System.Drawing.Size(283, 42);
this.label1.TabIndex = 2;
this.label1.Text = "Secret Server URL";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -168,10 +168,10 @@
//
this.label2.AutoSize = true;
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.label2.Location = new System.Drawing.Point(4, 31);
- this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label2.Location = new System.Drawing.Point(5, 42);
+ this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(248, 31);
+ this.label2.Size = new System.Drawing.Size(283, 42);
this.label2.TabIndex = 4;
this.label2.Text = "DOMAIN\\Username";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -179,10 +179,10 @@
// cbUseSSO
//
this.cbUseSSO.AutoSize = true;
- this.cbUseSSO.Location = new System.Drawing.Point(4, 128);
- this.cbUseSSO.Margin = new System.Windows.Forms.Padding(4, 4, 4, 0);
+ this.cbUseSSO.Location = new System.Drawing.Point(5, 173);
+ this.cbUseSSO.Margin = new System.Windows.Forms.Padding(5, 5, 5, 0);
this.cbUseSSO.Name = "cbUseSSO";
- this.cbUseSSO.Size = new System.Drawing.Size(69, 19);
+ this.cbUseSSO.Size = new System.Drawing.Size(86, 24);
this.cbUseSSO.TabIndex = 14;
this.cbUseSSO.Text = "Use SSO";
this.cbUseSSO.UseVisualStyleBackColor = true;
@@ -192,47 +192,48 @@
//
this.label6.AutoSize = true;
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
- this.label6.Location = new System.Drawing.Point(3, 93);
+ this.label6.Location = new System.Drawing.Point(3, 126);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(250, 31);
+ this.label6.Size = new System.Drawing.Size(287, 42);
this.label6.TabIndex = 15;
this.label6.Text = "2FA OTP (Optional)";
//
// tbOTP
//
this.tbOTP.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tbOTP.Location = new System.Drawing.Point(259, 96);
+ this.tbOTP.Location = new System.Drawing.Point(296, 130);
+ this.tbOTP.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tbOTP.Name = "tbOTP";
- this.tbOTP.Size = new System.Drawing.Size(538, 23);
+ this.tbOTP.Size = new System.Drawing.Size(615, 27);
this.tbOTP.TabIndex = 5;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 5;
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 106F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 23F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 26F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 107F));
this.tableLayoutPanel2.Controls.Add(this.btnOK, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.btnCancel, 3, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 225);
- this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4);
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 300);
+ this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel2.Size = new System.Drawing.Size(800, 50);
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(914, 67);
this.tableLayoutPanel2.TabIndex = 13;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
- this.label4.Location = new System.Drawing.Point(0, 159);
- this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label4.Location = new System.Drawing.Point(0, 212);
+ this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(341, 15);
+ this.label4.Size = new System.Drawing.Size(427, 20);
this.label4.TabIndex = 14;
this.label4.Text = "URL is the base URL, like https://cred.domain.local/SecretServer";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -240,14 +241,14 @@
// SSConnectionForm
//
this.AcceptButton = this.btnOK;
- this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 275);
+ this.ClientSize = new System.Drawing.Size(914, 367);
this.Controls.Add(this.label4);
this.Controls.Add(this.tableLayoutPanel2);
this.Controls.Add(this.tableLayoutPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.Margin = new System.Windows.Forms.Padding(4);
+ this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.Name = "SSConnectionForm";
this.Text = "Secret Server API Login Data";
this.Activated += new System.EventHandler(this.SSConnectionForm_Activated);
diff --git a/ExternalConnectors/TSS/SSConnectionForm.cs b/ExternalConnectors/DSS/SSConnectionForm.cs
similarity index 95%
rename from ExternalConnectors/TSS/SSConnectionForm.cs
rename to ExternalConnectors/DSS/SSConnectionForm.cs
index fb209117d..604961acc 100644
--- a/ExternalConnectors/TSS/SSConnectionForm.cs
+++ b/ExternalConnectors/DSS/SSConnectionForm.cs
@@ -1,4 +1,4 @@
-namespace ExternalConnectors.TSS
+namespace ExternalConnectors.DSS
{
public partial class SSConnectionForm : Form
{
diff --git a/ExternalConnectors/TSS/SSConnectionForm.resx b/ExternalConnectors/DSS/SSConnectionForm.resx
similarity index 100%
rename from ExternalConnectors/TSS/SSConnectionForm.resx
rename to ExternalConnectors/DSS/SSConnectionForm.resx
diff --git a/ExternalConnectors/TSS/SecretServerAuthentication.cs b/ExternalConnectors/DSS/SecretServerAuthentication.cs
similarity index 99%
rename from ExternalConnectors/TSS/SecretServerAuthentication.cs
rename to ExternalConnectors/DSS/SecretServerAuthentication.cs
index c41922224..d03141d78 100644
--- a/ExternalConnectors/TSS/SecretServerAuthentication.cs
+++ b/ExternalConnectors/DSS/SecretServerAuthentication.cs
@@ -12,7 +12,7 @@
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
-namespace SecretServerAuthentication.TSS
+namespace SecretServerAuthentication.DSS
{
using System = global::System;
diff --git a/ExternalConnectors/TSS/SecretServerInterface.cs b/ExternalConnectors/DSS/SecretServerInterface.cs
similarity index 96%
rename from ExternalConnectors/TSS/SecretServerInterface.cs
rename to ExternalConnectors/DSS/SecretServerInterface.cs
index 5129e4886..767ec4ded 100644
--- a/ExternalConnectors/TSS/SecretServerInterface.cs
+++ b/ExternalConnectors/DSS/SecretServerInterface.cs
@@ -1,8 +1,8 @@
using Microsoft.Win32;
-using SecretServerAuthentication.TSS;
-using SecretServerRestClient.TSS;
+using SecretServerAuthentication.DSS;
+using SecretServerRestClient.DSS;
-namespace ExternalConnectors.TSS
+namespace ExternalConnectors.DSS
{
public class SecretServerInterface
{
@@ -236,13 +236,11 @@ namespace ExternalConnectors.TSS
- // input must be in form "SSAPI:xxxx" where xxx is the secret id to fetch
+ // input must be the secret id to fetch
public static void FetchSecretFromServer(string input, out string username, out string password, out string domain)
{
// get secret id
- if (!input.StartsWith("SSAPI:"))
- throw new Exception("calling this function requires SSAPI: input");
- int secretID = Int32.Parse(input.Substring(6));
+ int secretID = Int32.Parse(input);
// init connection credentials, display popup if necessary
SSConnectionData.Init();
diff --git a/ExternalConnectors/TSS/SecretServerRestClient.cs b/ExternalConnectors/DSS/SecretServerRestClient.cs
similarity index 99%
rename from ExternalConnectors/TSS/SecretServerRestClient.cs
rename to ExternalConnectors/DSS/SecretServerRestClient.cs
index 47c0d4834..614088df8 100644
--- a/ExternalConnectors/TSS/SecretServerRestClient.cs
+++ b/ExternalConnectors/DSS/SecretServerRestClient.cs
@@ -12,7 +12,7 @@
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
-namespace SecretServerRestClient.TSS
+namespace SecretServerRestClient.DSS
{
using System = global::System;
diff --git a/ExternalConnectors/ExternalConnectors.csproj b/ExternalConnectors/ExternalConnectors.csproj
index 9b4b32369..4e3414033 100644
--- a/ExternalConnectors/ExternalConnectors.csproj
+++ b/ExternalConnectors/ExternalConnectors.csproj
@@ -20,7 +20,7 @@
Form
-
+
Form
diff --git a/mRemoteNG/App.config b/mRemoteNG/App.config
new file mode 100644
index 000000000..49cc43e1d
--- /dev/null
+++ b/mRemoteNG/App.config
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs
index 82b6eee74..d156e0369 100644
--- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs
+++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Connection;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
@@ -186,13 +187,25 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
? connectionCsv[headers.IndexOf("RDGatewayDomain")]
: "";
+ connectionRecord.RDGatewayHostname = headers.Contains("RDGatewayHostname")
+ ? connectionCsv[headers.IndexOf("RDGatewayHostname")]
+ : "";
+
+ if (headers.Contains("RDGatewayExternalCredentialProvider"))
+ {
+ if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayExternalCredentialProvider")], out ExternalCredentialProvider value))
+ connectionRecord.RDGatewayExternalCredentialProvider = value;
+ }
+
+ connectionRecord.RDGatewayUserViaAPI = headers.Contains("RDGatewayUserViaAPI")
+ ? connectionCsv[headers.IndexOf("RDGatewayUserViaAPI")]
+ : "";
+
+
connectionRecord.VNCProxyIP = headers.Contains("VNCProxyIP")
? connectionCsv[headers.IndexOf("VNCProxyIP")]
: "";
- connectionRecord.RDGatewayHostname = headers.Contains("RDGatewayHostname")
- ? connectionCsv[headers.IndexOf("RDGatewayHostname")]
- : "";
connectionRecord.RDPStartProgram = headers.Contains("RDPStartProgram")
? connectionCsv[headers.IndexOf("RDPStartProgram")]
@@ -453,6 +466,16 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
if (Enum.TryParse(connectionCsv[headers.IndexOf("RdpVersion")], true, out RdpVersion version))
connectionRecord.RdpVersion = version;
}
+ if (headers.Contains("ExternalCredentialProvider"))
+ {
+ if (Enum.TryParse(connectionCsv[headers.IndexOf("ExternalCredentialProvider")], out ExternalCredentialProvider value))
+ connectionRecord.ExternalCredentialProvider = value;
+ }
+ if (headers.Contains("ExternalAddressProvider"))
+ {
+ if (Enum.TryParse(connectionCsv[headers.IndexOf("ExternalAddressProvider")], out ExternalAddressProvider value))
+ connectionRecord.ExternalAddressProvider = value;
+ }
#region Inheritance
@@ -679,6 +702,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
connectionRecord.Inheritance.RenderingEngine = value;
}
+ if (headers.Contains("InheritExternalCredentialProvider"))
+ {
+ if (bool.TryParse(connectionCsv[headers.IndexOf("InheritExternalCredentialProvider")], out bool value))
+ connectionRecord.Inheritance.ExternalCredentialProvider = value;
+ }
if (headers.Contains("InheritUserViaAPI"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUserViaAPI")], out bool value))
@@ -854,6 +882,18 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
connectionRecord.Inheritance.RDGatewayDomain = value;
}
+ if (headers.Contains("InheritRDGatewayExternalCredentialProvider"))
+ {
+ if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayExternalCredentialProvider")], out bool value))
+ connectionRecord.Inheritance.RDGatewayExternalCredentialProvider = value;
+ }
+ if (headers.Contains("InheritRDGatewayUserViaAPI"))
+ {
+ if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayUserViaAPI")], out bool value))
+ connectionRecord.Inheritance.RDGatewayUserViaAPI = value;
+ }
+
+
if (headers.Contains("InheritRDPAlertIdleTimeout"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDPAlertIdleTimeout")], out bool value))
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs
index 9fd37322e..cd221ef54 100644
--- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs
+++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs
@@ -61,7 +61,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
"CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
"VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" +
- "RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;");
+ "RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RDGatewayExternalCredentialProvider;RDGatewayUserViaAPI;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;ExternalCredentialProvider;ExternalAddressProvider;");
if (_saveFilter.SaveInheritance)
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
@@ -73,8 +73,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
"InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
"InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" +
- "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;InheritUserViaAPI;" +
- "InheritRedirectAudioCapture;InheritRdpVersion");
+ "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDGatewayExternalCredentialProvider;InheritRDGatewayUserViaAPI;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;InheritUserViaAPI;" +
+ "InheritRedirectAudioCapture;InheritRdpVersion;InheritExternalCredentialProvider");
}
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
@@ -174,13 +174,18 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
.Append(FormatForCsv(con.RDGatewayUsername))
.Append(FormatForCsv(con.RDGatewayPassword))
.Append(FormatForCsv(con.RDGatewayDomain))
+ .Append(FormatForCsv(con.RDGatewayExternalCredentialProvider))
+ .Append(FormatForCsv(con.RDGatewayUserViaAPI))
.Append(FormatForCsv(con.RedirectAudioCapture))
.Append(FormatForCsv(con.RdpVersion))
.Append(FormatForCsv(con.RDPStartProgram))
.Append(FormatForCsv(con.RDPStartProgramWorkDir))
.Append(FormatForCsv(con.UserViaAPI))
.Append(FormatForCsv(con.EC2InstanceId))
- .Append(FormatForCsv(con.EC2Region));
+ .Append(FormatForCsv(con.EC2Region))
+ .Append(FormatForCsv(con.ExternalCredentialProvider))
+ .Append(FormatForCsv(con.ExternalAddressProvider))
+ ;
if (!_saveFilter.SaveInheritance)
@@ -250,12 +255,15 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
.Append(FormatForCsv(con.Inheritance.RDGatewayUsername))
.Append(FormatForCsv(con.Inheritance.RDGatewayPassword))
.Append(FormatForCsv(con.Inheritance.RDGatewayDomain))
+ .Append(FormatForCsv(con.Inheritance.RDGatewayExternalCredentialProvider))
+ .Append(FormatForCsv(con.Inheritance.RDGatewayUserViaAPI))
.Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout))
.Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
.Append(FormatForCsv(con.Inheritance.SoundQuality))
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
.Append(FormatForCsv(con.Inheritance.RdpVersion))
- .Append(FormatForCsv(con.Inheritance.UserViaAPI));
+ .Append(FormatForCsv(con.Inheritance.UserViaAPI))
+ .Append(FormatForCsv(con.Inheritance.ExternalCredentialProvider));
}
private string FormatForCsv(object value)
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs
index a54e32051..ade55a194 100644
--- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs
+++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Security;
+using Connection;
using mRemoteNG.App;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
@@ -83,10 +84,15 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Description = (string)dataRow["Description"];
connectionInfo.Icon = (string)dataRow["Icon"];
connectionInfo.Panel = (string)dataRow["Panel"];
+ //connectionInfo.ExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), (string)dataRow["ExternalCredentialProvider"]);
+ //connectionInfo.UserViaAPI = (string)dataRow["UserViaAPI"];
connectionInfo.Username = (string)dataRow["Username"];
connectionInfo.Domain = (string)dataRow["Domain"];
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
connectionInfo.Hostname = (string)dataRow["Hostname"];
+ //connectionInfo.ExternalAddressProvider = (ExternalAddressProvider)Enum.Parse(typeof(ExternalAddressProvider), (string)dataRow["ExternalAddressProvider"]);
+ //connectionInfo.EC2Region = (string)dataRow["EC2Region"];
+ //connectionInfo.EC2InstanceId = (string)dataRow["EC2InstanceId"];
connectionInfo.VmId = (string)dataRow["VmId"];
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
@@ -151,6 +157,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"];
connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]);
connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"];
+ //connectionInfo.RDGatewayExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), (string)dataRow["RDGatewayExternalCredentialProvider"]);
+ //connectionInfo.RDGatewayUserViaAPI = (string)dataRow["RDGatewayUserViaAPI"];
if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled
if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion))
@@ -167,6 +175,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Inheritance.DisableMenuAnimations = (bool)dataRow["InheritDisableMenuAnimations"];
connectionInfo.Inheritance.DisableCursorShadow = (bool)dataRow["InheritDisableCursorShadow"];
connectionInfo.Inheritance.DisableCursorBlinking = (bool)dataRow["InheritDisableCursorBlinking"];
+ //connectionInfo.Inheritance.ExternalCredentialProvider = (bool)dataRow["InheritExternalCredentialProvider"];
+ //connectionInfo.Inheritance.UserViaAPI = (bool)dataRow["InheritUserViaAPI"];
connectionInfo.Inheritance.Domain = (bool)dataRow["InheritDomain"];
connectionInfo.Inheritance.Icon = (bool)dataRow["InheritIcon"];
connectionInfo.Inheritance.Panel = (bool)dataRow["InheritPanel"];
@@ -224,6 +234,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"];
connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"];
connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"];
+ //connectionInfo.Inheritance.RDGatewayExternalCredentialProvider = (bool)dataRow["InheritRDGatewayExternalCredentialProvider"];
+ //connectionInfo.Inheritance.RDGatewayUserViaAPI = (bool)dataRow["InheritRDGatewayUserViaAPI"];
connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"];
}
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs
index f6ea9a8cb..5fe9c260c 100644
--- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs
+++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs
@@ -105,10 +105,15 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("Description", typeof(string));
dataTable.Columns.Add("Icon", typeof(string));
dataTable.Columns.Add("Panel", typeof(string));
+ dataTable.Columns.Add("ExternalCredentialProvider", typeof(string));
+ dataTable.Columns.Add("UserViaAPI", typeof(string));
dataTable.Columns.Add("Username", typeof(string));
dataTable.Columns.Add("Domain", typeof(string));
dataTable.Columns.Add("Password", typeof(string));
dataTable.Columns.Add("Hostname", typeof(string));
+ dataTable.Columns.Add("ExternalAddressProvider", typeof(string));
+ dataTable.Columns.Add("EC2Region", typeof(string));
+ dataTable.Columns.Add("EC2InstanceId", typeof(string));
dataTable.Columns.Add("Port", typeof(int));
dataTable.Columns.Add("Protocol", typeof(string));
dataTable.Columns.Add("SSHTunnelConnectionName", typeof(string));
@@ -163,6 +168,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("RDGatewayUsername", typeof(string));
dataTable.Columns.Add("RDGatewayPassword", typeof(string));
dataTable.Columns.Add("RDGatewayDomain", typeof(string));
+ dataTable.Columns.Add("RDGatewayExternalCredentialProvider", typeof(string));
+ dataTable.Columns.Add("RDGatewayUserViaAPI", typeof(string));
dataTable.Columns.Add("InheritCacheBitmaps", typeof(bool));
dataTable.Columns.Add("InheritColors", typeof(bool));
dataTable.Columns.Add("InheritDescription", typeof(bool));
@@ -180,6 +187,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("InheritPassword", typeof(bool));
dataTable.Columns.Add("InheritPort", typeof(bool));
dataTable.Columns.Add("InheritProtocol", typeof(bool));
+ dataTable.Columns.Add("InheritExternalCredentialProvider", typeof(bool));
+ dataTable.Columns.Add("InheritUserViaAPI", typeof(bool));
dataTable.Columns.Add("InheritSSHTunnelConnectionName", typeof(bool));
dataTable.Columns.Add("InheritSSHOptions", typeof(bool));
dataTable.Columns.Add("InheritPuttySession", typeof(bool));
@@ -222,6 +231,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("InheritRDGatewayUsername", typeof(bool));
dataTable.Columns.Add("InheritRDGatewayPassword", typeof(bool));
dataTable.Columns.Add("InheritRDGatewayDomain", typeof(bool));
+ dataTable.Columns.Add("InheritRDGatewayExternalCredentialProvider", typeof(bool));
+ dataTable.Columns.Add("InheritRDGatewayUserViaAPI", typeof(bool));
dataTable.Columns.Add("LoadBalanceInfo", typeof(string));
dataTable.Columns.Add("AutomaticResize", typeof(bool));
dataTable.Columns.Add("InheritLoadBalanceInfo", typeof(bool));
@@ -279,7 +290,12 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["Domain"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : "");
isFieldNotChange = isFieldNotChange && dataRow["Hostname"].Equals(connectionInfo.Hostname);
- isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
+ isFieldNotChange = isFieldNotChange && dataRow["EC2Region"].Equals(connectionInfo.EC2Region);
+ isFieldNotChange = isFieldNotChange && dataRow["EC2InstanceId"].Equals(connectionInfo.EC2InstanceId);
+ isFieldNotChange = isFieldNotChange && dataRow["ExternalAddressProvider"].Equals(connectionInfo.ExternalAddressProvider);
+ isFieldNotChange = isFieldNotChange && dataRow["ExternalCredentialProvider"].Equals(connectionInfo.ExternalCredentialProvider);
+ isFieldNotChange = isFieldNotChange && dataRow["UserViaAPI"].Equals(connectionInfo.UserViaAPI);
+ isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
isFieldNotChange = isFieldNotChange && dataRow["Protocol"].Equals(connectionInfo.Protocol.ToString());
isFieldNotChange = isFieldNotChange && dataRow["PuttySession"].Equals(connectionInfo.PuttySession);
isFieldNotChange = isFieldNotChange &&
@@ -357,6 +373,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["RDGatewayUseConnectionCredentials"].Equals(connectionInfo.RDGatewayUseConnectionCredentials.ToString()) &&
dataRow["RDGatewayUsername"].Equals(connectionInfo.RDGatewayUsername) &&
dataRow["RDGatewayDomain"].Equals(connectionInfo.RDGatewayDomain) &&
+ dataRow["RDGatewayExternalCredentialProvider"].Equals(connectionInfo.RDGatewayExternalCredentialProvider) &&
+ dataRow["RDGatewayUserViaAPI"].Equals(connectionInfo.RDGatewayUserViaAPI) &&
dataRow["RdpVersion"].Equals(connectionInfo.RdpVersion.ToString());
var isInheritanceFieldNotChange = false;
@@ -373,6 +391,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritDisableMenuAnimations"].Equals(connectionInfo.Inheritance.DisableMenuAnimations) &&
dataRow["InheritDisableCursorShadow"].Equals(connectionInfo.Inheritance.DisableCursorShadow) &&
dataRow["InheritDisableCursorBlinking"].Equals(connectionInfo.Inheritance.DisableCursorBlinking) &&
+ dataRow["InheritExternalCredentialProvider"].Equals(connectionInfo.Inheritance.ExternalCredentialProvider) &&
+ dataRow["InheritUserViaAPI"].Equals(connectionInfo.Inheritance.UserViaAPI) &&
dataRow["InheritDomain"].Equals(connectionInfo.Inheritance.Domain) &&
dataRow["InheritIcon"].Equals(connectionInfo.Inheritance.Icon) &&
dataRow["InheritPanel"].Equals(connectionInfo.Inheritance.Panel) &&
@@ -427,6 +447,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritRDGatewayUsername"].Equals(connectionInfo.Inheritance.RDGatewayUsername) &&
dataRow["InheritRDGatewayPassword"].Equals(connectionInfo.Inheritance.RDGatewayPassword) &&
dataRow["InheritRDGatewayDomain"].Equals(connectionInfo.Inheritance.RDGatewayDomain) &&
+ dataRow["InheritRDGatewayExternalCredentialProvider"].Equals(connectionInfo.Inheritance.RDGatewayExternalCredentialProvider) &&
+ dataRow["InheritRDGatewayUserViaAPI"].Equals(connectionInfo.Inheritance.RDGatewayUserViaAPI) &&
dataRow["InheritRdpVersion"].Equals(connectionInfo.Inheritance.RdpVersion));
}
else
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs
index 83ca03fa1..53b2a2c9d 100644
--- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs
+++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs
@@ -138,6 +138,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("RDGatewayUsageMethod", connectionInfo.RDGatewayUsageMethod));
element.Add(new XAttribute("RDGatewayHostname", connectionInfo.RDGatewayHostname));
element.Add(new XAttribute("RDGatewayUseConnectionCredentials", connectionInfo.RDGatewayUseConnectionCredentials));
+ element.Add(new XAttribute("RDGatewayExternalCredentialProvider", connectionInfo.RDGatewayExternalCredentialProvider));
+ element.Add(new XAttribute("RDGatewayUserViaAPI", connectionInfo.RDGatewayUserViaAPI));
element.Add(_saveFilter.SaveUsername
? new XAttribute("RDGatewayUsername", connectionInfo.RDGatewayUsername)
@@ -157,6 +159,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("UserViaAPI", connectionInfo.UserViaAPI));
element.Add(new XAttribute("EC2InstanceId", connectionInfo.EC2InstanceId));
element.Add(new XAttribute("EC2Region", connectionInfo.EC2Region));
+ element.Add(new XAttribute("ExternalCredentialProvider", connectionInfo.ExternalCredentialProvider));
+ element.Add(new XAttribute("ExternalAddressProvider", connectionInfo.ExternalAddressProvider));
}
private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo)
@@ -293,12 +297,19 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("InheritRDGatewayPassword", inheritance.RDGatewayPassword.ToString().ToLowerInvariant()));
if (inheritance.RDGatewayDomain)
element.Add(new XAttribute("InheritRDGatewayDomain", inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
+ if (inheritance.RDGatewayExternalCredentialProvider)
+ element.Add(new XAttribute("InheritRDGatewayExternalCredentialProvider", inheritance.RDGatewayExternalCredentialProvider.ToString().ToLowerInvariant()));
+ if (inheritance.RDGatewayUserViaAPI)
+ element.Add(new XAttribute("InheritRDGatewayUserViaAPI", inheritance.RDGatewayUserViaAPI.ToString().ToLowerInvariant()));
+
if (inheritance.VmId)
element.Add(new XAttribute("InheritVmId", inheritance.VmId.ToString().ToLowerInvariant()));
if (inheritance.UseVmId)
element.Add(new XAttribute("InheritUseVmId", inheritance.UseVmId.ToString().ToLowerInvariant()));
if (inheritance.UseEnhancedMode)
element.Add(new XAttribute("InheritUseEnhancedMode", inheritance.UseEnhancedMode.ToString().ToLowerInvariant()));
+ if (inheritance.ExternalCredentialProvider)
+ element.Add(new XAttribute("InheritExternalCredentialProvider", inheritance.ExternalCredentialProvider.ToString().ToLowerInvariant()));
if (inheritance.UserViaAPI)
element.Add(new XAttribute("InheritUserViaAPI", inheritance.UserViaAPI.ToString().ToLowerInvariant()));
if (inheritance.UseRCG)
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs
index a82b6c68e..845b9a1c1 100644
--- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs
+++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs
@@ -18,6 +18,7 @@ using mRemoteNG.Tree.Root;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.TaskDialog;
using mRemoteNG.Resources.Language;
+using Connection;
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
{
@@ -469,28 +470,19 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
if (_confVersion >= 2.2)
{
// Get settings
- connectionInfo.RDGatewayUsageMethod =
- xmlnode.GetAttributeAsEnum("RDGatewayUsageMethod");
+ connectionInfo.RDGatewayUsageMethod = xmlnode.GetAttributeAsEnum("RDGatewayUsageMethod");
connectionInfo.RDGatewayHostname = xmlnode.GetAttributeAsString("RDGatewayHostname");
- connectionInfo.RDGatewayUseConnectionCredentials =
- xmlnode.GetAttributeAsEnum(
- "RDGatewayUseConnectionCredentials");
+ connectionInfo.RDGatewayUseConnectionCredentials = xmlnode.GetAttributeAsEnum("RDGatewayUseConnectionCredentials");
connectionInfo.RDGatewayUsername = xmlnode.GetAttributeAsString("RDGatewayUsername");
- connectionInfo.RDGatewayPassword =
- _decryptor.Decrypt(xmlnode.GetAttributeAsString("RDGatewayPassword"));
+ connectionInfo.RDGatewayPassword = _decryptor.Decrypt(xmlnode.GetAttributeAsString("RDGatewayPassword"));
connectionInfo.RDGatewayDomain = xmlnode.GetAttributeAsString("RDGatewayDomain");
// Get inheritance settings
- connectionInfo.Inheritance.RDGatewayUsageMethod =
- xmlnode.GetAttributeAsBool("InheritRDGatewayUsageMethod");
- connectionInfo.Inheritance.RDGatewayHostname =
- xmlnode.GetAttributeAsBool("InheritRDGatewayHostname");
- connectionInfo.Inheritance.RDGatewayUseConnectionCredentials =
- xmlnode.GetAttributeAsBool("InheritRDGatewayUseConnectionCredentials");
- connectionInfo.Inheritance.RDGatewayUsername =
- xmlnode.GetAttributeAsBool("InheritRDGatewayUsername");
- connectionInfo.Inheritance.RDGatewayPassword =
- xmlnode.GetAttributeAsBool("InheritRDGatewayPassword");
+ connectionInfo.Inheritance.RDGatewayUsageMethod = xmlnode.GetAttributeAsBool("InheritRDGatewayUsageMethod");
+ connectionInfo.Inheritance.RDGatewayHostname = xmlnode.GetAttributeAsBool("InheritRDGatewayHostname");
+ connectionInfo.Inheritance.RDGatewayUseConnectionCredentials = xmlnode.GetAttributeAsBool("InheritRDGatewayUseConnectionCredentials");
+ connectionInfo.Inheritance.RDGatewayUsername = xmlnode.GetAttributeAsBool("InheritRDGatewayUsername");
+ connectionInfo.Inheritance.RDGatewayPassword = xmlnode.GetAttributeAsBool("InheritRDGatewayPassword");
connectionInfo.Inheritance.RDGatewayDomain = xmlnode.GetAttributeAsBool("InheritRDGatewayDomain");
}
@@ -501,10 +493,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
connectionInfo.EnableDesktopComposition = xmlnode.GetAttributeAsBool("EnableDesktopComposition");
// Get inheritance settings
- connectionInfo.Inheritance.EnableFontSmoothing =
- xmlnode.GetAttributeAsBool("InheritEnableFontSmoothing");
- connectionInfo.Inheritance.EnableDesktopComposition =
- xmlnode.GetAttributeAsBool("InheritEnableDesktopComposition");
+ connectionInfo.Inheritance.EnableFontSmoothing = xmlnode.GetAttributeAsBool("InheritEnableFontSmoothing");
+ connectionInfo.Inheritance.EnableDesktopComposition = xmlnode.GetAttributeAsBool("InheritEnableDesktopComposition");
}
if (_confVersion >= 2.4)
@@ -523,15 +513,13 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
if (_confVersion >= 2.6)
{
- connectionInfo.SoundQuality =
- xmlnode.GetAttributeAsEnum("SoundQuality");
+ connectionInfo.SoundQuality = xmlnode.GetAttributeAsEnum("SoundQuality");
connectionInfo.Inheritance.SoundQuality = xmlnode.GetAttributeAsBool("InheritSoundQuality");
connectionInfo.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsInt("RDPMinutesToIdleTimeout");
- connectionInfo.Inheritance.RDPMinutesToIdleTimeout =
- xmlnode.GetAttributeAsBool("InheritRDPMinutesToIdleTimeout");
+ connectionInfo.Inheritance.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsBool("InheritRDPMinutesToIdleTimeout");
connectionInfo.RDPAlertIdleTimeout = xmlnode.GetAttributeAsBool("RDPAlertIdleTimeout");
- connectionInfo.Inheritance.RDPAlertIdleTimeout =
- xmlnode.GetAttributeAsBool("InheritRDPAlertIdleTimeout"); }
+ connectionInfo.Inheritance.RDPAlertIdleTimeout = xmlnode.GetAttributeAsBool("InheritRDPAlertIdleTimeout");
+ }
if (_confVersion >= 2.7)
{
@@ -565,14 +553,21 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
connectionInfo.Inheritance.DisableMenuAnimations = xmlnode.GetAttributeAsBool("InheritDisableMenuAnimations");
connectionInfo.Inheritance.DisableCursorShadow = xmlnode.GetAttributeAsBool("InheritDisableCursorShadow");
connectionInfo.Inheritance.DisableCursorBlinking = xmlnode.GetAttributeAsBool("InheritDisableCursorBlinking");
+ connectionInfo.ExternalCredentialProvider = xmlnode.GetAttributeAsEnum("ExternalCredentialProvider", ExternalCredentialProvider.None);
+ connectionInfo.Inheritance.ExternalCredentialProvider = xmlnode.GetAttributeAsBool("InheritExternalCredentialProvider");
connectionInfo.UserViaAPI = xmlnode.GetAttributeAsString("UserViaAPI");
connectionInfo.Inheritance.UserViaAPI = xmlnode.GetAttributeAsBool("InheritUserViaAPI");
+ connectionInfo.ExternalAddressProvider = xmlnode.GetAttributeAsEnum("ExternalAddressProvider", ExternalAddressProvider.None);
connectionInfo.EC2InstanceId = xmlnode.GetAttributeAsString("EC2InstanceId");
connectionInfo.EC2Region = xmlnode.GetAttributeAsString("EC2Region");
connectionInfo.UseRestrictedAdmin = xmlnode.GetAttributeAsBool("UseRestrictedAdmin");
connectionInfo.Inheritance.UseRestrictedAdmin = xmlnode.GetAttributeAsBool("InheritUseRestrictedAdmin");
connectionInfo.UseRCG = xmlnode.GetAttributeAsBool("UseRCG");
connectionInfo.Inheritance.UseRCG = xmlnode.GetAttributeAsBool("InheritUseRCG");
+ connectionInfo.RDGatewayExternalCredentialProvider = xmlnode.GetAttributeAsEnum("RDGatewayExternalCredentialProvider", ExternalCredentialProvider.None);
+ connectionInfo.RDGatewayUserViaAPI = xmlnode.GetAttributeAsString("RDGatewayUserViaAPI");
+ connectionInfo.Inheritance.RDGatewayExternalCredentialProvider = xmlnode.GetAttributeAsBool("InheritRDGatewayExternalCredentialProvider");
+ connectionInfo.Inheritance.RDGatewayUserViaAPI = xmlnode.GetAttributeAsBool("InheritRDGatewayUserViaAPI");
}
}
catch (Exception ex)
diff --git a/mRemoteNG/Connection/AbstractConnectionRecord.cs b/mRemoteNG/Connection/AbstractConnectionRecord.cs
index a0cef34e7..e14236a5b 100644
--- a/mRemoteNG/Connection/AbstractConnectionRecord.cs
+++ b/mRemoteNG/Connection/AbstractConnectionRecord.cs
@@ -8,7 +8,7 @@ using mRemoteNG.Properties;
using mRemoteNG.Tools;
using mRemoteNG.Tools.Attributes;
using mRemoteNG.Resources.Language;
-
+using Connection;
namespace mRemoteNG.Connection
{
@@ -22,8 +22,10 @@ namespace mRemoteNG.Connection
private string _panel;
private string _hostname;
+ private ExternalAddressProvider _externalAddressProvider;
private string _ec2InstanceId = "";
private string _ec2Region = "";
+ private ExternalCredentialProvider _externalCredentialProvider;
private string _userViaAPI = "";
private string _username = "";
private string _password = "";
@@ -55,6 +57,9 @@ namespace mRemoteNG.Connection
private string _rdGatewayUsername;
private string _rdGatewayPassword;
private string _rdGatewayDomain;
+ private ExternalCredentialProvider _rdGatewayExternalCredentialProvider;
+ private string _rdGatewayUserViaAPI = "";
+
private RDPResolutions _resolution;
private bool _automaticResize;
@@ -167,15 +172,29 @@ namespace mRemoteNG.Connection
set => SetField(ref _port, value, "Port");
}
+ // external credential provider selector
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
+ LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalCredentialProvider)),
+ LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
+ TypeConverter(typeof(MiscTools.EnumTypeConverter)),
+ AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
+ public ExternalCredentialProvider ExternalCredentialProvider
+ {
+ get => GetPropertyValue("ExternalCredentialProvider", _externalCredentialProvider);
+ set => SetField(ref _externalCredentialProvider, value, "ExternalCredentialProvider");
+ }
+
+ // credential record identifier for external credential provider
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.UserViaAPI)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUserViaAPI)),
- AttributeUsedInAllProtocolsExcept(ProtocolType.VNC, ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)]
+ AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
public virtual string UserViaAPI
{
get => GetPropertyValue("UserViaAPI", _userViaAPI);
set => SetField(ref _userViaAPI, value, "UserViaAPI");
}
+
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.Username)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUsername)),
@@ -207,6 +226,19 @@ namespace mRemoteNG.Connection
set => SetField(ref _domain, value?.Trim(), "Domain");
}
+
+ // external address provider selector
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
+ LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalAddressProvider)),
+ LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalAddressProvider)),
+ TypeConverter(typeof(MiscTools.EnumTypeConverter)),
+ AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH2)]
+ public ExternalAddressProvider ExternalAddressProvider
+ {
+ get => GetPropertyValue("ExternalAddressProvider", _externalAddressProvider);
+ set => SetField(ref _externalAddressProvider, value, "ExternalAddressProvider");
+ }
+
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.EC2InstanceId)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEC2InstanceId)),
@@ -443,7 +475,7 @@ namespace mRemoteNG.Connection
#region RD Gateway
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
@@ -454,7 +486,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUsageMethod, value, "RDGatewayUsageMethod");
}
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayHostname)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayHostname)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -464,7 +496,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayHostname, value?.Trim(), "RDGatewayHostname");
}
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUseConnectionCredentials)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayUseConnectionCredentials)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
@@ -475,7 +507,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUseConnectionCredentials, value, "RDGatewayUseConnectionCredentials");
}
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsername)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayUsername)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -485,7 +517,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUsername, value?.Trim(), "RDGatewayUsername");
}
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayPassword)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayPassword)),
PasswordPropertyText(true),
@@ -496,7 +528,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayPassword, value, "RDGatewayPassword");
}
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayDomain)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayDomain)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -505,7 +537,28 @@ namespace mRemoteNG.Connection
get => GetPropertyValue("RDGatewayDomain", _rdGatewayDomain).Trim();
set => SetField(ref _rdGatewayDomain, value?.Trim(), "RDGatewayDomain");
}
+ // external credential provider selector for rd gateway
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
+ LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalCredentialProvider)),
+ LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
+ TypeConverter(typeof(MiscTools.EnumTypeConverter)),
+ AttributeUsedInProtocol(ProtocolType.RDP)]
+ public ExternalCredentialProvider RDGatewayExternalCredentialProvider
+ {
+ get => GetPropertyValue("RDGatewayExternalCredentialProvider", _rdGatewayExternalCredentialProvider);
+ set => SetField(ref _rdGatewayExternalCredentialProvider, value, "RDGatewayExternalCredentialProvider");
+ }
+ // credential record identifier for external credential provider
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
+ LocalizedAttributes.LocalizedDisplayName(nameof(Language.UserViaAPI)),
+ LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUserViaAPI)),
+ AttributeUsedInProtocol(ProtocolType.RDP)]
+ public virtual string RDGatewayUserViaAPI
+ {
+ get => GetPropertyValue("RDGatewayUserViaAPI", _rdGatewayUserViaAPI);
+ set => SetField(ref _rdGatewayUserViaAPI, value, "RDGatewayUserViaAPI");
+ }
#endregion
#region Appearance
diff --git a/mRemoteNG/Connection/ConnectionInfo.cs b/mRemoteNG/Connection/ConnectionInfo.cs
index c05595872..965d233e6 100644
--- a/mRemoteNG/Connection/ConnectionInfo.cs
+++ b/mRemoteNG/Connection/ConnectionInfo.cs
@@ -18,7 +18,7 @@ using mRemoteNG.Properties;
using mRemoteNG.Tree;
using mRemoteNG.Resources.Language;
using mRemoteNG.Tree.Root;
-
+using Connection;
namespace mRemoteNG.Connection
{
@@ -296,7 +296,10 @@ namespace mRemoteNG.Connection
private void SetConnectionDefaults()
{
Hostname = string.Empty;
+ ExternalAddressProvider = (ExternalAddressProvider)Enum.Parse(typeof(ExternalAddressProvider), Settings.Default.ConDefaultExternalAddressProvider);
EC2Region = Settings.Default.ConDefaultEC2Region;
+ ExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), Settings.Default.ConDefaultExternalCredentialProvider);
+ UserViaAPI = "";
}
private void SetProtocolDefaults()
@@ -332,6 +335,8 @@ namespace mRemoteNG.Connection
RDGatewayUsername = Settings.Default.ConDefaultRDGatewayUsername;
RDGatewayPassword = Settings.Default.ConDefaultRDGatewayPassword;
RDGatewayDomain = Settings.Default.ConDefaultRDGatewayDomain;
+ RDGatewayExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), Settings.Default.ConDefaultRDGatewayExternalCredentialProvider);
+ RDGatewayUserViaAPI = Settings.Default.ConDefaultRDGatewayUserViaAPI;
}
private void SetAppearanceDefaults()
diff --git a/mRemoteNG/Connection/ConnectionInfoInheritance.cs b/mRemoteNG/Connection/ConnectionInfoInheritance.cs
index 5d2ee8b51..0b9d38942 100644
--- a/mRemoteNG/Connection/ConnectionInfoInheritance.cs
+++ b/mRemoteNG/Connection/ConnectionInfoInheritance.cs
@@ -51,6 +51,14 @@ namespace mRemoteNG.Connection
#endregion
#region Connection
+
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3),
+ LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalCredentialProvider)),
+ LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
+ TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
+ [Browsable(true)]
+ public bool ExternalCredentialProvider { get; set; }
+
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UserViaAPI)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUserViaAPI)),
@@ -212,42 +220,55 @@ namespace mRemoteNG.Connection
#region RD Gateway
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUsageMethod { get; set; }
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayHostname)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayHostname)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayHostname { get; set; }
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUseConnectionCredentials)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayUseConnectionCredentials)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUseConnectionCredentials { get; set; }
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUsername)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayUsername)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUsername { get; set; }
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayPassword)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpGatewayPassword)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayPassword { get; set; }
- [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayDomain)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayDomain)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayDomain { get; set; }
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
+ LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalCredentialProvider)),
+ LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
+ TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
+ public bool RDGatewayExternalCredentialProvider { get; set; }
+
+ [LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
+ LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UserViaAPI)),
+ LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUserViaAPI)),
+ TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
+ public bool RDGatewayUserViaAPI { get; set; }
+
+
#endregion
#region Appearance
diff --git a/mRemoteNG/Connection/ExternalAddressProviderSelector.cs b/mRemoteNG/Connection/ExternalAddressProviderSelector.cs
new file mode 100644
index 000000000..f81d4ed0e
--- /dev/null
+++ b/mRemoteNG/Connection/ExternalAddressProviderSelector.cs
@@ -0,0 +1,14 @@
+using mRemoteNG.Resources.Language;
+using mRemoteNG.Tools;
+
+namespace Connection
+{
+ public enum ExternalAddressProvider
+ {
+ [LocalizedAttributes.LocalizedDescription(nameof(Language.EAPNone))]
+ None = 0,
+
+ [LocalizedAttributes.LocalizedDescription(nameof(Language.EAPAmazonWebServices))]
+ AmazonWebServices = 1
+ }
+}
diff --git a/mRemoteNG/Connection/ExternalCredentialProviderSelector.cs b/mRemoteNG/Connection/ExternalCredentialProviderSelector.cs
new file mode 100644
index 000000000..06e14e4af
--- /dev/null
+++ b/mRemoteNG/Connection/ExternalCredentialProviderSelector.cs
@@ -0,0 +1,14 @@
+using mRemoteNG.Resources.Language;
+using mRemoteNG.Tools;
+
+namespace Connection
+{
+ public enum ExternalCredentialProvider
+ {
+ [LocalizedAttributes.LocalizedDescription(nameof(Language.ECPNone))]
+ None = 0,
+
+ [LocalizedAttributes.LocalizedDescription(nameof(Language.ECPDelineaSecretServer))]
+ DelineaSecretServer = 1
+ }
+}
diff --git a/mRemoteNG/Connection/Protocol/PuttyBase.cs b/mRemoteNG/Connection/Protocol/PuttyBase.cs
index 508182cf0..5dc16473b 100644
--- a/mRemoteNG/Connection/Protocol/PuttyBase.cs
+++ b/mRemoteNG/Connection/Protocol/PuttyBase.cs
@@ -11,6 +11,7 @@ using System.Threading;
using System.Windows.Forms;
using mRemoteNG.Properties;
using mRemoteNG.Resources.Language;
+using Connection;
// ReSharper disable ArrangeAccessorOwnerBody
@@ -87,11 +88,11 @@ namespace mRemoteNG.Connection.Protocol
// access secret server api if necessary
- if (!string.IsNullOrEmpty(UserViaAPI)) {
-
+ if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
+ {
try
{
- ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + InterfaceControl.Info?.UserViaAPI, out username, out password, out domain);
+ ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{UserViaAPI}", out username, out password, out domain);
}
catch (Exception ex)
{
@@ -112,7 +113,7 @@ namespace mRemoteNG.Connection.Protocol
case "custom":
try
{
- ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer(
+ ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer(
"SSAPI:" + Properties.OptionsCredentialsPage.Default.UserViaAPDefault, out username, out password,
out domain);
}
diff --git a/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs b/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs
index 49e7c0844..e46d35352 100644
--- a/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs
+++ b/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs
@@ -12,6 +12,9 @@ namespace mRemoteNG.Connection.Protocol.RDP
Yes = 1,
[LocalizedAttributes.LocalizedDescription(nameof(Language.UseSmartCard))]
- SmartCard = 2
+ SmartCard = 2,
+
+ [LocalizedAttributes.LocalizedDescription(nameof(Language.UseExternalCredentialProvider))]
+ ExternalCredentialProvider = 3
}
}
\ No newline at end of file
diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs
index f64ef7157..fc3261137 100644
--- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs
+++ b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs
@@ -15,6 +15,9 @@ using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Tabs;
using MSTSCLib;
using mRemoteNG.Resources.Language;
+using Connection;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
+using System.DirectoryServices.ActiveDirectory;
namespace mRemoteNG.Connection.Protocol.RDP
{
@@ -382,8 +385,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
_rdpClient.TransportSettings.GatewayUsageMethod = (uint)connectionInfo.RDGatewayUsageMethod;
_rdpClient.TransportSettings.GatewayHostname = connectionInfo.RDGatewayHostname;
_rdpClient.TransportSettings.GatewayProfileUsageMethod = 1; // TSC_PROXY_PROFILE_MODE_EXPLICIT
- if (connectionInfo.RDGatewayUseConnectionCredentials ==
- RDGatewayUseConnectionCredentials.SmartCard)
+ if (connectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.SmartCard)
{
_rdpClient.TransportSettings.GatewayCredsSource = 1; // TSC_PROXY_CREDS_MODE_SMARTCARD
}
@@ -396,17 +398,35 @@ namespace mRemoteNG.Connection.Protocol.RDP
_rdpClient.TransportSettings2.GatewayPassword = connectionInfo.Password;
_rdpClient.TransportSettings2.GatewayDomain = connectionInfo?.Domain;
}
- else if (connectionInfo.RDGatewayUseConnectionCredentials ==
- RDGatewayUseConnectionCredentials.SmartCard)
+ else if (connectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.SmartCard)
{
_rdpClient.TransportSettings2.GatewayCredSharing = 0;
}
else
{
- _rdpClient.TransportSettings2.GatewayUsername = connectionInfo.RDGatewayUsername;
- _rdpClient.TransportSettings2.GatewayPassword = connectionInfo.RDGatewayPassword;
- _rdpClient.TransportSettings2.GatewayDomain = connectionInfo.RDGatewayDomain;
_rdpClient.TransportSettings2.GatewayCredSharing = 0;
+
+ string gwu = connectionInfo.RDGatewayUsername;
+ string gwp = connectionInfo.RDGatewayPassword;
+ string gwd = connectionInfo.RDGatewayDomain;
+
+ // access secret server api if necessary
+ if (InterfaceControl.Info.RDGatewayExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
+ {
+ try
+ {
+ string idviaapi = InterfaceControl.Info.RDGatewayUserViaAPI;
+ ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{idviaapi}", out gwu, out gwp, out gwd);
+ }
+ catch (Exception ex)
+ {
+ Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
+ }
+
+ }
+ _rdpClient.TransportSettings2.GatewayUsername = gwu;
+ _rdpClient.TransportSettings2.GatewayPassword = gwp;
+ _rdpClient.TransportSettings2.GatewayDomain = gwd;
}
}
}
@@ -476,11 +496,11 @@ namespace mRemoteNG.Connection.Protocol.RDP
var UserViaAPI = connectionInfo?.UserViaAPI ?? "";
// access secret server api if necessary
- if (!string.IsNullOrEmpty(UserViaAPI))
+ if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
{
try
{
- ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + connectionInfo?.UserViaAPI, out userName, out password, out domain);
+ ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{UserViaAPI}", out userName, out password, out domain);
}
catch (Exception ex)
{
@@ -502,7 +522,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
case "custom":
try
{
- ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + Properties.OptionsCredentialsPage.Default.UserViaAPDefault, out userName, out password, out domain);
+ ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + Properties.OptionsCredentialsPage.Default.UserViaAPDefault, out userName, out password, out domain);
_rdpClient.UserName = userName;
}
catch (Exception ex)
diff --git a/mRemoteNG/Language/Language.Designer.cs b/mRemoteNG/Language/Language.Designer.cs
index 3d7dad167..1a1d32233 100644
--- a/mRemoteNG/Language/Language.Designer.cs
+++ b/mRemoteNG/Language/Language.Designer.cs
@@ -1638,6 +1638,35 @@ namespace mRemoteNG.Resources.Language {
}
}
+ internal static string ExternalAddressProvider
+ {
+ get
+ {
+ return ResourceManager.GetString("ExternalAddressProvider", resourceCulture);
+ }
+ }
+ internal static string PropertyDescriptionExternalAddressProvider
+ {
+ get
+ {
+ return ResourceManager.GetString("PropertyDescriptionExternalAddressProvider", resourceCulture);
+ }
+ }
+ internal static string EAPNone
+ {
+ get
+ {
+ return ResourceManager.GetString("EAPNone", resourceCulture);
+ }
+ }
+ internal static string EAPAmazonWebServices
+ {
+ get
+ {
+ return ResourceManager.GetString("EAPAmazonWebServices", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to EC2InstanceId.
///
@@ -2354,9 +2383,9 @@ namespace mRemoteNG.Resources.Language {
///
/// Looks up a localized string similar to Gateway.
///
- internal static string Gateway {
+ internal static string RDPGateway {
get {
- return ResourceManager.GetString("Gateway", resourceCulture);
+ return ResourceManager.GetString("RDPGateway", resourceCulture);
}
}
@@ -4131,16 +4160,7 @@ namespace mRemoteNG.Resources.Language {
}
}
- ///
- /// Looks up a localized string similar to Enter your username..
- ///
- internal static string PropertyDescriptionUserViaAPI
- {
- get
- {
- return ResourceManager.GetString("PropertyDescriptionUserViaAPI", resourceCulture);
- }
- }
+
///
/// Looks up a localized string similar to Enter your username..
@@ -6202,6 +6222,21 @@ namespace mRemoteNG.Resources.Language {
}
}
+ internal static string ExternalCredentialProvider
+ {
+ get
+ {
+ return ResourceManager.GetString("ExternalCredentialProvider", resourceCulture);
+ }
+ }
+ internal static string PropertyDescriptionExternalCredentialProvider
+ {
+ get
+ {
+ return ResourceManager.GetString("PropertyDescriptionExternalCredentialProvider", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Username.
///
@@ -6212,6 +6247,16 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("UserViaAPI", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Enter your username..
+ ///
+ internal static string PropertyDescriptionUserViaAPI
+ {
+ get
+ {
+ return ResourceManager.GetString("PropertyDescriptionUserViaAPI", resourceCulture);
+ }
+ }
///
/// Looks up a localized string similar to Username.
@@ -6240,6 +6285,14 @@ namespace mRemoteNG.Resources.Language {
}
}
+ internal static string UseExternalCredentialProvider
+ {
+ get
+ {
+ return ResourceManager.GetString("UseExternalCredentialProvider", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Use SQL Server to load && save connections.
///
@@ -6585,5 +6638,21 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("ShowForUser", resourceCulture);
}
}
+
+
+ internal static string ECPNone
+ {
+ get
+ {
+ return ResourceManager.GetString("ECPNone", resourceCulture);
+ }
+ }
+ internal static string ECPDelineaSecretServer
+ {
+ get
+ {
+ return ResourceManager.GetString("ECPDelineaSecretServer", resourceCulture);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/mRemoteNG/Language/Language.resx b/mRemoteNG/Language/Language.resx
index a11591d5f..31fb974d8 100644
--- a/mRemoteNG/Language/Language.resx
+++ b/mRemoteNG/Language/Language.resx
@@ -231,8 +231,8 @@
Display
-
- Gateway
+
+ RDP-Gateway
Miscellaneous
@@ -1192,22 +1192,22 @@ If you run into such an error, please create a new connection file!
PuTTY Session
- Gateway Domain
+ RDP-Gateway Domain
- Gateway Hostname
+ RDP-Gateway Hostname
- Remote Desktop Gateway Password
+ RDP-Gateway Password
- Use Gateway
+ Use RDP Gateway
- Gateway Credentials
+ RDP-Gateway Credentials
- Gateway Username
+ RDP-Gateway Username
Disk Drives
@@ -2286,4 +2286,31 @@ Nightly Channel includes Alphas, Betas & Release Candidates.
File menu is hidded now. Press Alt button to peek
+
+ Delinea Secret Server
+
+
+ None
+
+
+ AmazonEC2
+
+
+ None
+
+
+ External Credential Provider
+
+
+ External credential provider / vault to retrieve credentials from
+
+
+ External provider to retrieve host address from
+
+
+ External Address Provider
+
+
+ Use External Credential Provider
+
\ No newline at end of file
diff --git a/mRemoteNG/Properties/Settings.Designer.cs b/mRemoteNG/Properties/Settings.Designer.cs
index 7a76e94dc..2663ea2b4 100644
--- a/mRemoteNG/Properties/Settings.Designer.cs
+++ b/mRemoteNG/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -2281,5 +2281,100 @@ namespace mRemoteNG.Properties {
this["InhDefaultOpeningCommand"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("None")]
+ public string ConDefaultExternalCredentialProvider {
+ get {
+ return ((string)(this["ConDefaultExternalCredentialProvider"]));
+ }
+ set {
+ this["ConDefaultExternalCredentialProvider"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool InhDefaultExternalCredentialProvider {
+ get {
+ return ((bool)(this["InhDefaultExternalCredentialProvider"]));
+ }
+ set {
+ this["InhDefaultExternalCredentialProvider"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("None")]
+ public string ConDefaultExternalAddressProvider {
+ get {
+ return ((string)(this["ConDefaultExternalAddressProvider"]));
+ }
+ set {
+ this["ConDefaultExternalAddressProvider"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool InhDefaultExternalAddressProvider {
+ get {
+ return ((bool)(this["InhDefaultExternalAddressProvider"]));
+ }
+ set {
+ this["InhDefaultExternalAddressProvider"] = value;
+ }
+ }
+
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("None")]
+ public string ConDefaultRDGatewayExternalCredentialProvider
+ {
+ get
+ {
+ return ((string)(this["ConDefaultRDGatewayExternalCredentialProvider"]));
+ }
+ set
+ {
+ this["ConDefaultRDGatewayExternalCredentialProvider"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool InhDefaultRDGatewayExternalCredentialProvider
+ {
+ get
+ {
+ return ((bool)(this["InhDefaultRDGatewayExternalCredentialProvider"]));
+ }
+ set
+ {
+ this["InhDefaultRDGatewayExternalCredentialProvider"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string ConDefaultRDGatewayUserViaAPI
+ {
+ get
+ {
+ return ((string)(this["ConDefaultRDGatewayUserViaAPI"]));
+ }
+ set
+ {
+ this["ConDefaultRDGatewayUserViaAPI"] = value;
+ }
+ }
+
}
}
diff --git a/mRemoteNG/Properties/Settings.settings b/mRemoteNG/Properties/Settings.settings
index 93ba8b496..cba784701 100644
--- a/mRemoteNG/Properties/Settings.settings
+++ b/mRemoteNG/Properties/Settings.settings
@@ -566,5 +566,20 @@
False
+
+
+ None
+
+
+ False
+
+
+ None
+
+
+ False
+
+
+
\ No newline at end of file
diff --git a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd
index aef6fcb6a..3705284bb 100644
--- a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd
+++ b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd
@@ -101,6 +101,8 @@
+
+
@@ -169,10 +171,15 @@
+
+
+
+
+
diff --git a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs b/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs
index 52e1287d4..eb73230c3 100644
--- a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs
+++ b/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs
@@ -17,6 +17,7 @@ using mRemoteNG.Tools;
using mRemoteNG.Tools.Attributes;
using mRemoteNG.Tree.Root;
using mRemoteNG.Resources.Language;
+using Connection;
namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
{
@@ -155,6 +156,10 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
// hide any inherited properties
strHide.AddRange(SelectedConnectionInfo.Inheritance.GetEnabledInheritanceProperties());
+ // hide external provider fields
+ strHide.AddRange(SpecialExternalAddressProviderExclusions());
+ strHide.AddRange(SpecialExternalCredentialProviderExclusions());
+
// ReSharper disable once SwitchStatementMissingSomeCases
switch (SelectedConnectionInfo.Protocol)
{
@@ -211,6 +216,37 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
.Contains(protocol) != false);
}
+ private List SpecialExternalAddressProviderExclusions()
+ {
+ var strHide = new List();
+
+ // aws
+ if (SelectedConnectionInfo.ExternalAddressProvider != ExternalAddressProvider.AmazonWebServices)
+ {
+ strHide.Add(nameof(AbstractConnectionRecord.EC2InstanceId));
+ strHide.Add(nameof(AbstractConnectionRecord.EC2Region));
+ }
+ return strHide;
+ }
+
+ private List SpecialExternalCredentialProviderExclusions()
+ {
+ var strHide = new List();
+
+ if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.None)
+ {
+ strHide.Add(nameof(AbstractConnectionRecord.UserViaAPI));
+ }
+ else if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
+ {
+ strHide.Add(nameof(AbstractConnectionRecord.Username));
+ strHide.Add(nameof(AbstractConnectionRecord.Password));
+ strHide.Add(nameof(AbstractConnectionRecord.Domain));
+ }
+
+ return strHide;
+ }
+
///
///
///
@@ -231,8 +267,16 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUseConnectionCredentials));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername));
}
- else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials ==
- RDGatewayUseConnectionCredentials.Yes)
+ else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.Yes ||
+ SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.SmartCard)
+ {
+ strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain));
+ strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword));
+ strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername));
+ strHide.Add(nameof(AbstractConnectionRecord.RDGatewayExternalCredentialProvider));
+ strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUserViaAPI));
+ }
+ else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.ExternalCredentialProvider)
{
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword));
diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs
index 0de1e5d5f..eee6276ce 100644
--- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs
+++ b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs
@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
+using Connection;
using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
@@ -92,6 +93,8 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
RDGatewayDomain = "SomeRDGatewayDomain",
VNCProxyIP = "SomeVNCProxyIP",
RDGatewayHostname = "SomeRDGatewayHostname",
+ RDGatewayExternalCredentialProvider = ExternalCredentialProvider.None,
+ RDGatewayUserViaAPI = "123",
Protocol = ProtocolType.RDP,
Port = 999,
Favorite = true,
@@ -134,7 +137,9 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard,
UserViaAPI = "",
EC2InstanceId = "",
- EC2Region = "eu-central-1"
+ EC2Region = "eu-central-1",
+ ExternalAddressProvider = ExternalAddressProvider.None,
+ ExternalCredentialProvider = ExternalCredentialProvider.None
};
}
diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs
index c343f3bbe..f5731a3e4 100644
--- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs
+++ b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs
@@ -20,7 +20,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
private const string ExpectedLoadBalanceInfo = "tsv://MS Terminal Services Plugin.1.RDS-NAME";
private const int ExpectedPort = 9933;
private const RDPColors ExpectedColors = RDPColors.Colors24Bit;
- private const bool ExpectedBitmapCaching = false;
+ private const bool ExpectedBitmapCaching = true;
private const RDPResolutions ExpectedResolutionMode = RDPResolutions.FitToWindow;
private const bool ExpectedWallpaperDisplay = true;
private const bool ExpectedThemesDisplay = true;
diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs
index ab9d23484..7150b7148 100644
--- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs
+++ b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using Connection;
using mRemoteNG.Config.Serializers.MiscSerializers;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
@@ -19,6 +20,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
private const string ExpectedName = "server1_displayname";
private const string ExpectedHostname = "server1";
private const string ExpectedDescription = "Comment text here";
+ private const string ExpectedUserViaAPI = "123";
private const string ExpectedUsername = "myusername1";
private const string ExpectedDomain = "mydomain";
private const string ExpectedPassword = "passwordHere!";
@@ -144,7 +146,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
return new[]
{
new TestCaseData((Func)(con => con.Name), ExpectedName).SetName(nameof(ConnectionInfo.Name)),
- new TestCaseData((Func)(con => con.Hostname), ExpectedHostname).SetName(nameof(ConnectionInfo.Hostname)),
+ new TestCaseData((Func)(con => con.Hostname), ExpectedHostname).SetName(nameof(ConnectionInfo.Hostname)),
new TestCaseData((Func)(con => con.Description), ExpectedDescription).SetName(nameof(ConnectionInfo.Description)),
new TestCaseData((Func)(con => con.Username), ExpectedUsername).SetName(nameof(ConnectionInfo.Username)),
new TestCaseData((Func)(con => con.Domain), ExpectedDomain).SetName(nameof(ConnectionInfo.Domain)),
@@ -173,6 +175,9 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
return new[]
{
new TestCaseData((Func)(con => con.Name)).SetName(nameof(ConnectionInfo.Name)),
+ new TestCaseData((Func)(con => con.ExternalAddressProvider)).SetName(nameof(ConnectionInfo.ExternalAddressProvider)),
+ new TestCaseData((Func)(con => con.ExternalCredentialProvider)).SetName(nameof(ConnectionInfo.ExternalCredentialProvider)),
+ new TestCaseData((Func)(con => con.UserViaAPI)).SetName(nameof(ConnectionInfo.UserViaAPI)),
new TestCaseData((Func)(con => con.Hostname)).SetName(nameof(ConnectionInfo.Hostname)),
new TestCaseData((Func)(con => con.Description)).SetName(nameof(ConnectionInfo.Description)),
new TestCaseData((Func)(con => con.Username)).SetName(nameof(ConnectionInfo.Username)),
@@ -184,6 +189,8 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
new TestCaseData((Func)(con => con.RDGatewayHostname)).SetName(nameof(ConnectionInfo.RDGatewayHostname)),
new TestCaseData((Func)(con => con.RDGatewayUsername)).SetName(nameof(ConnectionInfo.RDGatewayUsername)),
new TestCaseData((Func)(con => con.RDGatewayDomain)).SetName(nameof(ConnectionInfo.RDGatewayDomain)),
+ new TestCaseData((Func)(con => con.RDGatewayExternalCredentialProvider)).SetName(nameof(ConnectionInfo.RDGatewayExternalCredentialProvider)),
+ new TestCaseData((Func)(con => con.RDGatewayUserViaAPI)).SetName(nameof(ConnectionInfo.RDGatewayUserViaAPI)),
new TestCaseData((Func)(con => con.Resolution)).SetName(nameof(ConnectionInfo.Resolution)),
new TestCaseData((Func)(con => con.Colors)).SetName(nameof(ConnectionInfo.Colors)),
new TestCaseData((Func)(con => con.RedirectSound)).SetName(nameof(ConnectionInfo.RedirectSound)),
diff --git a/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp b/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp
index 87e082692..dc954e092 100644
Binary files a/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp and b/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp differ
diff --git a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs
index 7500c4e74..fae209a03 100644
--- a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs
+++ b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs
@@ -31,6 +31,8 @@
public TType RDGatewayUsername { get; set; }
public TType RDGatewayPassword { get; set; }
public TType RDGatewayDomain { get; set; }
+ public TType RDGatewayExternalCredentialProvider { get; set; }
+ public TType RDGatewayUserViaAPI { get; set; }
public TType Resolution { get; set; }
public TType AutomaticResize { get; set; }
public TType Colors { get; set; }
@@ -77,8 +79,10 @@
public TType RDPStartProgram { get; set; }
public TType RDPStartProgramWorkDir { get; set; }
public TType OpeningCommand { get; set; }
+ public TType ExternalCredentialProvider { get; set; }
public TType UserViaAPI { get; set; }
public TType EC2InstanceId { get; set; }
+ public TType ExternalAddressProvider { get; set; }
public TType EC2Region { get; set; }
}
}
diff --git a/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs b/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs
index 864649c5a..6345b7aca 100644
--- a/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs
+++ b/mRemoteNGTests/UI/Window/ConfigWindowTests/ConfigWindowGeneralTests.cs
@@ -260,10 +260,12 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.RedirectSmartCards),
nameof(ConnectionInfo.RedirectSound),
nameof(ConnectionInfo.RedirectAudioCapture),
- nameof(ConnectionInfo.RdpVersion),
+ nameof(ConnectionInfo.RdpVersion),
nameof(ConnectionInfo.RDPStartProgram),
nameof(ConnectionInfo.RDPStartProgramWorkDir),
- nameof(ConnectionInfo.UserViaAPI),
+ nameof(ConnectionInfo.ExternalCredentialProvider),
+ nameof(ConnectionInfo.UserViaAPI),
+ nameof(ConnectionInfo.ExternalAddressProvider),
nameof(ConnectionInfo.EC2InstanceId),
nameof(ConnectionInfo.EC2Region)
});
@@ -286,6 +288,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.SSHOptions),
nameof(ConnectionInfo.PuttySession),
nameof(ConnectionInfo.OpeningCommand),
+ nameof(ConnectionInfo.ExternalCredentialProvider),
nameof(ConnectionInfo.UserViaAPI),
});
break;
@@ -298,8 +301,10 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.SSHOptions),
nameof(ConnectionInfo.PuttySession),
nameof(ConnectionInfo.OpeningCommand),
+ nameof(ConnectionInfo.ExternalAddressProvider),
nameof(ConnectionInfo.EC2InstanceId),
nameof(ConnectionInfo.EC2Region),
+ nameof(ConnectionInfo.ExternalCredentialProvider),
nameof(ConnectionInfo.UserViaAPI),
});
break;
@@ -316,6 +321,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
case ProtocolType.HTTPS:
expectedProperties.AddRange(new []
{
+ nameof(ConnectionInfo.ExternalCredentialProvider),
nameof(ConnectionInfo.UserViaAPI),
nameof(ConnectionInfo.Password),
nameof(ConnectionInfo.Port),
@@ -325,6 +331,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
case ProtocolType.PowerShell:
expectedProperties.AddRange(new[]
{
+ nameof(ConnectionInfo.ExternalCredentialProvider),
nameof(ConnectionInfo.UserViaAPI),
nameof(ConnectionInfo.Password),
nameof(ConnectionInfo.Domain),
@@ -334,6 +341,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
case ProtocolType.IntApp:
expectedProperties.AddRange(new[]
{
+ nameof(ConnectionInfo.ExternalCredentialProvider),
nameof(ConnectionInfo.UserViaAPI),
nameof(ConnectionInfo.Password),
nameof(ConnectionInfo.Domain),