credentials command manages cloud provider credentials stored in the Clanker backend, allowing you to use the same credentials across multiple machines.
Usage
All credentials commands require a backend API key via
--api-key flag or the CLANKER_BACKEND_API_KEY environment variable.Subcommands
store
Upload local credentials to the Clanker backend:list
List all stored credentials:test
Test that stored credentials are valid:delete
Delete stored credentials:Store command flags
AWS flags
AWS profile to export credentials from (default:
default)GCP flags
GCP project ID (required)
Path to GCP service account JSON file
Kubernetes flags
Path to kubeconfig file (default:
~/.kube/config)Kubernetes context name to use
How it works
AWS credentials
- Exports credentials from local AWS CLI profile using
aws configure export-credentials - Retrieves region from profile configuration
- Uploads access key, secret key, session token (if SSO), and region to backend
- Credentials are encrypted at rest in the backend
GCP credentials
- Reads service account JSON file or Application Default Credentials
- Uploads project ID and service account JSON to backend
- Credentials are encrypted at rest in the backend
If no service account file is specified, Clanker attempts to read Application Default Credentials from:
$GOOGLE_APPLICATION_CREDENTIALS~/.config/gcloud/application_default_credentials.json
Cloudflare credentials
- Reads API token and account ID from config or environment:
cloudflare.api_tokenin~/.clanker.yamlCLOUDFLARE_API_TOKENenvironment variableCF_API_TOKENenvironment variablecloudflare.account_idin configCLOUDFLARE_ACCOUNT_IDenvironment variable
- Uploads to backend
- Credentials are encrypted at rest
Kubernetes credentials
- Reads kubeconfig file from specified path or default location
- Base64 encodes the kubeconfig content
- Uploads encoded content and optional context name to backend
- Credentials are encrypted at rest in the backend
Testing credentials
Thetest command validates stored credentials by:
AWS
- Calls
aws sts get-caller-identitywith stored credentials - Displays account ID and ARN if successful
GCP
- Calls
gcloud projects describewith stored credentials - Verifies project exists and credentials are valid
Cloudflare
- Calls Cloudflare API’s token verification endpoint
- Confirms token is active
Kubernetes
- Writes kubeconfig to temporary file
- Runs
kubectl cluster-infoto verify connectivity - Displays cluster information if successful
Security
- All credentials are encrypted at rest in the backend
- Credentials are transmitted over HTTPS
- API key is required for all credential operations
- Credentials are scoped to your account only
- Masked values are shown in list output (e.g.,
AKIA********ABCD)
Examples
Store and test AWS credentials
Store GCP credentials with service account
Multi-cloud setup
See also
- Config command - Scan for local credentials
- Ask command - Use stored credentials for queries