Skip to main content

CyberArk Integration

Privilege Secure contains a built-in vault for credential management, but can uniquely map to a CyberArk vault. CyberArk connectors can be used for the following purposes:

  • Service Accounts – Use to perform Active Directory synchronization
  • Activities – Use to configure the target account for the activity

CyberArk connectors use the Central Credential Provider. The Central Credential Provider provides a REST interface that allows applications to check out passwords from a CyberArk vault. The accounts are identified by a safe, folder, address and username. For service accounts, the username, address, safe and folder are provided directly in the service account definition. For activities, provide the username and address in the LoginAccountName format. The safe and folder information is provided directly in the activity definition.

Add a Vault Connector for CyberArk

Follow the steps to add the CyberArk Connector.

Step 1 – Navigate to the Configuration > Integration Connectors page.

Step 2 – In the Integration Connectors list, click the Add Integration Connector icon.

Add CyberArk Connector Integration

Step 3 – Enter the following information:

  • Connector Name – Enter a name to uniquely identify the connector
  • Connector Description (Optional) – Enter a brief description to identify the service account
  • Connector Template – A selection of templates for connector configurations. Select CyberArk from the drop-down list.
  • API Url – The base url for the CyberArk Common Credential provider. https://cyberarkhost.example.com
  • App ID – The application identifier to use when requesting accounts from the CyberArk Common Credential Provider
  • Client Certificate – The base64 text from the certificate file needed to authenticate to the CyberArk Common Credential Provider

Step 4 – Click the Save icon to create the new integration connector.

The next step is to import the data from CyberArk.

Advanced CyberArk Settings

Use the Advanced CyberArk Settings to override the default behavior of the CyberArk connector. This section provides the option to enter customer PowerShell scripts that Privilege Secure will use to check out and check in accounts.

SkipCertificateCheck

Allows the rest call to skip the certificate check for the built-in check out step.

CheckoutScriptBlock

Supply a PowerShell script block to be used for checking out password from CyberArk. The script block will be called with two arguments. It is recommended to use a param() block as follows:

param(

        [Parameter(Mandatory = $true)]

$Options,

        [Parameter(Mandatory = $true)]

        $Credential

    )

The scriptblock must return the updated $Credential setting the Username, Domain and Password value to the values that represent the information for the account checked out. The default implementation will set these values to the returned Username, Address and Content of the response from the API call of the Central Credential Provider.

$Options will have settings from the BYOV connector and information populated by the activity session.

Variable NameDefinitionExample Value
$Options.ConnectorThe options defined by the connector configuration.
$Options.Connector.NameThe connector nameCyberArk
$Options.Connector.IdThe connector GUID identifier45adf881-2875-485f-b789-80ea6ba03623
$Options.Connector.Options.ApiURLThe base URL for the CyberArk Central Credential Provider webservice. The script will append /AIMWebService/api/Accounts to this URL. For more information on the Central Credential Provider you can reference Central Credential Provider Webservice Configurationhttps://vault.example.com
$Options.Connector.Options.AppidThe application id to be used by Privilege Secure to make requests.privilegesecure
$Options.Connector.Options.ClientCertificateThumbprint of certificate to use for client certificate authentication, leave empty if client certificates are not used. The certificate must be installed into the certificate store of the ActionService machine.64D25855C84CCDC581799b49362BA13DB66BD795
$Options.Connector.Options.SkipCertificateCheckWhether or not to skip the certificate check.True False
$Options.ActivitySessionThe ActivitySession members of the $Options object only exist if the checkout happens during an Activity Session.
$Options.ActivitySession.LoginAccountNameFormatThe template used by the activity session to generate the LoginAccountName%targetdomainname%%samaccountname%-a
$Options.ActivitySession.LoginAccountNameThe generated LoginAccountNamePrivilegeSecure\username-a
$Options.ActivitySession.UserIdThe GUID identifier of the requesting user45adf881-2875-485f-b789-80ea6a03623
$Options.ActivitySession.TargetUserIdThe GUID identifier of the target user for the activity session45adf881-2875-485f-b789-80ea6a03623
$Options.ActivitySession.TargetIdThe GUID identifier of the target host for the activity session45adf881-2875-485f-b789-80ea6a03623
$Options.TargetHostThe host record associated with the activity session
$Options.TargetHost.IdThe GUID identifier of the target host45adf881-2875-485f-b789-80ea6a03623
$Options.TargetHost.DistinguishedNameThe Active Directory distinguished name of the hostCN=PrivilegeSecure,CN=Computers,DC=example,DC=com
$Options.TargetHost.DnsHostNameThe FQDN of the target hostPrivilegeSecure.example.com
$Options.TargetHost.IPAddressThe IPv4 Address of the target host192.168.1.1
$Options.TargetHost.NameThe Name of the target hostExample\privilegesecure
$Options.TargetHost.NetBiosNameThe NETBIOS name of the target hostPRIVILEGESECURE
$Options.TargetHost.ObjectSidThe Sid of the computerS-1-5-21-2801403971-1535060088-5098816251143
$Options.TargetHost.SamaccountnameThe Domain and Samaccountname of the computerEXAMPLE\PRIVILEGESECURE$

$Credential has the values for the Credential generated for lookup, on Checkout the username/domain/password will most likely be a random value not related to the account to be checked out.

Variable NameDefinitionExample Value
$Credential.UsernameThe username to be checked out, this should be updated with the actual name of the account that was checked out.Username
$Credential.DomainThe domain name of the user to be checked out, this should be updated with actual domain OR computer name if local computer accountExample Example.com HOST HOST.EXAMPLE.COM
$Credential.PasswordOn checkout this will have a random value, overwrite this with the actual password given by the vault
$Credential.SudoCommandThe command to use for performing elevated commands on a Linux/Unix based system. Add a value to override the default of “sudo”sudo
$Credential.PasswordValueConnectorIdThe vault connector GUID identifier for this credential. This has the same value as the $Options.Connector.Id
$Credential.PasswordVaultInfoA JSON string that contains vault specific options for this credential

The custom script block should return the $Credential object passed in, updated with any relevant information.

CheckinScriptBlock

Supply PowerShell script block to be used for checking in password from CyberArk. The script block will be called with two arguments. It is recommended that you use a param() block as follows:

    param(

        [Parameter(Mandatory = $true)]

        $Options,

        [Parameter(Mandatory = $true)]

        $Credential

    )

The scriptblock must return the updated $Credential setting the Username, Domain and Password value to the values that represent the checked in account information. The default implementation will set these values to the returned Username, Address and Content of the response from the API call of the Central Credential Provider.

$Options will have settings from the BYOV connector and information populated by the activity session.

Variable NameDefinitionExample Value
$Options.ConnectorThe options defined by the connector configuration.
$Options.Connector.NameThe connector nameCyberArk
$Options.Connector.IdThe connector GUID identifier45adf881-2875-485f-b789-80ea6ba03623
$Options.Connector.Options.ApiURLThe base URL for the CyberArk Central Credential Provider webservice. The script will append /AIMWebService/api/Accounts to this URL. For more information on the Central Credential Provider you can reference Central Credential Provider Webservice Configurationhttps://vault.example.com
$Options.Connector.Options.AppidThe application id to be used by Privilege Secure to make requests.PrivilegeSecure
$Options.Connector.Options.ClientCertificateThumbprint of certificate to use for client certificate authentication, leave empty if client certificates are not used. The certificate must be installed into the certificate store of the ActionService machine.64D25855C84CCDC581799B49362BA13DB66BD795
$Options.Connector.Options.SkipCertificateCheckWhether or not to skip the certificate check.True False
$Options.ActivitySessionThe ActivitySession members of the $Options object only exist if the checkin happens during an Activity Session.
$Options.ActivitySession.LoginAccountNameFormatThe template used by the activity session to generate the LoginAccountName%targetdomainname%%samaccountname%-a
$Options.ActivitySession.LoginAccountNameThe generated LoginAccountNamePrivilegeSecure\username-a
$Options.ActivitySession.UserIdThe GUID identifier of the requesting user45adf881-2875-485f-b789-80ea6ba03623
$Options.ActivitySession.TargetUserIdThe GUID identifier of the target user for the activity session45adf881-2875-485f-b789-80ea6ba03623
$Options.ActivitySession.TargetIdThe GUID identifier of the target host for the activity session45adf881-2875-485f-b789-80ea6ba03623
$Options.TargetHostThe host record associated with the activity session
$Options.TargetHost.IdThe GUID identifier of the target host45adf881-2875-485f-b789-80ea6ba03623
$Options.TargetHost.DistinguishedNameThe Active Directory distinguished name of the hostCN=PRIVILEGESECURE,CN=Computers,DC=example,DC=com
$Options.TargetHost.DnsHostNameThe FQDN of the target hostPrivilegeSecure.example.com
$Options.TargetHost.IPAddressThe IPv4 Address of the target host192.168.1.1
$Options.TargetHost.NameThe Name of the target hostExample\privilegesecure
$Options.TargetHost.NetBiosNameThe NETBIOS name of the target hostPRIVILEGESECURE
$Options.TargetHost.ObjectSidThe Sid of the computerS-1-5-21-2801403971-1535060088-509881625-1143
$Options.TargetHost.SamaccountnameThe Domain and Samaccountname of the computerEXAMPLE\PRIVILEGESECURE$

$Credential has the values for the Credential generated for lookup, on Checkin the username/domain/password will most likely be a random value not related to the account to be checked in.

Variable NameDefinitionExample Value
$Credential.UsernameThe username to be checked in.Username
$Credential.DomainThe domain name of the user to be checked in.Example Example.com HOST HOST.EXAMPLE.COM
$Credential.PasswordThe existing known password for the account to be checked in.
$Credential.SudoCommandThe command to use for performing elevated commands on a Linux/Unix based system.sudo
$Credential.PasswordValueConnectorIdThe vault connector GUID identifier for this credential. This has the same value as the $Options.Connector.Id
$Credential.PasswordVaultInfoA JSON string that contains vault specific options for this credential
$Credential.PasswordVaultInfoA JSON string that contains vault specific{ “safe”: “safename”, “folder”: “root” }

Your custom script block should return the $Credential object passed in, updated with any relevant information.