Overview
If your security policy requires discovery account passwords to be kept in a privileged access management (PAM) tool, such as CyberArk or BeyondTrust Password Safe, the Cloudamize Agentless Data Collector (ADC) can get each password from that tool instead of storing it. ADC 2.0.186 and newer support this for Windows, Linux and NetApp hosts.
You set up one command on the ADC machine that prints a password. For every host set to use it, ADC:
-
runs the command when it needs the account's password;
-
keeps the password in memory only, and never writes it to disk;
-
runs the command again when the cache time (TTL) expires or a login fails, so collection continues after the vault rotates the password, with no change needed in ADC.
Hosts that use the PAM command and hosts with a stored password or SSH key can be added to the same ADC.
Requirements
-
A command that prints the password. Your PAM tool's command-line client (for example, CyberArk's
CLIPasswordSDK.exe) or your own script, installed on the ADC machine. The command must:-
exit with code 0 and print the password on the first line of its standard output;
-
exit with a non-zero code when it can't get the password;
-
never print the password on its error output. ADC writes error output to its log.
-
-
Access for two identities. The command runs as LocalSystem in the two ADC services, and as the logged-on user in the ADC window when you add hosts or test the command. Your PAM tool must allow both, for example in the allowed machines and OS users of a CyberArk application ID.
-
Password lifetime. A password must stay valid for at least the cache TTL (60 minutes by default). Passwords that work only once aren't supported.
-
Passwords only. Linux hosts that log in with an SSH key keep using the SSH Key option.
-
Administrator rights. Only local administrators on the ADC machine can change the PAM command. Keep any script the command runs in a folder that only administrators can change, because the ADC services run it as LocalSystem.
Each ADC has its own PAM command. If you use more than one ADC, set up the command on each one.
Step 1: Set Up the PAM Command
-
Open the ADC window, then select Parameter Setup > PAM Credential Command.
-
In Program, enter the full path of the program, or click Browse....
-
In Arguments, enter the program's arguments. Use the placeholders below where the command needs a value from the host. Put quotes around placeholders that may contain spaces.
-
Change Timeout, Cache TTL or Lockout backoff if needed.
-
Test the command (see Step 2), then click Save. The ADC services start using it within a minute.
|
Placeholder |
Replaced with |
Example |
|---|---|---|
|
|
The account name as entered for the host |
|
|
|
The account name without the domain |
|
|
|
The domain part of the account name |
|
|
|
|
|
|
|
The host's Credential reference, for example a vault object name. This is set by you when adding hosts via the UI or CSV. |
|
|
|
The host's IP address. Use it only if your vault stores a different password for each host: ADC then queries the vault for every host instead of once per account. |
|
The {host} placeholder only fills an IP address (not DNS) and will cause a vault query for each host at every TTL expiration.
Values put into placeholders can contain only letters, digits, spaces and . _ - @ \ / : , = + #, and can't end with \.
|
Setting |
Default |
Range |
What it does |
|---|---|---|---|
|
Timeout (seconds) |
30 |
5 to 300 |
ADC stops the command if it hasn't finished in this time. |
|
Cache TTL (minutes) |
60 |
5 to 1440 |
How long ADC keeps a password in memory before running the command again. |
|
Lockout backoff (minutes) |
15 |
0 to 240 |
How long ADC stops logging in after a host rejects the password. See How ADC Protects the Account from Lockout. |
Examples
Step 2: Test the Command
The Test section of the same window runs the command once with the Program and Arguments on screen, even if they aren't saved.
-
Under Fill from host, pick a host to copy its values, or type an Account, OS, Reference and Host IP. Only the values used in Arguments matter.
-
Click Test.
ADC shows the command it ran and then either Success. The command returned a password of N characters. or the error. It never shows the password.
Test runs as you, not as LocalSystem. If Test works but hosts report a PAM error, check that your PAM tool also allows LocalSystem on the ADC machine.
Step 3: Set Hosts to Use the PAM Command
New Hosts
-
Click Add Host and select Add Windows Host, Add Linux Host or Add NetApp Host.
-
Enter the IP addresses and the Account Name.
-
Select Get the password from the PAM command.
-
Optionally, enter a Credential reference. It is passed to the command as
{ref}. -
Click Add Host(s). ADC runs the command once per account and checks the connection to each host.
Existing Hosts
Select the hosts, click Change Credentials, select Get the password from the PAM command, and click Change. ADC deletes the passwords it had stored for those hosts.
CSV File
Load the file with Add Host > Load Host from CSV File. Each line is one host, with these columns in this order and no header row. Columns 5 to 7 are optional and can be left off the end of a line.
In these examples, the two empty fields after the account name are Password and SshKeyPath. The first host has no credential reference; the second uses Linux-Discovery-Account:
10.0.1.40,Windows,CORP\svc_discovery,,,PAM,
10.0.1.41,Linux,discovery,,,PAM,Linux-Discovery-Account
When the Vault Rotates a Password
You don't need to do anything in ADC. ADC gets the new password:
-
when the cache TTL expires, or
-
when a login fails. ADC runs the command again and, if it returns a different password, retries with it straight away.
Collection usually resumes by the next connection check, which runs every 10 minutes, so a few minutes of data may be missing.
If the command itself fails, ADC waits 5 minutes before running it again for the same account, so the vault isn't queried repeatedly.
Lockout Protection, Troubleshooting and FAQ
How ADC protects discovery accounts from lockout, what each PAM error message means and what to do about it, and answers to common questions are on PAM Passwords in the Agentless Data Collector: Lockout Protection, Troubleshooting and FAQ.
Stop Using the PAM Command
-
Change the hosts to a password or SSH key with Change Credentials.
-
Open Parameter Setup > PAM Credential Command, clear Program and click Save.
Hosts still set to use the PAM command show an error until they are changed.
Related Articles
If you have any queries, please get in touch with the helpdesk via our Helpdesk Portal or by email at helpdesk@cloudamize.com.