CLI Approvals
Commander Approvals
Commander Method for Automated Approvals
Keeper Commander, our CLI and SDK platform is capable of performing Admin Device Approvals for automated approval without having to login to the Admin Console. Admin approvals can be configured on any computer that is able to run Keeper Commander (Mac, PC or Linux).
This method does not require inbound connections from the Keeper cloud, so it could be preferred for environments where ingress ports cannot be opened. This method uses a polling mechanism (outbound connections only).
Install Keeper Commander
Please see the Installation Instructions here:
https://docs.keeper.io/secrets-manager/commander-cli/commander-installation-setup
You can install the binary versions for Mac/PC/Linux or use pip3
.
Use CLI for Device Approvals
Enter the Commander CLI using the "keeper shell" command. Or if you installed the Commander binary, just run it from your computer.
Use the "login" command to login as the Keeper Admin with the permission to approve devices. Commander supports SSO, Master Password and 2FA. For the purpose of automation, we recommend creating a dedicated Keeper Admin service account that is specifically used for device approvals. This ensures that any changes made to the user account (such as policy enforcements) don't break the Commander process.
Type "device-approve" to list all devices:
To manually approve a specific device, use this command:
To approve all devices that come from IPs that are recognized as successfully logged in for the user previously, use this command:
To approve all devices regardless of IP address, use this command:
To deny a specific device request, use the "deny" command:
To deny all approvals, remove the Device ID parameter:
To reload the latest device approvals without having to exit the shell, use the "reload" command:
Automatically Approving Devices every X seconds
Commander supports an automation mode that will run approvals every X number of seconds. To set this up, modify the config.json
file that is auto-created. This file is located in the OS User's folder under the .keeper
folder. For example: C:\Users\Administrator\.keeper\config.json
on Windows or /home/user/.keeper/config.json
on Mac/Linux.
Leave the existing data in the file and add the following lines :
JSON files need a comma after every line EXCEPT the last one.
Now when you open Commander (or run "keeper shell"), Commander will run the commands every time period specified. Example:
Automatically Approving Teams and Users
Similar to the example above, Commander can automatically approve Team and User assignments that are created from SCIM providers such as Azure, Okta and JumpCloud.
To set this up, simply add one more command team-approve
to the JSON config file. For example:
Persistent Sessions
Keeper Commander supports "persistent login" sessions which can run without having to login with a Master Password or hard-code the Master Password into the configuration file.
Commands to enable persistent login on a device for 30 days (max):
You can use seconds as the value (e.g. 60 for 60 seconds) or numbers and letters (e.g. 1m for one minute, 5h for 5 hours, and 7d for 7 days).
Also note that typing "logout" will invalidate the session. Just "quit" the Commander session to exit.
Once persistent login is set up on a device, the config.json
in the local folder will look something like this:
Additional information about persistent login sessions and various options is available at this link.
There are many ways to customize, automate and process automated commands with Keeper Commander. To explore the full capabilities see the Commander documentation.
Last updated