CLI Toolkit Installation
CipherTrust Manager includes a CLI toolkit, named ksctl, that can be downloaded and run locally to control a remote CipherTrust Manager.
Note
ksctl is designed to be run from a remote system, not on the CipherTrust Manager itself.
ksctl exclusively uses the REST API to communicate with CipherTrust Manager, so anything you can do with the CLI tool, you can also do directly with the REST API. Conversely, ksctl exposes most of the functionality of the REST API. It can perform management functions, such as adding users and groups, and end-user functions, such as creating keys.
To get started with ksctl you must do the following:
Download and unzip the ksctl_images.zip file.
Setup the ksctl-os file for your system.
Run ksctl.
To download and unzip the ksctl_images.zip file:
Enter the IP address of your CipherTrust Manager system in your browser.
On the CipherTrust Manager start page, select API & CLI Documentation link.
At the top of the API & CLI Documentation page, click on Download CLI button:
Unzip the ksctl_images.zip file.
Example set of available images in ksctl_images.zip file:
To setup the ksctl-os for your system:
Windows
After unzipping, rename either
ksctl-win-386.exe
orksctl-win-amd64.exe
toksctl.exe
.Note
ksctl.exe is a single executable with no dependencies, so it can be run from anywhere.
Move the ksctl.exe file to a folder easily accessed by the local command prompt.
Note
You can also add the location of the ksctl.exe file to your PATH variable or copy ksctl.exe to a location already in your PATH.
Create a ksctl configuration file using the local command prompt cmd.exe:
To find or confirm your %HOMEPATH% directory, enter:
Create a .ksctl directory in your %HOMEPATH% directory:
In the %HOMEPATH%\.ksctl directory, create a config.yaml file with the following items:
Linux
After unzipping, rename the file of choice to ksctl and move it to a directory within your PATH.
Note
ksctl is a single executable with no dependencies, so it can be run from anywhere.
Create a ksctl configuration file:
Create a .ksctl directory in your $HOME directory:
In the $HOME/.ksctl directory create a config.yaml file with the following items:
Bash completions can be generated by typing ksctl bashcomp at the bash prompt and following the instructions.
To override ksctl configuration file
Summary of ksctl configuration variables for the config.yaml configuration file:
ksctl is easiest to use with the configuration file (config.yaml). However, those parameters can be overridden by using these flags on the command line:
Note
If you wish to override KSCTL_NOSSLVERIFY it must be set to false in the configuration file (or removed).
To run ksctl:
Note
This is an example only; not all supported CLI commands and flags are shown.
At the command line prompt, enter ksctl. You will get the following example output:
Try creating a key by entering the command ksctl keys create –autoname:
This will create output similar to the following: