cnspec vault configure
Configure a vault environment for securely storing credentials, with support for AWS, GCP, HashiCorp Vault, and more.
Set up a vault environment so cnspec can securely retrieve credentials during scans instead of passing them on the command line. With --inventory-file, cnspec writes the vault configuration into that inventory file, which must already exist, and replaces any vault configuration the file already has. Without it, cnspec prints the configuration for you to add to your inventory file.
Configure a vault backed by the Linux kernel keyring:
cnspec vault configure my-vault --type linux-kernel-keyringConfigure a vault backed by HashiCorp Vault:
cnspec vault configure hcvault --type hashicorp-vault --option url=https://vault.example.com --option token=hvs.EXAMPLEConfigure a vault backed by AWS Secrets Manager:
cnspec vault configure aws-secrets --type aws-secrets-manager --inventory-file inventory.ymlThe aws-secrets-manager and aws-parameter-store vault types don't use any --option values. cnspec gets AWS credentials and the default region from the standard AWS configuration: environment variables such as AWS_PROFILE and AWS_REGION, or the shared AWS config and credentials files. To read a secret, set its secret_id in the inventory file to the full ARN of the Secrets Manager secret or Parameter Store parameter. cnspec reads the secret from the region in that ARN. The aws-parameter-store type only reads parameters, so you can't store a secret in it with cnspec vault add-secret.
Options
-h, --help help for configure
--inventory-file string Set the path to the inventory file
--option stringToString Set additional vault connection options (use --option key=value for multiple) (default [])
--type string Set the vault type. Possible values: aws-parameter-store | aws-secrets-manager | encrypted-file | gcp-berglas | gcp-secret-manager | hashicorp-vault | keyring | linux-kernel-keyring | memory | noneOptions inherited from parent commands
--api-proxy string Set the proxy for communications with Mondoo Platform API
--auto-update Enable automatic updates of cnspec and its providers; overrides auto_update in the config file (default true)
--config string Set config file path (default $HOME/.config/mondoo/mondoo.yml)
--log-level string Set the log level: error, warn, info, debug, trace (default "info")
--logging-config string Path to a logging configuration file (YAML or JSON) that selects the log writer, level, and writer-specific options
--strict Default MQL strict mode for policies that do not declare one: every link in an MQL chain must resolve
-v, --verbose Enable verbose outputSEE ALSO
- cnspec vault - Manage vault environments
Last updated on