Skip to main content

AWS KMS discovery development preview

The signed discovery bundle includes an experimental, metadata-only collector at scanner/aws_kms.py. It inspects explicitly selected KMS key ARNs. Platform 0.26.0 and scanner 0.16.0 support exact-key jobs, schedules, guided setup and managed scope. This is a preview validated with synthetic provider responses; it has not yet been validated against a live AWS account. The current compiled Windows and Linux agents include the AWS SDK.

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 aws --connect

On a supported POSIX host, run:

sh scanner/setup-cloud.sh aws --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.

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 aws

On a supported POSIX host, run:

sh scanner/setup-cloud.sh aws

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.

Select the smallest scope​

In Getting started, choose AWS KMS before enrolling. Save the scoped credential, enter your exact key ARN, and optionally name an existing local AWS profile. Download scoped IAM policy produces a reviewable kms:DescribeKey policy for that ARN; it does not modify AWS permissions.

Choose the operating system of the machine running the collector. No host is preselected. Changing it preserves the key ARN. Download the configuration, follow the dedicated cloud-environment commands, run doctor, and start the collector. A heartbeat verifies contact only; a successful discovery scan verifies access to your key.

Choose between 1 and 200 full key ARNs. Aliases, wildcard resources, duplicate ARNs and mismatched partitions are rejected before SDK initialization. Generate the proposed IAM permission document locally; this command does not load AWS credentials:

python scanner/aws_kms.py policy --key-arn arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

Replace the example ARN with an authorized key. Repeat --key-arn for additional keys. The policy grants only kms:DescribeKey on those resources. Your AWS administrator must review the effective IAM and key policies; generating a policy does not change AWS permissions. No key enumeration, encryption, decryption, signing, key export, or key mutation permissions are requested.

AWS documents that resolving certain predefined aliases through DescribeKey can create an AWS-managed key. This collector accepts only full key ARNs to avoid that alias behavior. See the DescribeKey API and KMS permissions reference.

Run from a development environment​

Scanning requires a dedicated Python environment with Boto3 and Botocore. The signed bundle includes a separate hash lock for all seven AWS SDK packages and an offline environment creator. These optional dependencies are not included in the native service runtime locks yet. Use your existing short-lived AWS credentials or named profile; do not place credentials in the command or report.

On a machine with CPython 3.12–3.14 and pip, prepare the approved wheels. This is the only setup command below that requires package-index access:

python scanner/download_dependencies.py --target aws-sdk-python3 --directory aws-wheels

Copy the verified bundle tools and complete wheel directory to the agent host if necessary. Create a new environment; this step installs only from the supplied wheels, requires exact hashes, and does not change global Python:

python scanner/create_cloud_environment.py --directory aws-agent-env --wheelhouse aws-wheels

The destination must be new. Setup verifies the wheel inventory, creates a virtual environment, installs offline, checks dependency consistency and installed versions, then writes a completion receipt. Interrupted environments retain a pending marker and are never reused automatically. Correct the cause and choose a new destination. This is a foreground AWS agent environment, not a native service installation or a TLS/SSH scanning environment.

On Windows, use aws-agent-env/Scripts/python.exe for the scan, doctor and agent commands. On Linux or macOS, use aws-agent-env/bin/python. For example, on Windows:

aws-agent-env/Scripts/python.exe scanner/aws_kms.py scan --profile discovery --source aws-kms --key-arn arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

The collector uses the SDK credential chain, verifies TLS, disables configured endpoint URL overrides, and bounds request timeouts and attempts. Credential retrieval follows the host's SDK configuration. See Botocore configuration.

Understand the result​

  • Exit code 0 means every requested key returned usable metadata. Exit code 2 means an incomplete scan or setup failure.
  • observations contains platform-shaped inventory evidence. This command does not upload it or create a managed scan job.
  • diagnostics identifies failed selections by their zero-based input index and a fixed error code. Permission failures remain visible; they are not reported as an empty successful inventory.
  • Reports include resource ARNs and account IDs. Descriptions, tags, external-key identifiers, raw provider errors, and credentials are excluded.
  • Key specifications describe capability. Authentication and key-establishment posture remain unknown; the collector does not establish runtime use or quantum safety. SYMMETRIC_DEFAULT also remains an unknown algorithm.

For aws.kms.access-denied, review access to the exact selected key rather than adding broad list or write permissions. For aws.kms.invalid-metadata, stop and investigate the response identity. For aws-sdk-unavailable, repair the development environment before retrying. Managed cloud credentials, production AWS onboarding, Azure and GCP connectors remain under development.

Manage an AWS agent​

  1. Enroll an agent with AWS KMS metadata (preview). This grants platform job permissions, not access to AWS.
  2. In Getting started, choose the agent, select AWS KMS, enter one approved full key ARN, and download the configuration. Review the generated allowedAwsKmsKeys list. For multiple keys, add explicit ARNs locally, up to 200.
  3. Create the locked AWS environment above and provision a least-privilege AWS identity on the agent host. Use the default SDK credential chain, or add a local awsProfile string. No AWS credentials or profile selectors are submitted to the workspace.
  4. With the environment's Python executable, run scanner/qr.py doctor --config agent.local.json. The check validates key scope and SDK availability without creating an AWS session or querying credentials. It does not verify actual AWS access.
  5. With the same executable, run scanner/qr.py agent --config agent.local.json with the platform endpoint and agent credential configured. Create a first scan from Getting started. Each job targets one exact ARN; recurring schedules use the same scope enforcement.

For centralized configuration, explicitly add "managedConfiguration": true locally. The workspace can narrow allowedAwsKmsKeys, pause new scans and adjust polling within local limits. It cannot change AWS profiles, credentials, endpoints or widen the original local key list. Omitting the key list from a published configuration disables AWS jobs for that configuration. Publication pauses claims until the agent acknowledges the revision.

Cancellation, agent revocation and service shutdown are checked before and after the provider request and before upload. A request already in progress may run until its SDK timeout; it cannot publish results after the next failed lease/stop check. Provider errors fail the job with a fixed diagnostic code. Incomplete results are never uploaded.

Local integration tests exercise enrollment, configuration, lease-bound upload, tenant isolation, pause and revocation using synthetic AWS responses. Live AWS access and production installation still require separate acceptance.

The locked environment has been created and exercised on Windows with CPython 3.12. Real Boto3/Botocore tests use AWS Stubber to validate request/response models, error redaction and endpoint resolution with all network calls disabled. This does not establish live AWS permissions or native platform acceptance. Universal wheel compatibility alone does not prove successful setup on every operating system.

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):

aws-agent-env/Scripts/python.exe scanner/qr.py cloud-check --config agent.local.json --kind aws-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.