Creating a device with Command String transparent login using the PAM Rest API
search cancel

Creating a device with Command String transparent login using the PAM Rest API

book

Article ID: 103048

calendar_today

Updated On:

Products

CA Privileged Access Manager (PAM) CA Privileged Access Manager - Server Control (PAMSC) CA Privileged Identity Management Endpoint (PIM) CA Threat Analytics for PAM

Issue/Introduction

The information on the Settings > API Doc for the "POST /api.php/v1/devices.json" operation to create a new target device in PAM, specifically with regard to transparent login configurations using the Command String option, is not quite clear. It would be useful to have a sample JSON body showing how the parameters need to be entered. An example on how to configure access methods would be helpful as well.

Environment

CA Privileged Access Manager (PAM) with the Rest API enabled.

Resolution

Below is a sample JSON body that will create a device with transparent login type "Command string", defining a few su commands for which PAM will insert a password transparently during an SSH access session. The example also shows how to configure access methods and tags for the device.

{
"deviceName": "restapidevice",
"domainName": "restapidevice.example.com",
"os": "Linux",
"description": "RestApi test device",
"typeAccess": "t",
"typePassword": "t",
"targetServerDescription1": "Linux",
"targetServerDescription2": "Resttsdesc",
"tags": [
"Linux",
"Provisioned"
],
"deviceAccessMethods": [
{
"type": "SSH",
"customName": null,
"port": "22",
"taskProperty": null
},
{
"type": "Telnet",
"customName": null,
"port": "23",
"taskProperty": null
}
],
"transparentLoginType": "Command string",
"transparentPrompts": {
"commandStrings": [
"su",
"su -",
"su - root",
"su root"
],
"prompt": "Password:"
}
}