CLI that provides on-demand secrets access for common DevOps tools
CLI that provides on-demand secrets access for common DevOps tools
Note: The cyberark.github.io/summon documentation site is no longer maintained. This README is the authoritative source for configuration and usage information.
summon is a command-line tool to make working with secrets easier.
It provides an interface for
secrets.yml fileNote installing summon alone is not sufficient; you need to also install
a provider of your choice before it's ready for use.
Pre-built binaries and packages are available from GitHub releases here.
Summon ships with a built-in Conjur provider. No separate binary install is needed; it activates automatically when the provider directory has no other binaries, or explicitly when you pass --provider conjur.
Note: If the provider directory contains exactly one binary, Summon uses that binary automatically. If it contains two or more, Summon exits with an error and prompts you to specify one with
--provider. The built-in Conjur provider is only used as the automatic fallback when the directory is empty.
Are you using this project with Conjur Open Source? Then we strongly recommend choosing the version of this project to use from the latest Conjur OSS suite release. Conjur maintainers perform additional testing on the suite release versions to ensure compatibility. When possible, upgrade your Conjur version to match the latest suite release; when using integrations, choose the latest suite release that matches your Conjur version. For any questions, please contact us on Discourse.
Define a secrets.yml file:
DB_PASSWORD: !var production/db/password
API_KEY: !var production/api/keySet the required environment variables and run your command:
export CONJUR_APPLIANCE_URL=https://conjur.example.com
export CONJUR_ACCOUNT=myorg
export CONJUR_AUTHN_LOGIN=host/myapp
export CONJUR_AUTHN_API_KEY=
summon -f secrets.yml env | grep -E 'DB_PASSWORD|API_KEY'No --provider flag is needed; Summon detects the built-in Conjur provider automatically.
For other authentication methods, see Supported Authentication Methods below.
The built-in provider supports the following authentication methods via CONJUR_AUTHN_TYPE:
| Auth method | CONJUR_AUTHN_TYPE |
Required additional env vars |
|---|---|---|
| API key (default) | (unset) | CONJUR_AUTHN_LOGIN, CONJUR_AUTHN_API_KEY |
| Existing token | (unset) | CONJUR_AUTHN_TOKEN or CONJUR_AUTHN_TOKEN_FILE |
| JWT | jwt |
CONJUR_AUTHN_JWT_SERVICE_ID, JWT_TOKEN_PATH or CONJUR_AUTHN_JWT_TOKEN, CONJUR_AUTHN_JWT_HOST_ID (required if token-app-property not configured) |
| AWS IAM | iam |
CONJUR_SERVICE_ID, CONJUR_AUTHN_JWT_HOST_ID |
| Azure | azure |
CONJUR_SERVICE_ID, CONJUR_AUTHN_JWT_HOST_ID, CONJUR_AUTHN_AZURE_CLIENT_ID (optional) |
| GCP | gcp |
CONJUR_AUTHN_JWT_HOST_ID (required when auto-fetching token from GCP metadata service) |
| Certificate (authn-cert) | cert (implied when CONJUR_AUTHN_CERT_SERVICE_ID is set) |
CONJUR_AUTHN_CERT_SERVICE_ID, CONJUR_AUTHN_CERT_FILE, CONJUR_AUTHN_CERT_KEY_FILE, CONJUR_AUTHN_CERT_HOST_ID (optional) |
The provider loads configuration from:
.conjurrc in the home directory, current directory, or the path set in CONJUR_RC/etc/conjur.conf on Linux/macOS; C:\Windows\conjur.conf on Windows| Variable | Description |
|---|---|
CONJUR_APPLIANCE_URL |
URL of the Conjur appliance |
CONJUR_ACCOUNT |
Conjur organization account |
CONJUR_CERT_FILE |
Path to the Conjur SSL certificate file |
CONJUR_SSL_CERTIFICATE |
PEM-encoded SSL certificate (inline) |
SSL certificate precedence: when both
CONJUR_SSL_CERTIFICATEandCONJUR_CERT_FILEare set,CONJUR_SSL_CERTIFICATE(inline PEM) takes precedence overCONJUR_CERT_FILE. Only set one to avoid confusion.
CONJUR_CERT_FILEvsCONJUR_AUTHN_CERT_FILE:CONJUR_CERT_FILEis the Conjur server's TLS certificate used to verify the HTTPS connection.CONJUR_AUTHN_CERT_FILEis the client certificate presented to Conjur during certificate authentication (mTLS). They serve different purposes and can both be set at the same time.
| Variable | Description |
|---|---|
CONJUR_AUTHN_LOGIN |
Conjur identity (user or host) |
CONJUR_AUTHN_API_KEY |
API key for the identity |
CONJUR_AUTHN_TOKEN |
Pre-fetched Conjur auth token (inline) |
CONJUR_AUTHN_TOKEN_FILE |
Path to a file containing the auth token |
CONJUR_AUTHN_JWT_SERVICE_ID |
JWT authenticator service ID (e.g. kubernetes) |
JWT_TOKEN_PATH |
Path to the JWT token file (default: /var/run/secrets/kubernetes.io/serviceaccount/token) |
CONJUR_AUTHN_TYPE |
Auth backend: jwt, iam, azure, gcp, or cert. Setting CONJUR_AUTHN_CERT_SERVICE_ID activates cert authentication implicitly, overriding any other value set here. |
CONJUR_SERVICE_ID |
Authenticator service ID for IAM and Azure. Also accepted for jwt and cert, but prefer the dedicated CONJUR_AUTHN_JWT_SERVICE_ID / CONJUR_AUTHN_CERT_SERVICE_ID, which override it. |
CONJUR_AUTHN_JWT_HOST_ID |
Conjur host identity for IAM, Azure, and JWT auth; for GCP, required only when auto-fetching the token from the GCP metadata service |
CONJUR_AUTHN_AZURE_CLIENT_ID |
Azure managed identity client ID (optional; selects a specific identity on multi-identity hosts) |
CONJUR_AUTHN_JWT_TOKEN |
Inline JWT token string (alternative to JWT_TOKEN_PATH; use when the token is available as a value rather than a file) |
CONJUR_AUTHN_CERT_SERVICE_ID |
Certificate authenticator service ID. Setting this implicitly activates cert authentication (equivalent to CONJUR_AUTHN_TYPE=cert) and takes precedence over CONJUR_SERVICE_ID. |
CONJUR_AUTHN_CERT_FILE |
Path to the PEM-encoded client certificate file for certificate authentication (mTLS). |
CONJUR_AUTHN_CERT_KEY_FILE |
Path to the PEM-encoded private key file for the client certificate. |
CONJUR_AUTHN_CERT_HOST_ID |
Conjur host identity for certificate authentication (e.g. host/vm-workloads/vm-01). Optional in SPIFFE mode — leave it unset and the server derives the host from the certificate's SAN URI. |
Certificate authentication requires an HTTPS appliance URL and is not supported on Conjur Cloud (Idira Secrets Manager, SaaS). Both are rejected at config validation, before any request is sent.
| Variable | Description |
|---|---|
CONJUR_CREDENTIAL_STORAGE_MODE |
Read/write policy: readonly (built-in provider default) or readwrite. Case-insensitive. |
CONJUR_CREDENTIAL_STORAGE |
Storage backend: keyring (default), file, or none |
CONJUR_NETRC_PATH |
Path to a readable .netrc file when using file storage. When set, conjur-api-go reads credentials from that path instead of the default location; when unset, the default netrc location is used. |
CONJUR_KEYCHAIN_NAMESPACE |
Optional keyring service namespace for concurrent invocations. Non-empty string without /, \, :, or null bytes. When set, the keyring service name becomes machineName:namespace; when unset, the existing machine name is used (no namespace isolation). Also configurable as keychain_namespace in .conjurrc. |
The built-in provider uses conjur-api-go credential caching. Two settings work together:
keyring, file, or none).By default, the built-in provider runs in read-only mode: it may read existing cached credentials from the configured backend but does not write new ones to the OS keychain or ~/.netrc. This reduces cross-talk when multiple summon processes run concurrently.
| Mode | Behavior |
|---|---|
readonly (default) |
Read cached credentials; suppress writes to keychain/netrc. |
readwrite |
Read and write cached credentials (previous default behavior). |
Set the mode with CONJUR_CREDENTIAL_STORAGE_MODE:
export CONJUR_CREDENTIAL_STORAGE_MODE=readwriteWhen mode is readwrite, credentials are cached using one of three backends:
| Backend | When to use |
|---|---|
keyring (default) |
OS credential stores: macOS Keychain, Windows Credential Manager, Linux Secret Service. For concurrent invocations that share a host keyring, set CONJUR_KEYCHAIN_NAMESPACE (or keychain_namespace in .conjurrc) so each process uses a distinct service name (machineName:namespace). Leave unset to keep the existing machine-name service (no namespace isolation). Namespace values must be non-empty and must not contain /, \, :, or null bytes. |
file |
Stores credentials in ~/.netrc by default, or in the readable file path given by CONJUR_NETRC_PATH / netrc_path when set. Use a per-invocation path to isolate netrc files across processes. Used as fallback when keyring is unavailable, or set explicitly for compatibility. |
none |
Disables the storage backend entirely. Use when no credential cache is desired. |
Configure the backend in .conjurrc:
credential_storage: keyring
keychain_namespace: service-acredential_storage: file
netrc_path: /path/to/.netrcOr via environment variables:
export CONJUR_CREDENTIAL_STORAGE=keyring
export CONJUR_KEYCHAIN_NAMESPACE=service-a
export CONJUR_CREDENTIAL_STORAGE=file
export CONJUR_NETRC_PATH=/path/to/.netrcTo restore write caching (for example, a single long-lived host identity that should reuse credentials across invocations):
export CONJUR_CREDENTIAL_STORAGE_MODE=readwrite
export CONJUR_CREDENTIAL_STORAGE=file # optional; keyring is the default backend
export CONJUR_NETRC_PATH="$HOME/.summon-netrc" # optional; defaults to ~/.netrcWith readonly mode (the default), summon still authenticates using credentials supplied in the environment (CONJUR_AUTHN_API_KEY, CONJUR_AUTHN_TOKEN, and so on) and may read an existing cache, but it will not update keychain or netrc files.
If you previously installed summon-conjur as a provider binary in your provider directory
and relied on Summon's automatic provider detection (no --provider flag), follow these steps:
summon-conjur binary from your provider directory
(typically /usr/local/lib/summon/).If the binary cannot be removed (for example, it is managed by a system package manager), pass --provider conjur explicitly to select the built-in provider regardless of what is in the provider directory.
If you were passing --provider conjur explicitly, the flag still works. You can also drop it; the built-in provider is now the default.
brew tap cyberark/tools
brew install summondeb and rpm files are attached to new releases.
These can be installed with dpkg -i summon_v*.deb and
rpm -ivh summon_v*.rpm, respectively.
No open issues yet, or sync has not completed.