Merge pull request #2931 from MaxPlap/feature/VaultOpenbao-Connector

Feature/vault openbao connector
This commit is contained in:
Dimitrij
2025-10-17 16:59:18 +01:00
committed by GitHub
41 changed files with 1580 additions and 157 deletions

View File

@@ -98,6 +98,7 @@
<PackageVersion Include="System.ValueTuple" Version="4.6.1" />
<PackageVersion Include="System.Windows.Extensions" Version="9.0.10" />
<PackageVersion Include="System.Xml.ReaderWriter" Version="4.3.1" />
<PackageVersion Include="VaultSharp" Version="1.17.5.1" />
<PackageVersion Include="VncSharpCore" Version="1.2.1" />
<PackageVersion Include="ZstdSharp.Port" Version="0.8.6" />
</ItemGroup>

View File

@@ -20,10 +20,14 @@
<PackageReference Include="AWSSDK.EC2" />
<PackageReference Include="BouncyCastle.Cryptography" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="VaultSharp" />
</ItemGroup>
<ItemGroup>
<Compile Update="AWS\AWSConnectionForm.cs" />
<Compile Update="CPS\CPSConnectionForm.cs" />
<Compile Update="DSS\SSConnectionForm.cs" />
<Compile Update="VO\VaultOpenbaoConnectionForm.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,95 @@
using Microsoft.Win32;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VaultSharp;
using VaultSharp.V1.AuthMethods;
using VaultSharp.V1.AuthMethods.Token;
using VaultSharp.V1.SecretsEngines;
namespace ExternalConnectors.VO {
public class VaultOpenbaoException(string message, string arguments) : Exception(message) {
public string Arguments { get; set; } = arguments;
}
public static class VaultOpenbao {
private static RegistryKey baseKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteVaultOpenbao");
private static string token = "";
private static VaultClient GetClient() {
string url = (string)baseKey.GetValue("URL", "");
if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(token)) {
using VaultOpenbaoConnectionForm voForm = new();
voForm.tbUrl.Text = url;
_ = voForm.ShowDialog();
if (voForm.DialogResult != DialogResult.OK)
throw new VaultOpenbaoException($"No credential provided", null);
url = voForm.tbUrl.Text;
token = voForm.tbToken.Text;
}
IAuthMethodInfo authMethod = new TokenAuthMethodInfo(token);
var vaultClientSettings = new VaultClientSettings(url, authMethod);
VaultClient client = new(vaultClientSettings);
var sysInfo = client.V1.System.GetInitStatusAsync().Result;
if (!sysInfo) {
MessageBox.Show("Test connection failed", "Vault Openbao", MessageBoxButtons.OK, MessageBoxIcon.Error);
throw new VaultOpenbaoException($"Url not working", null);
}
baseKey.SetValue("URL", url);
return client;
}
private static void TestMountType(VaultClient vaultClient, string mount, int VaultOpenbaoSecretEngine) {
switch (vaultClient.V1.System.GetSecretBackendAsync(mount).Result.Data.Type.Type) {
case "kv" when VaultOpenbaoSecretEngine != 0:
throw new VaultOpenbaoException($"Backend of type kv does not match expected type {VaultOpenbaoSecretEngine}", null);
case "ldap" when VaultOpenbaoSecretEngine != 1 && VaultOpenbaoSecretEngine != 2:
throw new VaultOpenbaoException($"Backend of type ldap does not match expected type {VaultOpenbaoSecretEngine}", null);
}
}
public static void ReadPasswordSSH(int secretEngine, string mount, string role, string username, out string password) {
VaultClient vaultClient = GetClient();
TestMountType(vaultClient, mount, secretEngine);
switch (secretEngine) {
case 0:
var kv = vaultClient.V1.Secrets.KeyValue.V2.ReadSecretAsync(role, mountPoint: mount).Result;
password = kv.Data.Data[username].ToString();
return;
//case "ssh": // TODO: does not work with Keyboard-Interactive yet
// var ssh = vaultClient.V1.Secrets.SSH.GetCredentialsAsync(role, address, username, mount).Result;
// password = ssh.Data.Key;
// return;
default:
throw new VaultOpenbaoException($"Backend of type {secretEngine} is not supported", null);
}
}
public static void ReadPasswordRDP(int secretEngine, string mount, string role, ref string username, out string password) {
VaultClient vaultClient = GetClient();
TestMountType(vaultClient, mount, secretEngine);
switch (secretEngine) {
case 0:
var kv = vaultClient.V1.Secrets.KeyValue.V2.ReadSecretAsync(role, mountPoint: mount).Result;
password = kv.Data.Data[username].ToString();
return;
case 1:
var ldapd = vaultClient.V1.Secrets.OpenLDAP.GetDynamicCredentialsAsync(role, mount).Result;
username = ldapd.Data.Username;
password = ldapd.Data.Password;
return;
case 2:
var ldaps = vaultClient.V1.Secrets.OpenLDAP.GetStaticCredentialsAsync(role, mount).Result;
username = ldaps.Data.Username;
password = ldaps.Data.Password;
return;
default:
throw new VaultOpenbaoException($"Backend of type {secretEngine} is not supported", null);
}
}
}
}

View File

@@ -0,0 +1,184 @@
namespace ExternalConnectors.VO
{
partial class VaultOpenbaoConnectionForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
tbUrl = new TextBox();
tbToken = new TextBox();
btnOK = new Button();
btnCancel = new Button();
tableLayoutPanel1 = new TableLayoutPanel();
label1 = new Label();
label2 = new Label();
tableLayoutPanel2 = new TableLayoutPanel();
tableLayoutPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
SuspendLayout();
//
// tbUrl
//
tbUrl.Dock = DockStyle.Fill;
tbUrl.Location = new Point(174, 5);
tbUrl.Margin = new Padding(5);
tbUrl.Name = "tbUrl";
tbUrl.Size = new Size(559, 27);
tbUrl.TabIndex = 0;
//
// tbToken
//
tbToken.Dock = DockStyle.Fill;
tbToken.Location = new Point(174, 57);
tbToken.Margin = new Padding(5);
tbToken.Name = "tbToken";
tbToken.Size = new Size(559, 27);
tbToken.TabIndex = 2;
tbToken.UseSystemPasswordChar = true;
//
// btnOK
//
btnOK.Anchor = AnchorStyles.Right;
btnOK.DialogResult = DialogResult.OK;
btnOK.Location = new Point(250, 16);
btnOK.Margin = new Padding(5);
btnOK.Name = "btnOK";
btnOK.Size = new Size(101, 35);
btnOK.TabIndex = 10;
btnOK.Text = "OK";
btnOK.UseVisualStyleBackColor = true;
//
// btnCancel
//
btnCancel.Anchor = AnchorStyles.Left;
btnCancel.DialogResult = DialogResult.Cancel;
btnCancel.Location = new Point(387, 16);
btnCancel.Margin = new Padding(5);
btnCancel.Name = "btnCancel";
btnCancel.Size = new Size(101, 35);
btnCancel.TabIndex = 11;
btnCancel.Text = "Cancel";
btnCancel.UseVisualStyleBackColor = true;
//
// tableLayoutPanel1
//
tableLayoutPanel1.ColumnCount = 2;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 22.92994F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 77.07006F));
tableLayoutPanel1.Controls.Add(label1, 0, 0);
tableLayoutPanel1.Controls.Add(label2, 0, 1);
tableLayoutPanel1.Controls.Add(tbUrl, 1, 0);
tableLayoutPanel1.Controls.Add(tbToken, 1, 1);
tableLayoutPanel1.Dock = DockStyle.Top;
tableLayoutPanel1.Location = new Point(0, 0);
tableLayoutPanel1.Margin = new Padding(5);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 3;
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 31F));
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 31F));
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 31F));
tableLayoutPanel1.Size = new Size(738, 136);
tableLayoutPanel1.TabIndex = 12;
//
// label1
//
label1.AutoSize = true;
label1.Dock = DockStyle.Fill;
label1.Location = new Point(5, 0);
label1.Margin = new Padding(5, 0, 5, 0);
label1.Name = "label1";
label1.Size = new Size(159, 52);
label1.TabIndex = 2;
label1.Text = "Server URL";
label1.TextAlign = ContentAlignment.MiddleLeft;
//
// label2
//
label2.AutoSize = true;
label2.Dock = DockStyle.Fill;
label2.Location = new Point(5, 52);
label2.Margin = new Padding(5, 0, 5, 0);
label2.Name = "label2";
label2.Size = new Size(159, 52);
label2.TabIndex = 4;
label2.Text = "Access Token";
label2.TextAlign = ContentAlignment.MiddleLeft;
//
// tableLayoutPanel2
//
tableLayoutPanel2.ColumnCount = 5;
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 106F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 26F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 106F));
tableLayoutPanel2.Controls.Add(btnOK, 1, 0);
tableLayoutPanel2.Controls.Add(btnCancel, 3, 0);
tableLayoutPanel2.Dock = DockStyle.Bottom;
tableLayoutPanel2.Location = new Point(0, 149);
tableLayoutPanel2.Margin = new Padding(5);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel2.Size = new Size(738, 67);
tableLayoutPanel2.TabIndex = 13;
//
// VaultOpenbaoConnectionForm
//
AcceptButton = btnOK;
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(738, 216);
Controls.Add(tableLayoutPanel2);
Controls.Add(tableLayoutPanel1);
FormBorderStyle = FormBorderStyle.FixedDialog;
Margin = new Padding(5);
MaximizeBox = false;
MinimizeBox = false;
Name = "VaultOpenbaoConnectionForm";
SizeGripStyle = SizeGripStyle.Hide;
Text = "Vault/Openbao API Login Data";
Activated += VaultOpenbaoConnectionForm_Activated;
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
tableLayoutPanel2.ResumeLayout(false);
ResumeLayout(false);
}
#endregion
public System.Windows.Forms.TextBox tbUrl;
public System.Windows.Forms.TextBox tbToken;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
}
}

View File

@@ -0,0 +1,13 @@
namespace ExternalConnectors.VO
{
public partial class VaultOpenbaoConnectionForm : Form {
public VaultOpenbaoConnectionForm() {
InitializeComponent();
}
private void VaultOpenbaoConnectionForm_Activated(object sender, EventArgs e) {
tbUrl.Focus();
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -152,6 +152,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("EC2Region", connectionInfo.EC2Region));
element.Add(new XAttribute("ExternalCredentialProvider", connectionInfo.ExternalCredentialProvider));
element.Add(new XAttribute("ExternalAddressProvider", connectionInfo.ExternalAddressProvider));
// Vault/OpenBao specific
element.Add(new XAttribute("VaultOpenbaoMount", connectionInfo.VaultOpenbaoMount ?? string.Empty));
element.Add(new XAttribute("VaultOpenbaoRole", connectionInfo.VaultOpenbaoRole ?? string.Empty));
element.Add(new XAttribute("VaultOpenbaoSecretEngine", connectionInfo.VaultOpenbaoSecretEngine));
}
private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo)

View File

@@ -119,8 +119,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
private void InitializeRootNode(XmlElement connectionsRootElement)
{
string rootNodeName = connectionsRootElement?.Attributes["Name"]?.Value.Trim();
_rootNodeInfo.Name = rootNodeName;
_rootNodeInfo.Name = connectionsRootElement?.Attributes["Name"]?.Value.Trim();
}
private void CreateDecryptor(RootNodeInfo rootNodeInfo, XmlElement connectionsRootElement = null)
@@ -517,6 +516,9 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
connectionInfo.UserViaAPI = xmlnode.GetAttributeAsString("UserViaAPI");
connectionInfo.Inheritance.UserViaAPI = xmlnode.GetAttributeAsBool("InheritUserViaAPI");
connectionInfo.ExternalAddressProvider = xmlnode.GetAttributeAsEnum("ExternalAddressProvider", ExternalAddressProvider.None);
connectionInfo.VaultOpenbaoMount = xmlnode.GetAttributeAsString("VaultOpenbaoMount");
connectionInfo.VaultOpenbaoRole = xmlnode.GetAttributeAsString("VaultOpenbaoRole");
connectionInfo.VaultOpenbaoSecretEngine = xmlnode.GetAttributeAsEnum("VaultOpenbaoSecretEngine", VaultOpenbaoSecretEngine.Kv);
connectionInfo.EC2InstanceId = xmlnode.GetAttributeAsString("EC2InstanceId");
connectionInfo.EC2Region = xmlnode.GetAttributeAsString("EC2Region");
connectionInfo.UseRestrictedAdmin = xmlnode.GetAttributeAsBool("UseRestrictedAdmin");

View File

@@ -35,6 +35,9 @@ namespace mRemoteNG.Connection
private string _username = "";
//private SecureString _password = null;
private string _password = null;
private string _vaultRole = null;
private string _vaultMount = null;
private VaultOpenbaoSecretEngine _vaultSecretEngine = VaultOpenbaoSecretEngine.Kv;
private string _domain = "";
private string _vmId = "";
private bool _useEnhancedMode;
@@ -247,6 +250,36 @@ namespace mRemoteNG.Connection
set => SetField(ref _password, value, "Password");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.VaultOpenbaoMount)),
LocalizedAttributes.LocalizedDescription(nameof(Language.VaultOpenbaoMountDescription)),
AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
public virtual string VaultOpenbaoMount {
get => GetPropertyValue("VaultOpenbaoMount", _vaultMount);
set => SetField(ref _vaultMount, value, "VaultOpenbaoMount");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.VaultOpenbaoRole)),
LocalizedAttributes.LocalizedDescription(nameof(Language.VaultOpenbaoRoleDescription)),
AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
public virtual string VaultOpenbaoRole {
get => GetPropertyValue("VaultOpenbaoRole", _vaultRole);
set => SetField(ref _vaultRole, value, "VaultOpenbaoRole");
}
// external credential provider selector
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.VaultOpenbaoSecretEngine)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVaultOpenbaoSecretEngine)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
public VaultOpenbaoSecretEngine VaultOpenbaoSecretEngine {
get => GetPropertyValue("VaultOpenbaoSecretEngine", _vaultSecretEngine);
set => SetField(ref _vaultSecretEngine, value, "VaultOpenbaoSecretEngine");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.Domain)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDomain)),

View File

@@ -16,5 +16,8 @@ namespace mRemoteNG.Connection
[LocalizedAttributes.LocalizedDescription(nameof(Language.ECPOnePassword))]
OnePassword = 3,
[LocalizedAttributes.LocalizedDescription(nameof(Language.VaultOpenbao))]
VaultOpenbao = 4,
}
}

View File

@@ -5,6 +5,7 @@ using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tools;
using mRemoteNG.Tools.Cmdline;
using mRemoteNG.Tree.Root;
using mRemoteNG.UI;
using System;
using System.Diagnostics;
@@ -15,7 +16,6 @@ using System.Linq;
using System.Runtime.Versioning;
using System.Threading;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
// ReSharper disable ArrangeAccessorOwnerBody
@@ -104,7 +104,6 @@ namespace mRemoteNG.Connection.Protocol
string username = InterfaceControl.Info?.Username ?? "";
//string password = InterfaceControl.Info?.Password?.ConvertToUnsecureString() ?? "";
string password = InterfaceControl.Info?.Password ?? "";
string domain = InterfaceControl.Info?.Domain ?? "";
string UserViaAPI = InterfaceControl.Info?.UserViaAPI ?? "";
string privatekey = "";
@@ -113,7 +112,7 @@ namespace mRemoteNG.Connection.Protocol
{
try
{
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{UserViaAPI}", out username, out password, out domain, out privatekey);
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{UserViaAPI}", out username, out password, out _, out privatekey);
if (!string.IsNullOrEmpty(privatekey))
{
@@ -134,7 +133,7 @@ namespace mRemoteNG.Connection.Protocol
{
try
{
ExternalConnectors.CPS.PasswordstateInterface.FetchSecretFromServer($"{UserViaAPI}", out username, out password, out domain, out privatekey);
ExternalConnectors.CPS.PasswordstateInterface.FetchSecretFromServer($"{UserViaAPI}", out username, out password, out _, out privatekey);
if (!string.IsNullOrEmpty(privatekey))
{
@@ -154,7 +153,7 @@ namespace mRemoteNG.Connection.Protocol
else if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.OnePassword) {
try
{
ExternalConnectors.OP.OnePasswordCli.ReadPassword($"{UserViaAPI}", out username, out password, out domain, out privatekey);
ExternalConnectors.OP.OnePasswordCli.ReadPassword($"{UserViaAPI}", out username, out password, out _, out privatekey);
}
catch (ExternalConnectors.OP.OnePasswordCliException ex)
{
@@ -162,7 +161,13 @@ namespace mRemoteNG.Connection.Protocol
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ECPOnePasswordReadFailed + Environment.NewLine + ex.Message);
}
}
else if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.VaultOpenbao) {
try {
ExternalConnectors.VO.VaultOpenbao.ReadPasswordSSH((int)InterfaceControl.Info?.VaultOpenbaoSecretEngine, InterfaceControl.Info?.VaultOpenbaoMount ?? "", InterfaceControl.Info?.VaultOpenbaoRole ?? "", InterfaceControl.Info?.Username ?? "root", out password);
} catch (ExternalConnectors.VO.VaultOpenbaoException ex) {
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
}
if (string.IsNullOrEmpty(username))
{
@@ -181,7 +186,7 @@ namespace mRemoteNG.Connection.Protocol
try
{
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer(
$"{Properties.OptionsCredentialsPage.Default.UserViaAPIDefault}", out username, out password, out domain, out privatekey);
$"{Properties.OptionsCredentialsPage.Default.UserViaAPIDefault}", out username, out password, out _, out privatekey);
}
catch (Exception ex)
{
@@ -214,7 +219,7 @@ namespace mRemoteNG.Connection.Protocol
if (!string.IsNullOrEmpty(password))
{
string random = string.Join("", Guid.NewGuid().ToString("n").Take(8).Select(o => o));
string random = string.Join("", Guid.NewGuid().ToString("n").Take(8));
// write data to pipe
Thread thread = new(new ParameterizedThreadStart(CreatePipe));
thread.Start($"{random}{password}");

View File

@@ -1,26 +1,23 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
using AxMSTSCLib;
using AxMSTSCLib;
using mRemoteNG.App;
using mRemoteNG.Messages;
using mRemoteNG.Properties;
using mRemoteNG.Resources.Language;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tools;
using mRemoteNG.Tree.Root;
using mRemoteNG.UI;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Tabs;
using MSTSCLib;
using mRemoteNG.Resources.Language;
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using FileDialog = Microsoft.Win32.FileDialog;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using System.DirectoryServices.ActiveDirectory;
using mRemoteNG.Security;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
namespace mRemoteNG.Connection.Protocol.RDP
{
@@ -483,9 +480,19 @@ namespace mRemoteNG.Connection.Protocol.RDP
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ECPOnePasswordReadFailed + Environment.NewLine + ex.Message);
}
}
else if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.VaultOpenbao)
{
try {
if (connectionInfo.VaultOpenbaoSecretEngine == VaultOpenbaoSecretEngine.Kv)
gwu = connectionInfo.RDGatewayUsername;
ExternalConnectors.VO.VaultOpenbao.ReadPasswordRDP((int)connectionInfo.VaultOpenbaoSecretEngine, connectionInfo.VaultOpenbaoMount, connectionInfo.VaultOpenbaoRole, ref gwu, out gwp);
} catch (ExternalConnectors.VO.VaultOpenbaoException ex) {
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
}
if (connectionInfo.RDGatewayUseConnectionCredentials != RDGatewayUseConnectionCredentials.AccessToken)
if (connectionInfo.RDGatewayUseConnectionCredentials != RDGatewayUseConnectionCredentials.AccessToken)
{
_rdpClient.TransportSettings2.GatewayUsername = gwu;
_rdpClient.TransportSettings2.GatewayPassword = gwp;
@@ -595,6 +602,15 @@ namespace mRemoteNG.Connection.Protocol.RDP
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ECPOnePasswordReadFailed + Environment.NewLine + ex.Message);
}
}
else if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.VaultOpenbao) {
try {
if(connectionInfo.VaultOpenbaoSecretEngine == VaultOpenbaoSecretEngine.Kv)
userName = connectionInfo?.Username ?? "";
ExternalConnectors.VO.VaultOpenbao.ReadPasswordRDP((int)connectionInfo.VaultOpenbaoSecretEngine, connectionInfo?.VaultOpenbaoMount ?? "", connectionInfo?.VaultOpenbaoRole ?? "", ref userName, out password);
} catch (ExternalConnectors.VO.VaultOpenbaoException ex) {
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
}
if (string.IsNullOrEmpty(userName))
{

View File

@@ -0,0 +1,20 @@
using mRemoteNG.Resources.Language;
using mRemoteNG.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace mRemoteNG.Connection {
public enum VaultOpenbaoSecretEngine {
[LocalizedAttributes.LocalizedDescription(nameof(Language.VaultOpenbaoSecretEngineKeyValue))]
Kv = 0,
[LocalizedAttributes.LocalizedDescription(nameof(Language.VaultOpenbaoSecretEngineLDAPDynamic))]
LdapDynamic = 1,
[LocalizedAttributes.LocalizedDescription(nameof(Language.VaultOpenbaoSecretEngineLDAPStatic))]
LdapStatic = 2,
}
}

View File

@@ -19,7 +19,7 @@ namespace mRemoteNG.Resources.Language {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Language {
@@ -1609,6 +1609,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Discard.
/// </summary>
internal static string Discard {
get {
return ResourceManager.GetString("Discard", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disconnect.
/// </summary>
@@ -4575,6 +4584,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Secret engine used in Vault/Openbao to store the secret.
/// </summary>
internal static string PropertyDescriptionVaultOpenbaoSecretEngine {
get {
return ResourceManager.GetString("PropertyDescriptionVaultOpenbaoSecretEngine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to If you want to establish a view only connection to the host select yes..
/// </summary>
@@ -5766,24 +5784,6 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Do you want to save the changes made to the options?.
/// </summary>
internal static string SaveOptionsBeforeClosing {
get {
return ResourceManager.GetString("SaveOptionsBeforeClosing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Discard.
/// </summary>
internal static string Discard {
get {
return ResourceManager.GetString("Discard", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to SaveConnectionsOnExit.
/// </summary>
@@ -5811,6 +5811,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Do you want to save the changes made to the options?.
/// </summary>
internal static string SaveOptionsBeforeClosing {
get {
return ResourceManager.GetString("SaveOptionsBeforeClosing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Screen.
/// </summary>
@@ -6865,6 +6874,105 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Vault or Openbao.
/// </summary>
internal static string VaultOpenbao {
get {
return ResourceManager.GetString("VaultOpenbao", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Mount.
/// </summary>
internal static string VaultOpenbaoMount {
get {
return ResourceManager.GetString("VaultOpenbaoMount", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Mount where the secret is stored.
/// </summary>
internal static string VaultOpenbaoMountDescription {
get {
return ResourceManager.GetString("VaultOpenbaoMountDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Role.
/// </summary>
internal static string VaultOpenbaoRole {
get {
return ResourceManager.GetString("VaultOpenbaoRole", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Name or path of the secret.
/// </summary>
internal static string VaultOpenbaoRoleDescription {
get {
return ResourceManager.GetString("VaultOpenbaoRoleDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Vault/Openbao Secret Engine.
/// </summary>
internal static string VaultOpenbaoSecretEngine {
get {
return ResourceManager.GetString("VaultOpenbaoSecretEngine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to KeyValue (Username as Key).
/// </summary>
internal static string VaultOpenbaoSecretEngineKeyValue {
get {
return ResourceManager.GetString("VaultOpenbaoSecretEngineKeyValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to LDAP dynamic role.
/// </summary>
internal static string VaultOpenbaoSecretEngineLDAPDynamic {
get {
return ResourceManager.GetString("VaultOpenbaoSecretEngineLDAPDynamic", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to LDAP static role.
/// </summary>
internal static string VaultOpenbaoSecretEngineLDAPStatic {
get {
return ResourceManager.GetString("VaultOpenbaoSecretEngineLDAPStatic", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Token for Vault/Openbao.
/// </summary>
internal static string VaultOpenbaoToken {
get {
return ResourceManager.GetString("VaultOpenbaoToken", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Token to access Vault/Openbao server.
/// </summary>
internal static string VaultOpenbaoTokenPropertyDescription {
get {
return ResourceManager.GetString("VaultOpenbaoTokenPropertyDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Verify:.
/// </summary>

View File

@@ -1878,6 +1878,43 @@ mRemoteNG se nyní ukončí a zahájí instalaci.</value>
<data name="AutoSaveInMinutes" xml:space="preserve">
<value>Kliknutím na již otevřené připojení v seznamu otevře jeho záložku</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbao" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="WarnMeOnlyWhenClosingMultipleConnections1" xml:space="preserve">
<value>Upozornit mě pouze při ukončení několika připojení</value>
</data>

View File

@@ -2050,4 +2050,38 @@ Nightly umfasst Alphas, Betas und Release Candidates.</value>
<data name="WebView2InitializationFailed" xml:space="preserve">
<value>WebView2-Erstellung fehlgeschlagen</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -273,4 +273,38 @@
<data name="Gateway" xml:space="preserve">
<value>Πύλη</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -309,4 +309,41 @@
<data name="ErrorVerifyDatabaseVersionFailed" xml:space="preserve">
<value>VerificarVersionBasedeDatos (Config.Connections.Save) falló. {0}</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbao" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1541,4 +1541,38 @@ mRemoteNG ahora se cerrará y comenzará la instalación.</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>Guardar conexiones al salir</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -138,4 +138,38 @@
<data name="Rdp65536Colors" xml:space="preserve">
<value>65536 Värit (16-bit)</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2153,4 +2153,38 @@ Le canal nightly inclut les versions alpha, beta et release candidates.</value>
<data name="WebView2InitializationFailed" xml:space="preserve">
<value>Création WebView2 échouée avec une exception</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -333,4 +333,38 @@
<data name="Gateway" xml:space="preserve">
<value>Átjáró</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1556,4 +1556,41 @@ mRemoteNG verrà chiuso e l'installazione avrà inizio.</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>Salva le connessioni all'uscita</value>
</data>
<data name="VaultOpenbao" xml:space="preserve">
<value>Vault o Openbao</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1716,4 +1716,38 @@ mRemoteNGを終了してインストールを開始します</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>終了時に保存する</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1806,4 +1806,38 @@ mRemoteNG는 이제 종료되고 설치로 시작됩니다.</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>종료시 연결 저장</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -228,4 +228,38 @@ Nightly Channel includes Alphas, Betas &amp; Release Candidates.</value>
<data name="Proxy" xml:space="preserve">
<value>Proxy</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2005,4 +2005,38 @@ Nightly-kanalen inkluderer alpha-, beta- og release candidate-versjoner.</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>Lagre tilkoblinger ved avslutning</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1588,4 +1588,38 @@ mRemoteNG zal nu worden gesloten en beginnen met de installatie.</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>Sla verbindingen op bij afsluiten</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2359,4 +2359,38 @@ Kanał nocny obejmuje wersje alfa, beta i RC (gotowe do wydania).</value>
<data name="Gateway" xml:space="preserve">
<value>Brama</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -369,4 +369,38 @@
<data name="Gateway" xml:space="preserve">
<value>Gateway</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1554,4 +1554,38 @@
<data name="SaveConsOnExit" xml:space="preserve">
<value>Salvar as ligações à saída</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2473,6 +2473,42 @@ Nightly Channel includes Alphas, Betas &amp; Release Candidates.</value>
<data name="MsgRuntimeIsRequired" xml:space="preserve">
<value>runtime library is required</value>
</data>
<data name="VaultOpenbao" xml:space="preserve">
<value>Vault or Openbao</value>
</data>
<data name="VaultOpenbaoMount" xml:space="preserve">
<value>Mount</value>
</data>
<data name="VaultOpenbaoMountDescription" xml:space="preserve">
<value>Mount where the secret is stored</value>
</data>
<data name="VaultOpenbaoRole" xml:space="preserve">
<value>Role</value>
</data>
<data name="VaultOpenbaoRoleDescription" xml:space="preserve">
<value>Name or path of the secret</value>
</data>
<data name="VaultOpenbaoToken" xml:space="preserve">
<value>Token for Vault/Openbao</value>
</data>
<data name="VaultOpenbaoTokenPropertyDescription" xml:space="preserve">
<value>Token to access Vault/Openbao server</value>
</data>
<data name="VaultOpenbaoSecretEngine" xml:space="preserve">
<value>Vault/Openbao Secret Engine</value>
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" xml:space="preserve">
<value>Secret engine used in Vault/Openbao to store the secret</value>
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" xml:space="preserve">
<value>KeyValue (Username as Key)</value>
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" xml:space="preserve">
<value>LDAP dynamic role</value>
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" xml:space="preserve">
<value>LDAP static role</value>
</data>
<data name="MenuItem_Chat" xml:space="preserve">
<value>mR Chat</value>
<comment>Chat to dev</comment>

View File

@@ -1995,4 +1995,41 @@ mRemoteNG сейчас прекратит работу и начнет проц
<data name="SaveConsOnExit" xml:space="preserve">
<value>Сохранять подключения при выходе</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbao" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2172,4 +2172,38 @@ Nattliga kanalen inkluderar Alfa, Betor &amp; Utgåvokandidater.</value>
<data name="Gateway" xml:space="preserve">
<value>Nätverksnod (gateway)</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2416,4 +2416,38 @@
<data name="WarnMeOnlyWhenClosingMultipleConnections" xml:space="preserve">
<value>முன்னறிவிப்பு</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1628,4 +1628,38 @@ MRemoteNG şimdi kapanacak ve kurulum başlayacak.</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>Çıkışta bağlantıları kaydet</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2002,4 +2002,38 @@ mRemoteNG зараз припинить роботу і почне процес
<data name="SaveConsOnExit" xml:space="preserve">
<value>Зберігати з'єднання при виході</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -2080,4 +2080,38 @@ mRemoteNG 将退出并安装更新。</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>退出时保存连接配置文件</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -1575,4 +1575,38 @@ mRemoteNG 將立即結束並開始安裝。</value>
<data name="SaveConsOnExit" xml:space="preserve">
<value>結束時儲存連線</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="VaultOpenbaoMount" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoMountDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRole" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoRoleDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoToken" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoTokenPropertyDescription" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="PropertyDescriptionVaultOpenbaoSecretEngine" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineKeyValue" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPDynamic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
<data name="VaultOpenbaoSecretEngineLDAPStatic" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
</root>

View File

@@ -61,7 +61,6 @@ namespace mRemoteNG.Tree.Root
? TreeNodeType.Root
: TreeNodeType.PuttyRoot;
}
#endregion
}
}

View File

@@ -19,11 +19,9 @@ using mRemoteNG.Tree.Root;
using mRemoteNG.Resources.Language;
using System.Runtime.Versioning;
namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
{
namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid {
[SupportedOSPlatform("windows")]
public partial class ConnectionInfoPropertyGrid : FilteredPropertyGrid.FilteredPropertyGrid
{
public partial class ConnectionInfoPropertyGrid : FilteredPropertyGrid.FilteredPropertyGrid {
private readonly Dictionary<Type, IEnumerable<PropertyInfo>> _propertyCache = [];
private ConnectionInfo _selectedConnectionInfo;
private PropertyMode _propertyMode;
@@ -32,11 +30,9 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
/// The <see cref="ConnectionInfo"/> currently being shown by this
/// property grid.
/// </summary>
public ConnectionInfo SelectedConnectionInfo
{
public ConnectionInfo SelectedConnectionInfo {
get => _selectedConnectionInfo;
set
{
set {
if (_selectedConnectionInfo == value)
return;
@@ -49,11 +45,9 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
/// <summary>
/// Determines which set of properties this grid will display.
/// </summary>
public PropertyMode PropertyMode
{
public PropertyMode PropertyMode {
get => _propertyMode;
set
{
set {
if (_propertyMode == value)
return;
_propertyMode = value;
@@ -82,18 +76,15 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
/// </summary>
public bool RootNodeSelected { get; private set; }
public ConnectionInfoPropertyGrid()
{
public ConnectionInfoPropertyGrid() {
InitializeComponent();
PropertyValueChanged += pGrid_PropertyValueChanged;
}
private void SetGridObject()
{
private void SetGridObject() {
ClearFilters();
switch (PropertyMode)
{
switch (PropertyMode) {
case PropertyMode.Connection:
default:
SelectedObject = SelectedConnectionInfo;
@@ -113,24 +104,18 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
ShowHideGridItems();
}
private void ShowHideGridItems()
{
try
{
private void ShowHideGridItems() {
try {
if (SelectedConnectionInfo == null)
return;
if (RootNodeSelected && PropertyMode == PropertyMode.Connection)
{
if (SelectedConnectionInfo is RootPuttySessionsNodeInfo)
{
if (RootNodeSelected && PropertyMode == PropertyMode.Connection) {
if (SelectedConnectionInfo is RootPuttySessionsNodeInfo) {
BrowsableProperties = new[]
{
nameof(RootPuttySessionsNodeInfo.Name)
};
}
else if (SelectedConnectionInfo is RootNodeInfo)
{
} else if (SelectedConnectionInfo is RootNodeInfo) {
BrowsableProperties = new[]
{
nameof(RootNodeInfo.Name),
@@ -152,8 +137,7 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
List<string> strHide = new();
if (PropertyMode == PropertyMode.Connection)
{
if (PropertyMode == PropertyMode.Connection) {
// hide any inherited properties
strHide.AddRange(SelectedConnectionInfo.Inheritance.GetEnabledInheritanceProperties());
@@ -162,8 +146,7 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
strHide.AddRange(SpecialExternalCredentialProviderExclusions());
// ReSharper disable once SwitchStatementMissingSomeCases
switch (SelectedConnectionInfo.Protocol)
{
switch (SelectedConnectionInfo.Protocol) {
case ProtocolType.RDP:
strHide.AddRange(SpecialRdpExclusions());
break;
@@ -178,18 +161,14 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
if (SelectedConnectionInfo is PuttySessionInfo)
strHide.Add(nameof(AbstractConnectionRecord.Favorite));
}
else if (PropertyMode == PropertyMode.DefaultConnection)
{
} else if (PropertyMode == PropertyMode.DefaultConnection) {
strHide.Add(nameof(AbstractConnectionRecord.Hostname));
strHide.Add(nameof(AbstractConnectionRecord.Name));
}
HiddenProperties = strHide.ToArray();
Refresh();
}
catch (Exception ex)
{
} catch (Exception ex) {
Runtime.MessageCollector.AddMessage(
MessageClass.ErrorMsg,
Language.ConfigPropertyGridHideItemsFailed +
@@ -197,8 +176,7 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
}
}
private IEnumerable<PropertyInfo> GetPropertiesForGridObject(object currentGridObject)
{
private IEnumerable<PropertyInfo> GetPropertiesForGridObject(object currentGridObject) {
if (_propertyCache.TryGetValue(currentGridObject.GetType(), out IEnumerable<PropertyInfo> properties))
return properties;
@@ -209,8 +187,7 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
return props;
}
private bool IsValidForProtocol(PropertyInfo property, ProtocolType protocol, bool skipProtocolCheck)
{
private bool IsValidForProtocol(PropertyInfo property, ProtocolType protocol, bool skipProtocolCheck) {
return
property.GetCustomAttribute<BrowsableAttribute>()?.Browsable != false &&
(skipProtocolCheck || property.GetCustomAttribute<AttributeUsedInProtocol>()?
@@ -218,78 +195,74 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
.Contains(protocol) != false);
}
private List<string> SpecialExternalAddressProviderExclusions()
{
private List<string> SpecialExternalAddressProviderExclusions() {
List<string> strHide = new();
// aws
if (SelectedConnectionInfo.ExternalAddressProvider != ExternalAddressProvider.AmazonWebServices)
{
if (SelectedConnectionInfo.ExternalAddressProvider != ExternalAddressProvider.AmazonWebServices) {
strHide.Add(nameof(AbstractConnectionRecord.EC2InstanceId));
strHide.Add(nameof(AbstractConnectionRecord.EC2Region));
}
return strHide;
}
private List<string> SpecialExternalCredentialProviderExclusions()
{
private List<string> SpecialExternalCredentialProviderExclusions() {
List<string> strHide = new();
if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.None)
{
if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.None) {
strHide.Add(nameof(AbstractConnectionRecord.UserViaAPI));
}
else if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer
|| SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.ClickstudiosPasswordState)
{
strHide.Add(nameof(AbstractConnectionRecord.VaultOpenbaoMount));
strHide.Add(nameof(AbstractConnectionRecord.VaultOpenbaoRole));
} else if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer
|| SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.ClickstudiosPasswordState) {
strHide.Add(nameof(AbstractConnectionRecord.Username));
strHide.Add(nameof(AbstractConnectionRecord.Password));
strHide.Add(nameof(AbstractConnectionRecord.Domain));
strHide.Add(nameof(AbstractConnectionRecord.VaultOpenbaoMount));
strHide.Add(nameof(AbstractConnectionRecord.VaultOpenbaoRole));
} else if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.OnePassword) {
strHide.Add(nameof(AbstractConnectionRecord.VaultOpenbaoMount));
strHide.Add(nameof(AbstractConnectionRecord.VaultOpenbaoRole));
} else if (SelectedConnectionInfo.ExternalCredentialProvider == ExternalCredentialProvider.VaultOpenbao) {
strHide.Add(nameof(AbstractConnectionRecord.UserViaAPI));
if (SelectedConnectionInfo.VaultOpenbaoSecretEngine != VaultOpenbaoSecretEngine.Kv)
strHide.Add(nameof(AbstractConnectionRecord.Username));
strHide.Add(nameof(AbstractConnectionRecord.Password));
}
return strHide;
}
/// <summary>
///
/// </summary>
private List<string> SpecialRdpExclusions()
{
private List<string> SpecialRdpExclusions() {
List<string> strHide = new();
if (SelectedConnectionInfo.RDPMinutesToIdleTimeout <= 0)
{
if (SelectedConnectionInfo.RDPMinutesToIdleTimeout <= 0) {
strHide.Add(nameof(AbstractConnectionRecord.RDPAlertIdleTimeout));
}
if (SelectedConnectionInfo.RDGatewayUsageMethod == RDGatewayUsageMethod.Never)
{
if (SelectedConnectionInfo.RDGatewayUsageMethod == RDGatewayUsageMethod.Never) {
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayHostname));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUseConnectionCredentials));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayAccessToken));
}
else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.Yes ||
SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.SmartCard)
{
} 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));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayAccessToken));
}
else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.ExternalCredentialProvider)
{
} else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.ExternalCredentialProvider) {
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayAccessToken));
}
else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.AccessToken)
{
} else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.AccessToken) {
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword));
strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername));
@@ -298,23 +271,19 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
}
if (!(SelectedConnectionInfo.Resolution == RDPResolutions.FitToWindow ||
SelectedConnectionInfo.Resolution == RDPResolutions.Fullscreen))
{
SelectedConnectionInfo.Resolution == RDPResolutions.Fullscreen)) {
strHide.Add(nameof(AbstractConnectionRecord.AutomaticResize));
}
if (SelectedConnectionInfo.RedirectDiskDrives != RDPDiskDrives.Custom)
{
if (SelectedConnectionInfo.RedirectDiskDrives != RDPDiskDrives.Custom) {
strHide.Add(nameof(AbstractConnectionRecord.RedirectDiskDrivesCustom));
}
if (SelectedConnectionInfo.RedirectSound != RDPSounds.BringToThisComputer)
{
if (SelectedConnectionInfo.RedirectSound != RDPSounds.BringToThisComputer) {
strHide.Add(nameof(AbstractConnectionRecord.SoundQuality));
}
if (!SelectedConnectionInfo.UseVmId)
{
if (!SelectedConnectionInfo.UseVmId) {
strHide.Add(nameof(AbstractConnectionRecord.VmId));
strHide.Add(nameof(AbstractConnectionRecord.UseEnhancedMode));
}
@@ -322,17 +291,14 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
return strHide;
}
private List<string> SpecialVncExclusions()
{
private List<string> SpecialVncExclusions() {
List<string> strHide = new();
if (SelectedConnectionInfo.VNCAuthMode == ProtocolVNC.AuthMode.AuthVNC)
{
if (SelectedConnectionInfo.VNCAuthMode == ProtocolVNC.AuthMode.AuthVNC) {
strHide.Add(nameof(AbstractConnectionRecord.Username));
strHide.Add(nameof(AbstractConnectionRecord.Domain));
}
if (SelectedConnectionInfo.VNCProxyType == ProtocolVNC.ProxyType.ProxyNone)
{
if (SelectedConnectionInfo.VNCProxyType == ProtocolVNC.ProxyType.ProxyNone) {
strHide.Add(nameof(AbstractConnectionRecord.VNCProxyIP));
strHide.Add(nameof(AbstractConnectionRecord.VNCProxyPassword));
strHide.Add(nameof(AbstractConnectionRecord.VNCProxyPort));
@@ -342,19 +308,14 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
return strHide;
}
private void UpdateConnectionInfoNode(PropertyValueChangedEventArgs e)
{
private void UpdateConnectionInfoNode(PropertyValueChangedEventArgs e) {
if (IsShowingInheritance)
return;
if (e.ChangedItem.Label == Language.Protocol)
{
if (e.ChangedItem.Label == Language.Protocol) {
SelectedConnectionInfo.SetDefaultPort();
}
else if (e.ChangedItem.Label == Language.Name)
{
if (Settings.Default.SetHostnameLikeDisplayName)
{
} else if (e.ChangedItem.Label == Language.Name) {
if (Settings.Default.SetHostnameLikeDisplayName) {
if (!string.IsNullOrEmpty(SelectedConnectionInfo.Name))
SelectedConnectionInfo.Hostname = SelectedConnectionInfo.Name;
}
@@ -364,51 +325,41 @@ namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid
DefaultConnectionInfo.Instance.SaveTo(Settings.Default, a => "ConDefault" + a);
}
private void UpdateRootInfoNode(PropertyValueChangedEventArgs e)
{
private void UpdateRootInfoNode(PropertyValueChangedEventArgs e) {
if (!(SelectedObject is RootNodeInfo rootInfo))
return;
if (e.ChangedItem.PropertyDescriptor?.Name != "Password")
return;
if (rootInfo.Password)
{
if (rootInfo.Password) {
string passwordName = Properties.OptionsDBsPage.Default.UseSQLServer ? Language.SQLServer.TrimEnd(':') : Path.GetFileName(Runtime.ConnectionsService.GetStartupConnectionFileName());
Optional<System.Security.SecureString> password = MiscTools.PasswordDialog(passwordName);
// operation cancelled, dont set a password
if (!password.Any() || password.First().Length == 0)
{
if (!password.Any() || password.First().Length == 0) {
rootInfo.Password = false;
return;
}
rootInfo.PasswordString = password.First().ConvertToUnsecureString();
}
else
{
} else {
rootInfo.PasswordString = "";
}
}
private void UpdateInheritanceNode()
{
private void UpdateInheritanceNode() {
if (IsShowingDefaultProperties && IsShowingInheritance)
DefaultConnectionInheritance.Instance.SaveTo(Settings.Default, a => "InhDefault" + a);
}
private void pGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
try
{
private void pGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) {
try {
UpdateConnectionInfoNode(e);
UpdateRootInfoNode(e);
UpdateInheritanceNode();
ShowHideGridItems();
}
catch (Exception ex)
{
} catch (Exception ex) {
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
Language.ConfigPropertyGridValueFailed + Environment.NewLine +
ex.Message, true);