Web Applications for PSM

Supported browsers

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:

  • Google Chrome (32-bit)
  • Internet Explorer versions 7-11

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.

Prerequisites

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.

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}