Command Line Interface (CLI)
We provide a command-line interface (CLI) for MarbleRun. This CLI allows you to install MarbleRun on your cluster and interacts with the control plane through the Client API for all administrative tasks in the service mesh.
Installation
To install the MarbleRun CLI on your machine you can use our pre-built binaries.
- For the current user
- Global install (requires root)
- Build from source
wget -P ~/.local/bin https://github.com/edgelesssys/marblerun/releases/latest/download/marblerun
chmod +x ~/.local/bin/marblerun
sudo wget -O /usr/local/bin/marblerun https://github.com/edgelesssys/marblerun/releases/latest/download/marblerun
sudo chmod +x /usr/local/bin/marblerun
To build the MarbleRun CLI, Edgeless RT needs to be installed on your machine.
git clone https://github.com/edgelesssys/marblerun && cd ./marblerun
go build -buildvcs=false -o marblerun ./cli
Requirements
The CLI requires an SGX quote verification library to verify quotes issued by the Coordinator. You have different options depending on the environment the Coordinator is deployed to:
- Azure CVM
- Generic SGX system
If the Coordinator is running on an Azure VM, the CLI relies on the Azure DCAP Client to verify quotes. To install the dependency on Ubuntu 20.04 run:
sudo apt-key adv --fetch-keys https://packages.microsoft.com/keys/microsoft.asc
sudo add-apt-repository 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main'
sudo apt update
sudo apt install -y az-dcap-client
Intel provides the libsgx-dcap-default-qpl
library to facilitate SGX quote verification.
To install the dependency on Ubuntu 20.04 run:
sudo apt-key adv --fetch-keys https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key
sudo add-apt-repository 'https://download.01.org/intel-sgx/sgx_repo/ubuntu main'
sudo apt update
sudo apt install -y libsgx-dcap-default-qpl
Follow Intel's documentation to configure access to the PCCS.
Reference
Usage:
marblerun [command]
Commands:
- install: Installs MarbleRun on a Kubernetes cluster
- uninstall: Remove MarbleRun from a Kubernetes cluster
- precheck: Check if your Kubernetes cluster supports SGX
- check: Check the status of MarbleRun's control plane
- manifest: Manages manifest for the MarbleRun Coordinator
- get: Get the manifest from the MarbleRun Coordinator
- log: Get the update log from the MarbleRun Coordinator
- set: Sets the manifest for the MarbleRun Coordinator
- signature: Prints the signature of a MarbleRun manifest
- update: Manage manifest updates for the MarbleRun Coordinator
- apply: Update the MarbleRun Coordinator with the specified manifest
- acknowledge: Acknowledge a pending update for the MarbleRun Coordinator (Enterprise feature)
- cancel: Cancel a pending manifest update for the MarbleRun Coordinator (Enterprise feature)
- get: View a pending manifest update (Enterprise feature)
- verify: Verify the signature of a MarbleRun manifest
- certificate: Retrieves the certificate of the MarbleRun Coordinator
- root: Returns the root certificate of the MarbleRun Coordinator
- intermediate: Returns the intermediate certificate of the MarbleRun Coordinator
- chain: Returns the certificate chain of the MarbleRun Coordinator
- secret: Manage secrets for the MarbleRun Coordinator
- status: Retrieve information about the status of the MarbleRun Coordinator
- recover: Recover the MarbleRun Coordinator from a sealed state
- package-info: Print the package signature properties of an enclave
- version: Display version of this CLI and (if running) the MarbleRun Coordinator
marblerun install
Installs MarbleRun on a Kubernetes cluster
Synopsis
Installs MarbleRun on a Kubernetes cluster
marblerun install [flags]
Examples
# Install MarbleRun in simulation mode
marblerun install --simulation
# Install MarbleRun using the Intel QPL and custom PCCS
marblerun install --dcap-qpl intel --dcap-pccs-url https://pccs.example.com/sgx/certification/v3/ --dcap-secure-cert FALSE
Options
--client-server-port int Set the client server port. Needs to be configured to the same port as in your client tool stack (default 4433)
--dcap-pccs-url string Provisioning Certificate Caching Service (PCCS) server address (default "https://localhost:8081/sgx/certification/v3/")
--dcap-qpl string Quote provider library to use by the Coordinator. One of {"azure", "intel"} (default "azure")
--dcap-secure-cert string To accept insecure HTTPS certificate from the PCCS, set this option to FALSE (default "TRUE")
--disable-auto-injection Install MarbleRun without auto-injection webhook
--domain string Sets the CNAME for the Coordinator certificate (default "localhost")
--enterprise-access-token string Access token for Enterprise Coordinator. Leave empty for default installation
-h, --help help for install
--marblerun-chart-path string Path to MarbleRun helm chart
--mesh-server-port int Set the mesh server port. Needs to be configured to the same port as in the data-plane marbles (default 2001)
--resource-key string Resource providing SGX, different depending on used device plugin. Use this to set tolerations/resources if your device plugin is not supported by MarbleRun
--simulation Set MarbleRun to start in simulation mode
--version string Version of the Coordinator to install, latest by default
--wait Wait for MarbleRun installation to complete before returning
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun uninstall
Remove MarbleRun from a Kubernetes cluster
Synopsis
Remove MarbleRun from a Kubernetes cluster
marblerun uninstall [flags]
Options
-h, --help help for uninstall
--wait Wait for the uninstallation to complete before returning
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun precheck
Check if your Kubernetes cluster supports SGX
Synopsis
Check if your Kubernetes cluster supports SGX
marblerun precheck [flags]
Options
-h, --help help for precheck
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun check
Check the status of MarbleRun's control plane
Synopsis
Check the status of MarbleRun's control plane
marblerun check [flags]
Options
-h, --help help for check
--timeout uint Time to wait before aborting in seconds (default 60)
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun manifest
Manages manifest for the MarbleRun Coordinator
Synopsis
Manages manifests for the MarbleRun Coordinator. Used to either set the manifest, update an already set manifest, or return a signature of the currently set manifest to the user
Examples
manifest set manifest.json example.com:4433 [--era-config=config.json] [--insecure]
Options
-h, --help help for manifest
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun manifest get
Get the manifest from the MarbleRun Coordinator
Synopsis
Get the manifest from the MarbleRun Coordinator. Optionally get the manifests signature or merge updates into the displayed manifest.
marblerun manifest get <IP:PORT> [flags]
Examples
marblerun manifest get $MARBLERUN -s --era-config=era.json
Options
-u, --display-update Set to merge updates into the displayed manifest
-h, --help help for get
-o, --output string Save output to file instead of printing to stdout
-s, --signature Set to additionally display the manifests signature
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun manifest log
Get the update log from the MarbleRun Coordinator
Synopsis
Get the update log from the MarbleRun Coordinator. The log is list of all successful changes to the Coordinator, including a timestamp and user performing the operation.
marblerun manifest log <IP:PORT> [flags]
Examples
marblerun manifest log $MARBLERUN
Options
-h, --help help for log
-o, --output string Save log to file instead of printing to stdout
Options inherited from parent commands
--accepted-tcb-statuses strings Comma-separated list of user accepted TCB statuses (e.g. ConfigurationNeeded,ConfigurationAndSWHardeningNeeded) (default [UpToDate])
--era-config string Path to remote attestation config file in json format, if none provided the newest configuration will be loaded from github
-i, --insecure Set to skip quote verification, needed when running in simulation mode
marblerun manifest set
Sets the manifest for the MarbleRun Coordinator