CLI Workflows

Common workflows using the QNSP CLI.

CLI Workflows

Common workflows using the QNSP CLI.

Key rotation workflow

#!/bin/bash

# List keys (JSON) and select by your own criteria.
# Note: key rotation is not implemented in the CLI; use the KMS API/service workflows.
qnsp kms keys list --output json | jq

Secret backup workflow

#!/bin/bash

# List secrets and fetch a single secret.
# Note: bulk export/encryption helpers are not provided by the CLI.
qnsp vault secrets list --output json | jq
qnsp vault secrets get "$SECRET_ID" --output json | jq

Environment sync workflow

#!/bin/bash

# The CLI does not implement profiles.
# Use separate environment variables (or separate CI jobs) per environment.
export QNSP_TENANT_ID="your-tenant"
export QNSP_SERVICE_ID="your-service-id"
export QNSP_SERVICE_SECRET="your-service-secret"

qnsp vault secrets get "$SECRET_ID" --output json | jq

Audit export workflow

#!/bin/bash

# List audit events (JSON) and ship them to your SIEM.
qnsp audit events list --limit 50 --output json | jq