CLI
The Evervault CLI allows you to configure your Evervault integration from the terminal. This reference documents every command and flag available in the Evervault CLI.
Installation
Run the following command to install the Evervault CLI. This command can also be used to upgrade from a previous major version of the Evervault CLI.
Updating
To update the Evervault CLI to the latest version, run the following command:
The update command will not update between major versions of the Evervault CLI. To update to a new major version, you will need to run the installation command again.
Authentication
To authenticate the Evervault CLI configure the following environment variables:
Environment Variables
An API Key with the appropriate permissions, created from the Evervault Dashboard.
Your App ID, which can be found in the Evervault Dashboard on the app Settings page.
Global Flags
The following flags can be used on any command within the Evervault CLI.
Flags
- Show help for the command.
- Print verbose logs.
- Output the response in JSON format.
encrypt
Encrypt data using the Evervault API. Note, while Strings are valid JSON values they must be enclosed in double quotes.
Options
The JSON value to be encrypted. This can be any valid JSON value: Objects, Arrays, Numbers, Boolean or Strings (strings should be enclosed in double quotes).
decrypt
Decrypt data using the Evervault API.
Options
The Encrypted JSON value to be decrypted. This can be any valid JSON value: Objects, Arrays, Numbers, Boolean or Strings (strings should be enclosed in double quotes).
relay
The Evervault CLI can be used to manage your Relays in a continuous integration environment.
relay create
Creates an Evervault Relay and generates a configuration file. You will be prompted to enter the relay destination URL.
relay deploy
Deploy changes to your Relay based on the relay.json configuration file. This is useful for versioning your Relay configuration by checking your relay.json file into version control.
relay.json
The relay.json file is a JSON file that contains the configuration for your Relay. It is used to define the Relay's behavior and how it should interact with data.
function
function init
Initialize a sample “hello world” Function either in your current directory, or the directory provided.
Flags
The directory to initialize the function into. If not given, the Function will be created in a subdirectory of the current directory using the name of the Function.
Overwrite the existing directory at the location if it exists
function create-toml
Creates a starter function.toml in the current directory.
function deploy
Deploy a Function using the source code of your current working directory. Your current directory must contain a valid function.toml file.
Flags
By default, the CLI will wait for the Function deployment to complete. If you only want to begin the deployment and then exit, you can pass in the --background flag. This is recommended in a CI/CD environment.
The name of the Function to deploy. If not given, the CLI will look for a function.toml in the current directory.
function env
Manage the environment variables for a Function.
Some environment variables are reserved for our use and therefore are immutable.
Flags
Mark the environment variable as a secret. This encrypts it and makes it irretrievable. All secrets are decrypted when your function is run.
Options
The name of the Function to interact with. If not given, then the CLI will look for a function.toml in the current directory.
The key of the environment variable to update.
The value of the environment variable to update.
function delete
Deletes a Function.
Options
The name of the Function to delete. If not given, then the CLI will look for a function.toml in the current directory.
function run
Run a named Function from the command line using a JSON Payload.
This command does not automatically encrypt your data before sending it to the Function.
Optins
The name of the Function you wish to invoke. If not provided the CLI will attempt to run the Function defined in a function.toml in the current working directory.
- The JSON payload to send to the Function.
Whether to run the Function asynchronously. See the Function Execution Time documentation for more information.
enclave
The Evervault CLI is the primary interface for building and deploying Enclaves.
enclave init
Create an Enclave and initialize an enclave.toml in the current directory. By default, this will generate a key pair to sign your Enclave image unless a key pair is explicitly provided using --private-keyand--signing-cert.
Options
- Name of Enclave to deploy
The port that the in-Enclave service listens on. All incoming requests will be forwarded to this port. If unset, it will be taken as last exposed port in the Dockerfile.
- Dockerfile to build the Enclave
The path that should be used for in-Enclave healthchecks. These healthchecks are performed every second and can be used to probe the running process.
The port to perform healthchecks against. If this is unset, then the healthchecks are assumed to be served over the same port as the incoming requests.
Debug setting for the Enclave. When debug is enabled, you can access logs from within the Enclave.
Flag to enable network egress from your Enclave, default egress port is 443
Comma separated list of domains to allow egress to, default is all (*)
- Print help information
Directory to write the enclave.toml to. Defaults to the current directory.
Path to the signing key to use for the Enclave.
Path to the signing cert to use for the Enclave
Turn off API key authentication in the Enclave.
Trusted headers sent into the Enclave will be persisted without redaction in the Enclave's transaction logs.
Turn off TLS Termination in the Enclave's data plane process. This will allow you to control TLS termination within your service to enable mTLS or a custom certificate.
When supplied with --disable-tls-termination, the data plane will forward the client IP using the HAProxy Proxy Protocol v2.
Define the number of instances to deploy your Enclave to. Defaults to 2.
enclave build
The build command mirrors the docker build command but produces an Enclave Image File (EIF) as output instead of a Docker image. The build command requires a enclave.toml to be available when creating an Enclave Image File. This can be generated using the ev enclave [FLAGS] init command.
Options
Path to the enclave.toml file. Defaults to ./enclave.toml
Path to the Dockerfile to use for the Enclave. Defaults to ./Dockerfile
Path to directory to save the processed Dockerfile and EIF.
Private key to be used when signing the EIF.
Certificate corresponding to the private key.
Build time arguments to provide to Docker.
Build time secrets to provide to Docker. These secrets are used during the Docker build process, similar to the Docker --secret flag.
Build from enclave.Dockerfile for build reproducibility
Build enclave with reproducible measures
Enabled forwarding proxy protocol when TLS Termination is disabled
Disables the use of cache during image builds
enclave cert new
Create a new Enclave signing certificate and private key.
Options
Path to the directory where the credentials will be saved. Defaults to the current directory.
Defining the certificate’s distinguished name e.g.
/CN=EV/C=IE/ST=LEI/L=DUB/O=Evervault/OU=Eng. If not given a generic Enclave subject is given.
enclave cert upload
Upload a signing certificate's metadata to the Evervault API. This cert can then be used in the cert lock command.
Note: Certificate metadata is automatically uploaded to the Evervault API when you deploy an Enclave. This command is only necessary if you want to lock deployments to a certificate before the certificate has been used for a deployment. If you have already deployed with the certifcate, the metadata will be available in the cert lock prompt.
Options
Path to directory where the signing cert is. Defaults to the path specified in ./enclave.toml
Path to enclave.toml config file. Default: ./enclave.toml
enclave cert lock
Interactive prompt to lock Enclave deployments to specific signing certificates. An Enclave deployment will fail if the signing certificate used is not in specified locked certs. If no certificates are locked to an Enclave, it can be deployed with any certificate. If you want to lock a newly created certifcate, you must first upload it's metadata using the cert upload command. This certificate will then be available in the cert lock prompt.
enclave delete
Delete the Enclave defined in a given enclave.toml.
Options
Path to the enclave.toml config file. Default: ./enclave.toml
- Uuid of the Enclave to delete
Perform the Enclave deletion in the background
Prevent confirmation dialogue and proceed with deletion. Use with caution.
enclave deploy
Deploy the Enclave defined in your enclave.toml file. By default, the deploy command will ignore any prebuilt EIFs and begin a fresh Enclave build. You can prevent this by providing a path to an existing EIF using the --eif-path option.
Options
Path to the enclave.toml config file. Default: ./enclave.toml
Path to EIF for the Enclave. Will skip building if EIF is provided.
Path to Dockerfile for Enclave. Will override any Dockerfile specified in the enclave.toml file
Private key used to sign the Enclave Image File.
Certificate used to sign the Enclave Image File.
Build time arguments to provide to Docker
Build time secrets to provide to Docker. These secrets are used during the Docker build process, similar to the Docker --secret flag.
Build from enclave.Dockerfile for build reproducibility
Build enclave with reproducible measures
The endpoint to use for healthchecks. See healthchecks for more information.
Disables the use of cache during the image builds
enclave restart
Restart the Enclave defined in your enclave.toml file. This will redeploy the Enclave with the same image as your current Deployment, but with the latest environment variables and secrets. This won't affect your Enclave's PCRs.
Options
Path to the enclave.toml config file. Default: ./enclave.toml
- Uuid of the Enclave to restart
Perform the Enclave restart in the background
enclave describe
Get the PCRs of an existing EIF.
enclave list enclaves
List your enclaves.
enclave list deployments
List the deployments for your Enclave.
enclave logs
View the logs for your Enclave. Only available for Enclaves in debug mode.
Options
The uuid of the Enclave to get deployments for.
- The local Enclave config.
The end time in milliseconds since the unix epoch.
The start time in milliseconds since the unix epoch
- Print help information
enclave env add
Add environment variable to be used in a Enclave.
Flags
The key of the environment variable to add.
The value of the environment variable to add.
enclave env delete
Permanently delete a environment variable from the Enclave environment.
enclave env get
Get the environment variables in json format.