ssh public key login and datasource with integrated security

Resolved

ssh public key login and datasource with integrated security

avatar

Hi!

I am using the module V2022.3.1.6

I have created a datasource with IntegratedSecurity:
$DS = New-RDMDataSource -SQLServer -Database "RDM_Test" -IntegratedSecurity -Server "<my sql server>" -Name "RDM_test_is" -SetDataSource
Set-RDMDataSource -DataSource $DS



If I start a powershell session via ssh logging in via username/password everything works fine. But if I use ssh public key login I get the following error:

$ds = Get-RDMDataSource RDM_test_is
Set-RDMCurrentDataSource $ds

Unable to Connect to your Data Source
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
[] Go Offline  [] Cancel  [?] Help (default is "Go Offline"):


I want to use ssh public key login (because of security reasons) and I also want to use integrated security (because of security reasons).

What can I do?

CU,
Timo

All Comments (3)

avatar

Hello,

When you open PowerShell session with SSH login via username/password, the PowerShell session contains your id and that's why using Integrated Security is working to connect on the SQL database from RDM.

When opening the PowerShell session with a SSH public key, it doesn't seems that this session is opened in a user context. And because of that, even a basic SQL connection string using Integrated Security won't work.

Let us know if you have further questions about this.

Best regards,

Érica Poirier

avatar

Hi!

Yes, after thinking a while about it, this is not a bug, it's a feature. Otherwise you can impersonate as someone else against the domain server without knowing the password.

Thanks!

CU,
Timo

avatar

Hello,

Thank you for your feedback and glad that we agreed on this point.

Best regards,

Érica Poirier