GCP KMS discovery development preview
The signed bundle collector scanner/gcp_kms.py reads metadata for explicitly selected Cloud KMS key versions. Scanner 0.17.0 and platform 0.27.0 support managed GCP jobs, schedules, scope configuration and guided onboarding. The signed bundle includes hash-locked dependency preparation and an offline environment installer. Real authentication-transport tests pass with networking intercepted; live-account acceptance remains unfinished.
One-command Python connection
Save agent.local.json from Getting started in the verified bundle folder and
configure the local cloud identity and read permissions first. Open a terminal in
that folder. On Windows, run:
py -3.12 scanner/setup_cloud.py --provider gcp --connect
On a supported POSIX host, run:
sh scanner/setup-cloud.sh gcp --connect
This first checks that your configuration contains valid resources for the selected
provider, before downloading dependencies. It then prepares or verifies the locked
environment, reads the selected cloud resources to check access, and only then
prompts privately for the agent enrollment token. If the configuration is rejected,
return to Getting started, select the matching cloud collector and download a fresh
agent.local.json into this folder. Repeat the same command after replacing it.
If cloud access fails, follow the diagnostic and run the same command again. No agent
connects and no findings are uploaded by the access check. Keep the terminal open;
Ctrl+C stops the foreground agent. Use the same command to reconnect.
Omit --connect to prepare dependencies only. The separate access-check and connect
commands below remain available for troubleshooting. Azure and GCP Python setup
includes separate macOS 11+ wheel locks for Apple Silicon and Intel with CPython 3.12. Mac wheel hashes, tags and dependency requirements are verified; native Mac execution and live cloud-account acceptance remain pending.
macOS Python setup
Install CPython 3.12 from python.org,
then run Install Certificates.command in Applications > Python. Use macOS 11
or newer. Setup selects the wheel lock for the architecture of the running Python
interpreter (Apple Silicon or Intel), verifies all package hashes, and prepares an
isolated gcp-agent-env directory. It never installs global packages or requires sudo.
Save agent.local.json beside the scanner folder. Open Terminal in the extracted
bundle folder and run sh scanner/setup-cloud.sh gcp --connect. To avoid typing
the folder path, type sh , drag scanner/setup-cloud.sh into Terminal, then type
gcp --connect and press Return. The launcher finds its own bundle directory.
Use your local Azure CLI identity for Azure, or Application Default Credentials for Google Cloud, as described below. A managed identity is not created by selecting it in the wizard. A passing local check does not prove provider access; the combined command checks access before asking for your enrollment token.
Mac wheel downloads and dependency closure have passed verification. Execution on actual Mac hardware is still pending. The native CI workflow includes this setup path; these instructions do not imply a compiled macOS binary or launchd service.
Compiled collector
Choose Binary in Getting started to use the Windows or Linux collector without installing Python or provider SDKs. Follow cloud binary setup for the local identity, access check and service-account requirements. The Python workflow below remains available.
Guided installation and access check
For a connected host, use Getting started to select this collector, save its scoped configuration, and prepare the verified bundle. The wizard offers the combined command above, with separate checks available under troubleshooting. On Windows, run:
py -3.12 scanner/setup_cloud.py --provider gcp
On a supported POSIX host, run:
sh scanner/setup-cloud.sh gcp
Repeating setup verifies and reuses a matching environment without downloads or installation. It checks Python, SDK imports, locked package versions and dependency health. An incomplete or mismatched environment is preserved; prepare a fresh bundle folder for recovery. Run Check cloud access afterward to verify provider permissions.
Use the wizard's Copy access check command with the prepared environment. It reads
only the configured resources with your local identity, requires no platform enrollment
token, and uploads nothing. A successful result has "ready": true and exit code 0.
Failures provide fixed recovery guidance and a zero-based resourceIndex referring
to the configured resource order. Resolve failures before using Copy connect command.
Access can change after the check; inspect the first scan result as well.
The lower-level commands below remain available for offline dependency preparation.
Review the access scope
Supply a full resource name, including its numeric version. The collector accepts 1–200 unique names, up to 300 characters each. URLs, wildcards, aliases, traversal segments and duplicate selections are rejected before credential initialization.
python scanner/gcp_kms.py permissions --key-version projects/quantum-test/locations/us-central1/keyRings/approved/cryptoKeys/signing/cryptoKeyVersions/1
This offline command produces a custom-role definition containing only cloudkms.cryptoKeyVersions.get, plus the parent keys on which to review bindings. It does not create a role or grant access. Google documents this permission for the key-version metadata endpoint.
IAM access is key-scoped; collection is version-scoped. Grant the reviewed role at each required CryptoKey rather than an entire project. That key-level grant can cover its versions; the collector separately restricts requests to the exact versions selected. Do not treat its local selection as a provider IAM boundary. See Cloud KMS access control.
Development execution
The collector uses locally configured Application Default Credentials with the Cloud KMS OAuth scope. Credential acquisition follows the host's identity configuration; no credential, principal, token or endpoint can be supplied through the scan arguments.
Prepare the eleven pinned dependencies on a connected machine. Choose the target matching the agent host, not necessarily the download machine:
| Dependency target | Agent environment | Validation so far |
|---|---|---|
gcp-windows-x86_64-cpython312 | Windows x86_64, CPython 3.12 | Offline setup and real transport fixtures passed |
gcp-windows-x86_64-cpython314 | Windows x86_64, CPython 3.14 | Wheel hashes verified; environment execution pending |
gcp-linux-x86_64-cpython312 | Linux x86_64, CPython 3.12, glibc 2.34+ | Restricted Linux installation, imports, CLI startup and repeat preservation passed |
The current Google authentication dependencies include native cryptography components. There is no universal GCP wheel lock. macOS 11+ has separate Apple Silicon and Intel locks for CPython 3.12. Linux/Windows ARM64 and Python 3.13 remain unsupported by this setup tool.
python scanner/download_dependencies.py --target gcp-windows-x86_64-cpython312 --directory gcp-wheels
python scanner/create_cloud_environment.py --provider gcp --directory gcp-agent-env --wheelhouse gcp-wheels
The first command requires package-index access. Copy the complete wheel directory and verified bundle tools to an offline host if needed. The second command detects the host, checks the corresponding lock, requires a new destination, installs offline and verifies versions. It preserves interrupted environments with a pending marker; after correcting the cause, use a new destination. Neither command changes global Python or configures a native service.
Use gcp-agent-env/Scripts/python.exe on Windows or gcp-agent-env/bin/python on Linux. For example, on Windows:
gcp-agent-env/Scripts/python.exe scanner/gcp_kms.py scan --source gcp-kms --key-version projects/quantum-test/locations/us-central1/keyRings/approved/cryptoKeys/signing/cryptoKeyVersions/1
Provider requests use the fixed HTTPS Cloud KMS endpoint, TLS verification and disabled redirects. They do not inherit proxy or CA environment overrides. Connect/read timeouts, response size limits and cancellation checkpoints bound processing; the elapsed budget is checked between streamed chunks and is not a hard process deadline. Credential acquisition is a separate SDK operation. See the Google authentication transport reference.
Interpret the evidence
Reports retain the selected resource identity, location, known algorithm, version state and protection level. Attestations, external-key URIs, import identifiers, provider error text and credential material are excluded. Algorithm capability does not prove runtime usage: authentication and key-establishment posture remain unknown. Provider-managed or external symmetric algorithm labels remain unknown unless an explicit supported algorithm is returned. Supported mappings follow the Cloud KMS algorithm reference.
Exit code 0 means every selected version returned matching metadata. Exit code 2 means incomplete analysis or setup failure. A failed selection produces a fixed diagnostic and its zero-based input index. Inspect gcp.kms.access-denied against the exact key's policy, gcp.kms.not-found against the selected version, and gcp.kms.invalid-metadata against response identity. The CLI emits local JSON only and never uploads evidence.
Tests use the real pinned Google authentication and Requests libraries with synthetic credentials and HTTP responses; socket access is blocked. They verify authorization headers, endpoint selection, TLS and proxy settings, redirect refusal, bounded token refresh, and permission-error redaction. Neither a successful fixture nor metadata about a post-quantum key establishes quantum-safe runtime behavior or live GCP connectivity.
Managed agent setup
- Enroll an agent with GCP KMS metadata (preview). This grants platform job permissions only; configure Google IAM independently.
- In Getting started, choose the agent and GCP KMS, select a supported host platform and enter one full version name. Download the configuration. It contains
allowedGcpKmsVersions, not credentials or identity configuration. Additional exact versions can be reviewed and added locally, up to 200. - Create the locked GCP environment above. Configure Application Default Credentials on the host using your approved identity process. Keep the platform agent credential separate from Google credentials.
- With the GCP environment's Python executable, run
scanner/qr.py doctor --config agent.local.json. This checks scope and library availability without loading Google credentials or making provider requests. - Set the platform endpoint and agent credential through the protected environment, then run
scanner/qr.py agent --config agent.local.jsonusing the same interpreter. Create the first exact-version scan from the wizard. Schedules use the same local permission limits.
To opt into central configuration, add "managedConfiguration": true locally. The workspace can narrow allowedGcpKmsVersions, pause new scans and adjust polling within local limits. It cannot widen the list or select Google projects, principals, credential files or endpoints. Omitting the list in a published revision disables GCP scope. Publication pauses claims until the agent acknowledges the revision.
Provider failures produce fixed job diagnostics and no evidence upload. Cancellation, revocation and shutdown checks run before discovery, during response processing and before upload. A request already in progress may continue until its transport timeout/checkpoint; results cannot pass a failed lease check. Local API/agent tests verify scoped uploads, tenant isolation, configuration, pause and revocation with synthetic provider data.
Verify access before starting the agent
Scanner 0.21.0 adds an explicit read-only access check. After local doctor checks pass, run this with the dedicated cloud environment's Python interpreter (Windows example):
gcp-agent-env/Scripts/python.exe scanner/qr.py cloud-check --config agent.local.json --kind gcp-kms
On Linux use the environment's bin/python. The command contacts the provider using the identity configured on this host and reads only the exact locally allowlisted resources for the selected source. It never contacts the platform or uploads observations. No platform credential is required. It uses the same metadata validation as discovery, so invalid or mismatched responses fail the check.
Exit 0 means every configured resource was read and validated; exit 2 means configuration, identity, provider access or metadata validation failed. resourceIndex is zero-based and refers to the selected provider's array in your local configuration. Output includes fixed diagnostic codes and suggested remedies, excluding resource identifiers, key metadata and raw SDK errors. Partial success remains a failure overall. Correct the failed resource or identity setup before starting the agent; do not widen permissions to fix a dependency or connectivity failure.
This is a point-in-time access check. It does not verify platform enrollment, continuous service operation, future permissions or an end-to-end scan. The local doctor remains offline. Open Getting started > Review local diagnostics, select this provider and your agent distribution, and copy the command to save cloud-access.json. Choose that file in the dialog for per-resource results and corrective guidance. The file is read only in your browser; it is not uploaded or saved.