Skip to main content

Workspace encryption

Availability​

Workspace key controls are available under Organization → Workspace encryption. Opening the page does not configure a key, migrate data or change protection. New workspaces initialize with a distinct, wrapped, platform-managed local key. An existing workspace may need Set up workspace encryption before preparing its first migration.

A deployed page, configured key or successful connection test does not mean existing workspace data has completed migration. Check the workspace's operation, coverage and recovery status. Keep the existing key until the verified transition has completed; retained encrypted history may continue to require older keys.

Choosing who controls the key​

QScan supports platform-managed local wrapping and adapters for AWS KMS, Google Cloud KMS, Azure Key Vault and HashiCorp Vault Transit. Each workspace uses a distinct random data key; a local wrapping key is not a shared workspace data key. Wrapped keys can be stored with workspace state; unwrapped keys must not become database records or diagnostic output.

External key services wrap and unwrap the workspace data key. They do not receive the complete evidence inventory as part of that operation. QScan must decrypt authorized data while processing it, so customer-controlled keys are not a claim that the application operator can never access plaintext during processing.

Choose an external provider only if your team can maintain its availability, permissions and recovery procedures. A provider outage or revoked permission must fail protected access rather than silently switch the workspace to a local key. Do not revoke an old key merely because a new configuration has passed a connection test: retained data and historical results may still depend on it.

Connection testing is not activation​

The workflow separates these steps:

  1. Configure and test: prove the actual provider configuration can wrap and unwrap a test value. This does not demonstrate migration or storage coverage.
  2. Prepare: establish the target wrapped key and a recoverable migration operation. The previous key remains required.
  3. Migrate: process bounded batches, preserve existing evidence and historical assessment meaning, and retain checkpoints for interrupted work.
  4. Verify: inspect all covered storage owners, pending jobs, scan runtime references and retained history. Unknown fields and unavailable checks must remain unresolved rather than appearing as protected or empty.
  5. Activate and recover: commit the verified key transition and finish the matching delivery/admission transitions. A committed key alone does not prove every acknowledgement or recovery step has completed.

Rotation, provider changes and a return to local wrapping require the same coverage and recovery discipline. Key retirement must refuse a key still referenced by retained records, objects, historical snapshots or unfinished jobs.

Coverage and storage limits​

The rollout covers workspace payloads, integration secrets, evidence, assessments, reports, queued payloads and derived data. Its final coverage report must identify any plaintext query or operational metadata separately. Routing IDs, lifecycle markers or counters must not become a blanket exception for arbitrary extensions.

Temporary scan data needs separate verification of the hosted execution and cleanup path. An empty runtime metadata record, a stopped container, or an object absent from a listing is not proof that all previous disk content was destroyed. Likewise, a provider's has stored data flag does not tell you whether that data is a lifecycle marker or a payload.

Migration of current records does not retroactively rewrite provider backups or point-in-time recovery history. Pre-migration snapshots can retain their original representation until the applicable retention period ends. Recovery planning must preserve the keys required by retained encrypted history and verify restored data before normal writes resume. Encryption activation is not secure deletion of old backups.

Access and recovery​

Workspace key administration requires the workspace administrator role and fresh authentication for sensitive changes. Shared account identity, passwords, MFA and memberships must remain independent of an individual workspace key so a provider outage does not prevent administrators from reaching recovery controls. That does not grant access to encrypted workspace contents without the required key.

Keep a recovery owner and provider-side recovery procedure. Never include root keys, provider credentials, unwrapped data keys or plaintext evidence in support messages. Diagnostics should identify the failed operation and affected key version without disclosing those values.

Verification limits​

Provider adapters have been checked with specification-based fixtures, simulated providers and failure injection. Live customer AWS, GCP, Azure and Vault accounts have not been used for acceptance. Those simulations must not be described as live provider testing. Each actual customer configuration will still require a real wrap/unwrap connection test before activation.

Availability of the controls does not certify an individual provider deployment or the protection of an unmigrated workspace. Use the actual connection test and completed workspace migration/recovery status rather than inferring those results from this guide.

Configure a provider​

Sign in again as a workspace administrator, then open Organization → Workspace encryption. Saving configuration does not contact the provider or change the active key. Save its resource references first, then expand Federation setup values. Copy those exact values when establishing provider trust. Each saved configuration has its own subject; a replacement configuration needs its own trust entry even when it refers to the same wrapping key.

AWS KMS​

  1. Select an enabled symmetric encryption key. Enter its full key ARN, not an alias ARN, and an IAM role ARN in the same account and partition.
  2. Register the displayed issuer as an IAM OIDC provider, with the displayed audience (sts.amazonaws.com). Permit sts:AssumeRoleWithWebIdentity for that provider only. In the role trust conditions, match both aud and sub exactly to the displayed values; do not use a wildcard subject.
  3. Grant the role kms:Encrypt and kms:Decrypt on the selected key. The KMS key policy must also permit that role, directly or through IAM delegation. QScan does not need permission to delete keys, change policies or create grants.
  4. Save the trust and permission changes, then choose Test connection.

QScan further restricts each STS session to the requested operation, exact key and workspace/key-version encryption context. Keep older KMS keys enabled for retained data. See AWS OIDC role setup and KMS encryption context.

Google Cloud KMS​

  1. Use a symmetric encryption CryptoKey. Enter projects/PROJECT/locations/LOCATION/keyRings/RING/cryptoKeys/KEY without a version suffix. Keep versions required by existing ciphertext enabled.
  2. Create an OIDC provider in a Workload Identity Pool. Enter its resource name in QScan's audience field, starting with //iam.googleapis.com/projects/ and using the project number, not project ID.
  3. Set the provider issuer to the displayed issuer, map google.subject=assertion.sub, and restrict its attribute condition to assertion.sub == 'EXACT_DISPLAYED_SUBJECT'. Permit the displayed audience.
  4. Grant roles/cloudkms.cryptoKeyEncrypterDecrypter on this CryptoKey to the individual federated subject: principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL/subject/EXACT_DISPLAYED_SUBJECT. This adapter uses direct federated access, not service-account impersonation.
  5. Enable the required IAM/STS and Cloud KMS APIs, then Test connection.

Use Google's OIDC federation guide for provider creation and KMS roles for key-level permissions. A project-wide administrator grant is unnecessary.

Azure Key Vault​

  1. Choose an enabled RSA key supporting RSA-OAEP-256. Enter the full versioned key URL, directory ID and application client ID. The implemented endpoints are public Azure vault.azure.net and managedhsm.azure.net; other sovereign-cloud endpoints are not accepted by this configuration contract.
  2. Add a federated identity credential to the Entra application with the exact displayed issuer, subject and audience (api://AzureADTokenExchange). Do not create or paste an application secret.
  3. For an RBAC Key Vault, grant its service principal Key Vault Crypto Service Encryption User, scoped to the required key where your access policy allows. For Managed HSM, assign Managed HSM Crypto Service Encryption User through the HSM's local RBAC system at key scope; a Key Vault RBAC assignment does not establish HSM permission.
  4. Keep the named version enabled and reachable, then Test connection.

References: Entra federation, Key Vault roles, and key algorithms. For HSM deployments, use the separate Managed HSM role reference.

HashiCorp Vault Transit​

  1. Enter an HTTPS origin without a path, JWT auth mount, role, Transit mount and existing key name. Set the optional namespace when required. The reference is the immutable QScan identifier for this configuration's wrapping key.
  2. Configure JWT authentication with QScan's discovery URL and issuer. Set the role's bound_subject and bound_audiences to the exact displayed values, user_claim to sub, and use JWT rather than interactive OIDC login.
  3. Issue a short-lived token: this adapter accepts a returned lease longer than 60 seconds and no longer than 900 seconds. A five-minute role TTL is suitable. Attach only the policy for update on MOUNT/encrypt/KEY and MOUNT/decrypt/KEY; do not attach a root or administrative policy.
  4. Use a Transit key supporting authenticated encryption and associated data. Match QScan's Derived key setting to the existing Transit key. QScan supplies its own bound context. The key must already exist; QScan does not create it.
  5. Ensure the service can reach the approved HTTPS endpoint, then Test connection.

References: JWT role fields and Transit operations. Private-only network endpoints require an approved reachable deployment path; entering a URL does not establish a network tunnel.

Prepare, activate and recover​

After Test connection succeeds, choose Prepare key. Review the pending provider and current revision before starting activation. Follow the durable operation until migration, verification and recovery all complete. A prepared key or committed key alone is not the final success condition. If the response is lost, reopen this page and inspect the existing operation rather than creating another.

The page refreshes key status and coverage every five seconds without requesting fresh identity verification. These reads do not advance the migration or change keys. The visual meter shows verified record families for the exact target key, or verified channel shards during channel recovery. Provider form drafts and expanded diagnostics stay in place. If a refresh fails, the page identifies the last confirmed snapshot rather than claiming it is current.

Time estimates apply only to the current verification stage. They need at least three newly verified units over thirty seconds and disappear after a minute without observed progress. Units vary in size: the estimate is not a guarantee of completion, and it does not include later cutover or recovery stages.

Migration recovery options is a collapsed secondary section. It is hidden while an action is pending or recent progress is observed. Use Resume migration and recovery only when continuation is needed; this is a key action and may require identity verification. Simply viewing progress does not.

The diagnostics show which key revision each retained receipt verified. During activation, receipts for the prior key are labeled migration pending. The target-revision count measures record families, not bytes or elapsed time; object storage, channels and final recovery have separate verification requirements.

Leaving the page stops browser-driven continuation, but does not undo completed migration batches or release the scan admission hold. There is no cancellation or key-deletion action: partially migrated data can already require both keys. Return to this page and resume the same operation. If the five-minute sensitive authorization window expires, sign in again before resuming; do not create a new operation or revoke either provider. To change direction, first finish recovery, then prepare the desired key and run another complete transition. This also applies to a return to local encryption.

Keep both providers available throughout a provider change. To return to local encryption, explicitly prepare a local key and complete the same migration; this cannot recover ciphertext whose old wrapping key is unavailable. Renew provider trust in place when restoring existing-key access. Do not delete an old key or configuration based only on the current-key label.

FailureCheck before retrying
Sign-in requiredSign in again; refreshing an OAuth grant does not refresh the original authentication time.
Federation rejectedCompare issuer, subject and audience exactly, then check provider-side trust and token policy.
Wrap/unwrap deniedCheck key state/version, data-plane permissions and endpoint access. A successful token exchange is not key access.
Revision conflictReload current state. Do not replay a mutation using an older revision.
Migration cannot verifyKeep the operation and both keys. Inspect coverage and audit history; unknown coverage is not empty storage.

These instructions were checked against the implementation and linked primary documentation on 2026-11-18. External-provider acceptance remains simulation-based; each customer configuration must pass its real connection test.

SDK and OAuth controls​

Use the service origin where your workspace is hosted. SDK and OAuth operations use the same authorization, revision checks and migration workflow as the UI.

Encryption SDK clients use an OAuth grant for the /mcp resource. They never send that grant to the general REST API. A static workspace API key cannot substitute for a signed-in administrator. Sensitive changes require the original sign-in to be less than five minutes old: obtaining a new grant from an old session does not renew that time. Sign in again and reconnect if authorization has expired. Current membership and grant revocation are checked on each call.

JavaScript, from the unpacked project/SDK sources:

import { WorkspaceEncryption } from './sdk/javascript/index.mjs';

const encryption = new WorkspaceEncryption({
endpoint: process.env.QSCAN_ENDPOINT,
token: process.env.QSCAN_OAUTH_TOKEN,
});
const status = await encryption.status();
// Resume the same durable operation after a restart or uncertain response.
if (status.activation && !status.activation.complete) {
console.log(await encryption.activation(status.activation.operationId));
}

Python, from the unpacked sources:

import os
from sdk.python.workspace_encryption import WorkspaceEncryption

encryption = WorkspaceEncryption(
os.environ['QSCAN_ENDPOINT'], os.environ['QSCAN_OAUTH_TOKEN']
)
status = encryption.status()
if status.get('activation') and not status['activation']['complete']:
print(encryption.activation(status['activation']['operationId']))

In the downloadable source bundle, both Python clients are packaged in the standalone sdk/python/quantum_ready.py entry point: import WorkspaceEncryption from that module instead. JavaScript continues to export it from index.mjs. The authored repository modules remain separate; packaging combines them to preserve the inventory limit supported by deployed release verifiers.

JavaScript / Python methodPurpose
status / statusCurrent and pending key references, plus the resumable activation
coverage / coverageMigration diagnostics; missing evidence is not success
audit / auditPaginated, explicitly tenant-attributed key-control events; optional cursor and limit
configurations / configurationsPaginated provider configuration references
createConfiguration / create_configurationSave {configuration, confirm: true} without activating it
testConfiguration / test_configurationTest wrap/unwrap for a configuration ID
testRetainedKey / test_retained_keyVerify access to an existing wrapped key by key ID; does not rotate or rewrite it
prepareConfiguration / prepare_configurationSupply configurationId, expectedRevision, confirm: true
prepareLocal / prepare_localExplicit local rotation or return to local; supply expectedRevision, confirm: true
startActivation / start_activationSupply a persisted operationId, pending keyId, expectedRevision, confirm: true
activation / activationRead an operation by ID
advanceActivation / advance_activationSupply operationId, confirm: true to advance one bounded step

Python inputs use dictionaries with the same wire field names and Python True. Neither SDK automatically retries mutations. Persist your operation ID before starting activation; after a timeout, read status before deciding what to retry. Do not generate another ID simply because the first response was lost. Advancing an operation can commit its key change, so it requires fresh authorization too. Keep both old and new providers accessible until migration and recovery finish. A successful configuration save or connection test is not activation.

To diagnose an outage, sign in again and use Verify current key access on the encryption page, or pass status.active.keyId to testRetainedKey (Python: test_retained_key). Unlike Test connection, this operation uses the existing wrapped key and its original provider configuration. It checks an ephemeral encrypted challenge without rewriting stored data or selecting a replacement key. Restore access to the same provider key or retained local root before retrying. Success confirms key access at that moment; it does not certify every historical record or migration owner. Both diagnostics require a recent administrator sign-in and produce audit events. There is no automatic local fallback.

Encryption audit history loads bounded pages from independent Identity storage, so a workspace key outage does not require decrypting workspace data to inspect control events. New events retain explicit workspace ownership. Historical events without that attribution remain available to operators only; they are not assigned to workspaces based on present-day membership. Retained-key diagnostics identify the tested key as their audit resource.

Credential renewal and recovery boundaries​

After saving a provider configuration, open Federation setup values on its card. Copy the issuer, exact subject and audience into the provider's trust configuration; OpenID discovery and JWKS URLs are shown there as well. The subject is scoped to both the workspace and that immutable configuration. Do not substitute a cloud-scanner connection subject or a wildcard workspace subject. The displayed values come from the same contract used to issue encryption assertions.

Provider credentials are acquired through federation for each operation. AWS exchanges a fresh assertion through STS with an operation-, key- and encryption-context-scoped session policy. Google and Azure exchange an assertion for a short-lived access token; Vault performs JWT login. These access tokens are not persisted in workspace configuration. There is no customer token field to refresh, and an expired or rejected token does not trigger a local-key fallback.

If trust or permissions were revoked, restore the original federation relationship and access to the original wrapping key, then verify retained-key access. Keep the old configuration and provider key available while preparing a different provider or rotating to a new key. Configuration records are immutable: saving another configuration does not silently redirect existing keys to a different identity or endpoint. A successful test on the new configuration does not establish access to the old key.

Deleting an external wrapping key or losing its required version can make retained data unrecoverable. Preparing a local key cannot decrypt data whose external key is unavailable. Preserve provider backups and recovery procedures alongside the platform's documented backup/PITR limitations.

The clients reject redirects, unsafe endpoints, mismatched RPC responses and responses over 2 MiB. They accept both JSON and SSE responses from the stateless MCP endpoint. No SDK success response establishes coverage beyond the server's reported operation and diagnostics.

Workspaces created before encryption​

If the page shows Not provisioned, choose Set up workspace encryption after a fresh administrator sign-in. This creates a random wrapped local key without rewriting retained data. Retries preserve the same key; setup never replaces an existing external key. Next prepare a local key and start migration. Keep the page open or return to resume the same operation, and verify coverage and completed recovery before treating existing data as protected.

The browser endpoint is POST /api/v1/workspace-encryption/local/initialize with an empty JSON object and X-QScan-Workspace. OAuth clients use workspace_encryption_initialize_local with confirm: true; the SDK methods are initializeLocal({confirm: true}) and initialize_local({"confirm": True}). Initialization is separate from migration and does not change historical assessments.