Web applications for PSM

This topic describes how to create PSM connection components for web applications.

Prerequisites

  • A supported browser must be installed. For more information, see Supported browsers below.

  • The latest browser driver must be installed for all browsers that you use. For more information, see Supported browsers below.

  • Microsoft Edge requires further hardening configuration. For details, see PSM Hardening Tasks.

  • CPM plugins require .NET Framework 4.8. If you are using an older version of the CPM, .NET Framework 4.8 must be installed on the CPM machine as well.

Supported browsers

 

CyberArk may choose not to provide maintenance and support services for Web applications for PSM with relation to any of the platforms and systems listed below which have reached their formal End-of-Life date, as published by their respective vendors from time to time. For more details, contact your CyberArk support representative.

You can configure PSM connection components for web applications based on a default generic connection component that is created in the PVWA automatically during installation.

The following browsers are supported:

Browser

Download info

Google Chrome (32-bit), version 100 or later

Click here to download this version

Microsoft Edge (32-bit), version 103 or later

Click here to download this version

To prevent incompatibility issues with the PSM Webapp infrastructure, with every new browser version update, make sure to also update the browser's driver with the same version. For example, when updating the Chrome browser to version 104, the Chrome driver on the machine must also be updated to version 104.

Download and install the latest driver:

  • For Google Chrome, use this link to download the latest stable 32-bit (x86) driver.

  • For Microsoft Edge, use this link to download the latest stable 32-bit (x86) driver.

Copy the relevant downloaded exe file, Chromedriver.exe or msedgedriver.exe to the PSM Components folder.

Configuration

You can configure connection components for web applications based on a default generic connection component that is created in the PVWA automatically during installation.

Convert WebForm to WebApp

You can convert any connector that is based on the WebFormDispatcher.

To convert the connector from WebForm to WebApp:

  1. In the PVWA, click Administration Configuration Options, and then click Options.
  2. In the left pane, expand Connection Components, and then expand the relevant connector.
  3. Click Target Settings, and then do the following:

    Property

    Value

    ClientDispatcher

    Change the value to: "{PSMComponentsFolder}\CyberArk.PSM.WebAppDispatcher.exe" "{PSMComponentsFolder}"

    ClientApp

    Change the value to the relevant browser. For details, see Select the Browser.

Web Form Fields

Syntax

Specify the information listed below in WebFormFields. Add the fields in a list of rows, using the following format:

Examples

Preconnect custom code

Overview

If you want to run custom logic before the login process, for example, creating a temporary user for the login process, you can implement an interface using a Preconnect dll file provided by CyberArk. The implemented dll can then be configured to be called prior to a connection, and the returned values can be used in the login process.

Create the preconnect dll

To be able to develop the logic that will be performed before running the connection, you need to implement the interface defined in the PreconnectUtils.dll file.

To create the Preconnect dll:

  1. In the PSM\Components folder, locate the PreconnectUtils.dll file.
  2. Create the dll by implementing the IPreconnectContract defined in the PreconnectUtils.dll file, and then implement the GetParametersmethod: GetParameters(Dictionary,string, SecureString> parameters, WriteToLogHandler WriteToLogMethod)

    Inputs

    Output

    Parameters - A key-value dictionary of the parameters retrieved from the account that are defined in the Preconnect parameter.

    WriteToLogMethod - A handle method used to write information to the logs. See To write information to the logs: below.

    A key-value dictionary of parameters used in the login process.

  3. Make sure that you put the Preconnect dll in the PSM\Components folder.

To write information to the logs:

  • Use WriteToLogMethod to write to the logs.
  • Use Consts to define the log level.

     

    WriteToLogMethod("Start Method", Consts.LOG_LEVEL_INFO);

To return a custom error message to the end user:

  • Throw a PreconnectException exception with the error message that you want the end user to see.

     

    throw new PreconnectException("Preconnect exception");

    Any other exception that is thrown is written to the log only, and the end user will receive a general error message.

Configure the web application

To define the Preconnect dll that will be used during the connection:

  1. In the PVWA, click AdministrationConfiguration Options, and then click Options.
  2. In the left pane, expand Connection Components, and then expand the relevant connector.
  3. Expand Target Settings, right-click Client Specific, and add the following two parameters.

    Parameter

    Description

    PreConnectDllName

    The name of dll file that contains the Preconnect logic.

    Note: The dll file must be located in the PSM Components folder.

    PreConnectParameters

    A comma-separated list of parameters that is sent to the Preconnect dll file.

    Example: username,password

    Note: The parameter names are case-sensitive and should be entered using the same case as they are defined in the configuration options.

  4. If you want to use the values from the Preconnect dll, add these values in the WebFormFields, in the Input field. See Input field, above, in this topic. This is done for each connector.

     

    Different symbols are used for Preconnect parameters in WebFormFields.

    • Use the ampersand symbol, &&, for parameters from the Preconnect dll: &placeholder&
    • Use the brace symbol {} for account or configuration parameters: {placeholder}