By default the key that protects every stored secret is in a file next to the database. With NETLENS_KMS=vault_transit (and NETLENS_KMS_URL, NETLENS_KMS_KEY, optionally NETLENS_KMS_MOUNT and NETLENS_KMS_NAMESPACE, with an AppRole NETLENS_KMS_ROLE_ID / NETLENS_KMS_SECRET_ID or a NETLENS_KMS_TOKEN, each also as ..._FILE for a Docker or Kubernetes secret, and NETLENS_KMS_CA_FILE for a private CA) the file holds only a copy wrapped by a transit key of HashiCorp Vault or OpenBao that never leaves the service. Netlens asks the service to unwrap it at start and keeps it in memory. Revoke Netlens’ access and a copy of the data volume is useless; after rotating the transit key, one button (Settings → Backup → Encryption key) wraps the key again under the new version without touching a single secret. The first start wraps the key that is in use and keeps the plain-text file until you confirm the move (Delete the plain-text key file, which first checks that the service returns exactly that key). Policy for the identity: update on transit/encrypt|decrypt|rewrap/<key> and read on transit/keys/<key>, nothing else. Only the first wrapping needs the Enterprise edition: an installation that already has a wrapped key never loses access to it. Tested on OpenBao.