diff --git a/mRemoteNG/Connection/Protocol/PuttyBase.cs b/mRemoteNG/Connection/Protocol/PuttyBase.cs index 45afdeac..d20d7c72 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 SecretServerInterface; // ReSharper disable ArrangeAccessorOwnerBody @@ -114,6 +115,20 @@ namespace mRemoteNG.Connection.Protocol } } + // access secret server api if necessary + if (username.StartsWith("SSAPI:")) + { + var domain = ""; // dummy + try + { + SecretServerInterface.SecretServerInterface.fetchSecretFromServer(username, out username, out password, out domain); + } + catch (Exception ex) + { + Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0); + } + } + arguments.Add("-" + (int)PuttySSHVersion); if (!Force.HasFlag(ConnectionInfo.Force.NoCredentials)) diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs index 502c461a..729352f8 100644 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs +++ b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs @@ -461,6 +461,20 @@ namespace mRemoteNG.Connection.Protocol.RDP var password = connectionInfo?.Password ?? ""; var domain = connectionInfo?.Domain ?? ""; + // access secret server api if necessary + if (userName.StartsWith("SSAPI:")) + { + try + { + SecretServerInterface.SecretServerInterface.fetchSecretFromServer(userName, out userName, out password, out domain); + } + catch (Exception ex) + { + Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0); + } + + } + if (string.IsNullOrEmpty(userName)) { if (Settings.Default.EmptyCredentials == "windows") diff --git a/mRemoteNG/mRemoteNG.csproj b/mRemoteNG/mRemoteNG.csproj index be276f44..74116d51 100644 --- a/mRemoteNG/mRemoteNG.csproj +++ b/mRemoteNG/mRemoteNG.csproj @@ -1412,6 +1412,12 @@ False + + + {CBEEE1A0-B917-4F61-812B-85C4C15E80FC} + SecretServerInterface + + :: When passing paths to powershell scripts, check if the path ends with a backslash "\" :: If it does, then the backslash may be interpreted as an escape character. Add another backslash to cancel the first one.