Loading…
Loading documentation...
Encrypt application secrets with AES-256-GCM envelope KMS, perform transit signing, rotate versions and recover soft-deleted secrets.
Commands checked on 2026-11-12 with SAU Key Vault & KMS v1.7 (AES-256-GCM, P-256/RSA), sau CLI 0.2.0.
Your database passwords, third-party webhook keys, TLS certificates, and JWT signing keys will live inside Access > Key vault & KMS (/dashboard/key-vault), protected by per-secret AES-256-GCM authenticated envelope encryption (where a unique Data Encryption Key encrypts each secret version and is itself wrapped by a Key Encryption Key), automatic version history, transit cryptographic operations (sign, verify, encrypt, decrypt), and soft-delete purge protection.
/dashboard/key-vault).cloud:read and cloud:write scopes (Account settings > API keys at /account/api-keys), or RBAC role Key Vault Secrets Officer assigned in Operations > Resource manager & settings (/dashboard/resource-manager).$0.03 per 10,000 operations thereafter).Never commit .env secrets to Git or bake them into Docker images. Store them in a named vault (default-vault or environment-specific vaults such as prod-payments-vault):
# Store secrets via sau CLI
sau keyvault secret-set STRIPE_WEBHOOK_SECRET "whsec_example_rotated_value" \
--vault prod-payments-vault \
--content-type "text/plain"
sau keyvault secret-set DATABASE_URL "postgresql://app_writer:strong_pass@172.30.1.27:5432/app_prod" \
--vault prod-payments-vault
# List secret metadata (values are never returned in list calls!)
sau keyvault list --vault prod-payments-vault -o table
Notice that sau keyvault list (GET /api/v1/vault/secrets?vault=prod-payments-vault) returns only secret names, version numbers, content types, and timestamps—never plaintext values—so operators can audit inventory safely without exposing credentials.
Read and unwrap a specific secret at process startup or during deployment rendering:
# Retrieve and decrypt a single secret via CLI
sau keyvault secret-get DATABASE_URL --vault prod-payments-vault -o json
In a Node.js or TypeScript service, fetch required secrets once during boot, validate them, and hold them in memory (which also keeps your KMS call volume well inside the free 10,000 ops/mo tier):
export async function loadVaultSecret(vault: string, name: string): Promise<string> {
const url = new URL('https://serversareup.com/api/v1/vault/secrets');
url.searchParams.set('vault', vault);
url.searchParams.set('name', name);
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.SAU_API_TOKEN}` },
cache: 'no-store',
});
if (!res.ok) {
throw new Error(`Key Vault fetch failed for ${vault}/${name}: HTTP ${res.status}`);
}
const data = (await res.json()) as { secret?: { value?: string } };
if (!data.secret?.value) throw new Error(`Empty secret returned for ${name}`);
return data.secret.value;
}
When signing release artifacts, webhook payloads, or custom JWTs, use KMS Transit Keys on /dashboard/key-vault (/api/v1/vault/keys) so the raw private key material never leaves the KMS boundary:
# Create an asymmetric ES256 signing key or AES-256 transit key and sign a digest
curl -fsSL -X POST "https://serversareup.com/api/v1/vault/keys" \
-H "Authorization: Bearer sau_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"action": "create-key",
"vaultName": "prod-payments-vault",
"keyName": "release-artifact-signer",
"algorithm": "EC_P256"
}' | jq .
Calling sau keyvault secret-set on an existing secret name automatically increments its version (v1 -> v2) while preserving prior versions for instant rollback if a downstream service has not reloaded yet.
If someone accidentally deletes a secret, Soft-Delete Retention holds it in a recoverable state on Access > Key vault & KMS (/dashboard/key-vault) so an administrator can click Recover before the retention window expires; enabling Purge Protection blocks permanent erasure even by admins during the retention period.
Verify round-trip encryption, version incrementation, and audit logging:
sau keyvault secret-set ROTATION_TEST "version-one" --vault prod-payments-vault
sau keyvault secret-set ROTATION_TEST "version-two" --vault prod-payments-vault
sau keyvault secret-get ROTATION_TEST --vault prod-payments-vault
sau monitor activity-log --limit 5 -o table
secret-get returns "version-two" with version: 2, and activity-log records both write operations and the read access event without logging the secret plaintext.
secret-get inside a hot per-request HTTP handler. Network latency and rate limits will slow down user traffic. Load secrets once at startup and refresh them on a 5–15 minute background timer or SIGHUP signal.set -x (bash -x) around sau keyvault secret-get; pipe directly into a 0600 tmpfs file (/run/secrets/...) or process environment.409 RESOURCE_LOCKED. A CanNotDelete lock is protecting the vault in /dashboard/resource-manager—keep that lock enabled permanently on production vaults!prod-payments-vault, prod-web-vault, staging-vault) and scope Key Vault Secrets Officer RBAC roles per vault./dashboard/key-vault) with dynamic non-secret feature flags in Automation > App config & messaging (/dashboard/app-config).secret-get calls inside Operations > Cloud SIEM & SOAR (/dashboard/sentinel) to catch compromised runner tokens immediately.Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.