PSM - How to configure a PSM Connection Component for SQL Server Management Studio
Environment
12.6;13.0;13.2;14.0;14.2;14.4;14.6 Privileged Access Manager (PAM, self-hosted) PSM
Procedure
- On the PSM machine, install the Microsoft SQL Server Database Administration Tool. SQL Server Management Studio can be obtained from the Microsoft website.
- The PSM AppLocker configuration is saved in the PSMConfigureAppLocker.xml configuration file and must be edited manually before you run the configuration script.
- Remove the read-only permissions from the PSMConfigureAppLocker.xml file.
- In the Hardening subfolder of the PSM installation folder, open the PSMConfigureAppLocker.xml configuration file and edit it as follows
- Configure the AppLocker to permit SQL Server Management Studio to run on the PSM server.
a. Modify the SQL Server Management Studio <version> processes section, please change the path of the ssms.exe accordingly as per the env:
|
SQL Server Management Studio Version |
Add |
|
2008 |
<Application Name="SSMS2008" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" Method="Publisher" /> |
|
2012 |
<Application Name="SSMS2012" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" /> |
|
2016 |
<Application Name="SSMS2016" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" /> |
|
2017 |
<Application Name="SSMS2017" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe" Method="Publisher" /> |
|
2018 |
<Application Name="SSMS18" Type="Exe" Path="C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe" Method="Publisher" /> |
|
2022 |
<Application Name="SSMS19" Type="Exe" Path="C:\Program Files\Microsoft SQL Server Management Studio 19\Common7\IDE\Ssms.exe" Method="Publisher" /> |
|
2025 |
<Application Name="SSMS21" Type="Exe" Path="C:\Program Files\Microsoft SQL Server Management Studio 21\Common7\IDE\Ssms.exe" Method="Publisher" /> |
b. Make sure that the paths specified in the PSMConfigureAppLocker.xml match the installation paths of SQL Server Management Studio.
c. Save the PSMConfigureAppLocker.xml configuration file and close it.
d. Open a PowerShell window, and use the following command to start the script (run as administrator)
CD “C:\Program Files (x86)\CyberArk\PSM\Hardening”
.\PSMConfigureAppLocker.ps1
6. Next, update the PSM-SQLServerMgmtStudio and PSMSQLServerMgmtStudio-Win connection components as follows:
-
- In the PVWA, click Administration to display the System Configuration page, then click Options; the main system configuration editor appears.
- Expand the Connection Components section, then expand the PSMSQLServerMgmtStudio connection component.
- For PSM-SQLServerMgmtStudio: In Target Settings, set the ClientApp parameter to the SQL Server Management Studio installation path on the PSM machine.
- For PSM-SQLServerMgmtStudio-Win: In Target Settings > Client Specific, set the ClientInstallationPath parameter value to the SQL Server Management Studio installation path on the PSM machine.
7. For PSM-SQLServerMgmtStudio and PSM-SQLServerMgmtStudio-Win: In Target Settings > Client Specific, make sure that the WaitBeforeCmdlineParmsHide parameter value is set to 20000.
8. Expand Target Settings, then select Lock Application Window.
9. For PSM-SQLServerMgmtStudio: Right-click the MainWindowClass parameter and in the pop-up menu, select Revert to Default. This clears the MainWindowClass setting. For PSM-SQLServerMgmtStudio-Win: Set the parameter Enable to No.
Known Issues:
- This connection client only supports local database users, and does not support domain users for connecting to the database.
- Double quotation signs (") in passwords are not supported. As SSMS.exe doesn't support the double quotation (") character as part of a password, the PVWA does not support it either. Add the double quotation (") character as a forbidden character in the CPM.
- Open Object Explorer without specifying the database password. By default, when opening SQL Server Management Studio, two windows are created – Editor and Object Explorer. The Object Explorer window requires credentials.
Work Around: When the editor window is in focus, press ALT+Q+O; the Object Explorer window will be auto-authenticated.
After configuring the PSM-SQLServerMgmtStudio or PSMSQLServerMgmtStudio-Win, when trying to connect you might see an error message with the title "PSM Disconnect Failed", with further dialog:
PSMSR133E [<unique identifier>] Failed to create process <Program Path>. Code: 2
The cause of the problem is generally an invalid program path. For example, check to make sure that any program with \Program Files (x86) in the path has a space between the Files and (x86)
To fix this error correct the program path by going to Administration -> Options -> Connection Components and then Target Settings for the connection component.