Instructions for deploying the AWS KMS Connector to scan for cryptographic assets and deliver findings to the AgileSec Platform for processing and analysis.
Overview
The AWS KMS Connector integrates AWS Key Management Service with Keyfactor's AgileSec Platform. This Connector allows users to discover, inventory, and analyze cryptographic keys managed by AWS KMS across multiple AWS accounts.
What Gets Scanned
The AWS KMS Connector can discover the following cryptographic assets and asset information:
-
Public Key Data: Enumerates all asymmetric (RSA, ECC) KMS keys in a specified AWS region.
-
Key Metadata: Key specification and usage metadata, aliases, and resource tags for each key; public key material is retrieved for asymmetric keys only.
-
Key Aliases: Human-readable alias names associated with keys.
-
Resource Tags: AWS resource tags applied to KMS keys.
Scanned Data Fields
The following data fields are scanned for AWS KMS keys:
|
Data Category |
Data Fields |
|---|---|
|
Identity / location |
|
|
Cryptographic attributes |
|
|
Public-key detail (asymmetric keys only) |
|
|
Lifecycle / metadata (from DescribeKey) |
|
|
Enrichment |
|
Prerequisites
Ensure you meet the following requirements to enable scanning.
Network Access
Ensure HTTPS network connectivity from AgileSec platform or remote execution machine to AWS KMS endpoints.
Supported Authentication Methods
The AWS KMS Connector uses AWS Access Key authentication:
-
Access Key ID + Secret Access Key: Standard IAM user credentials scoped to the target AWS account and region.
AWS KMS Required Access Rights
The IAM user or role must have the following AWS KMS permissions:
|
Permission |
Purpose |
|---|---|
|
|
Enumerate all KMS keys |
|
|
Read key metadata (spec, usage, state) |
|
|
Retrieve public key material (asymmetric keys) |
|
|
List key aliases |
|
|
List resource tags on keys |
Remote Execution Requirements
If running the Connector remotely using CLI, the remote execution machine must meet these requirements:
|
Component |
Requirement |
|---|---|
|
Operating System |
|
|
RAM |
Minimum 500 mb (0.5 GB) to enable API calls and data streaming. |
|
Disk Space |
Minimal; scans are API-driven and findings are streamed to the AgileSec platform. No data is stored on disk. |
|
Permissions |
Read/write access to remote sensor working directory (remote sensor install location) |
Running the Connector
AgileSec AWS KMS scans can be executed using the following methods:
-
Platform Scan Execution: Configure and execute scans directly through the Keyfactor AgileSec web UI with on-demand or scheduled execution options.
-
API Scan Execution: Programmatically trigger scans through REST API calls, enabling integration with CI/CD pipelines and automation workflows.
-
Remote Scan Execution: Deploy and run the connector via CLI on customer-managed infrastructure for scenarios such as:
-
Scanning air-gapped or internal instances the platform cannot directly reach
-
Customers wanting to manage their own scheduling and execution environment.
-
Refer to Scan Execution Flows for additional scan execution information.
Connectors/Sensors Note: Connectors are considered a subset of Sensors. Sensors and Connectors utilize the same Unified Sensor Framework, but Sensors use the Host Sensor for additional scanning depth.
“Sensor”-labeled variables for API and Remote execution are common to both Sensors and Connectors. Unless specified, do NOT update these with “Connector”.
Configuration Options
The following parameters are used to configure AgileSec AWS KMS scans.
|
Field Name |
UI Display Name |
Type |
Required |
Description |
|---|---|---|---|---|
|
|
Access Key ID |
String |
✅ Yes |
AWS Access Key ID for the IAM user |
|
|
Secret Access Key |
String |
✅ Yes |
AWS Secret Access Key for the IAM user |
|
|
AWS Region |
String |
✅ Yes |
AWS region to scan (e.g., |
Platform Scan Execution
Running scans through the user interface is the simplest and fastest way to get started. The platform enables running on-demand or scheduled scans in a dedicated environment.
Platform Scan Configuration
-
Open your browser and navigate to the Keyfactor AgileSec Platform Web URL
-
Log in with your credentials
-
Click on "Sensors" in the left navigation menu under Scan
-
Click "+ New Sensor".
-
Click on the correct card to open the configuration interface.
Configure Parameters and Start Scan
-
Fill in the required configuration parameters.
-
Click Save.
-
Click Action then Scan to begin a scan.
Note: Click Edit to reconfigure parameters.
API Scan Execution
Scans may be programmatically triggered through REST API calls, enabling seamless integration with CI/CD pipelines, automation workflows, and custom applications. API execution provides flexibility for developers to incorporate cryptographic scanning into their existing development and deployment processes.
Note: For complete API reference, see API.
Generate AgileSec API Access Token
-
Open your browser and navigate to AgileSec Platform UI
-
Log in with your Keyfactor credentials
-
Click "Access Tokens" in the main navigation menu
-
Click "Generate Token" button
-
Set Token Type to API Token and provide the required details
-
Click "Generate" and copy the generated token
AgileSec API Endpoint
POST https://<platform-url>/v3/scan/create/
Request Format
Headers
Content-Type: application/json
isg-api-token: <your-api-token>
Request Body
{
"sensorName": "<sensor name>",
"sensorType": "AWS KMS",
"sensorConfig": {
"akid": "<aws access key id>",
"secret_key": "<aws secret key>",
"region": "<aws region>"
},
"callbackId": "<callback id>",
"labels": [
{
"<label name>": "<label value>"
}
],
"priority": "<priority>"
}
Remote Scan Execution
Scans may be run on remote host machines with the AgileSec Remote Sensor Package.
Download Remote Sensor Package
-
Open your browser and navigate to the Keyfactor AgileSec Platform Web URL
-
Log in with your credentials
-
Click on "Sensors" in the left navigation menu under Scan
-
Click Remote Scan.
-
Click + Download Remote Sensor.
-
Download the sensor binary for your remote machine’s operating system
Generate Platform Token
-
In the Download Remote UI, click "Generate Token"
-
Copy the generated token
-
Store securely in an environment variable such as
SENSOR_TOKEN:export SENSOR_TOKEN="your-generated-token"
Create Configuration File
Create a YAML configuration file (e.g., awskms-config.yml) with your scan settings. An example configuration can be found in config/sample-configs/awskms.yml.
Step 4: Run the Connector
Execute the Connector with your configuration file:
-
Linux/macOS
Bash# Set environment variables export SENSOR_TOKEN="your-sensor-token" # Run Connector ./unified_sensor_linux -c awskms-config.yml -
Windows (PowerShell)
PowerShell# Set environment variables $env:SENSOR_TOKEN = "your-sensor-token" # Run Connector .\\unified_sensor_windows.exe -c .\\awskms-config.yml
Remote Scan Execution Configuration Examples
-
Basic Configuration
YAMLscan_config: plugins: - awskms - export config: awskms: name: awskms plugin_config: akid: "${env:AWS_ACCESS_KEY_ID}" secret_key: "${env:AWS_SECRET_ACCESS_KEY}" region: "us-east-1"
Known Limitations
Symmetric Key Material Is Not Extractable
Symmetric KMS keys (SYMMETRIC_DEFAULT and the HMAC_224/256/384/512 specs) are inventoried with their algorithm, size, key usage, and supporting metadata. However, AWS KMS never releases symmetric key material, so these findings carry no raw key bytes. Their fingerprint_sha256 is derived from the immutable key ARN (unique per key, stable across scans) rather than from key material. Only asymmetric keys (RSA, ECC) expose public key material, from which the fingerprint is computed directly.
Single Region
Each scan covers a single AWS region. To scan multiple regions, configure multiple Connector instances.
Troubleshooting Common Errors
-
CONFIG-404– Unable to read/parse configuration file-
Cause: The configuration file path is incorrect or the file is malformed.
-
Fix: Verify the config file path and validate JSON syntax.
-
-
CONFIG-422– Required attribute not found-
Cause: A required configuration field (e.g.,
akid,secret_key,region) is missing. -
Fix: Ensure all required fields are present in the configuration.
-
-
AWSKMS-201– FailedListKeys-
Cause: Insufficient IAM permissions or invalid credentials.
-
Fix: Verify IAM permissions include
kms:ListKeysand credentials are correct.
-
-
AWSKMS-202– FailedGetPublicKey-
Cause: Unexpected failure retrieving the public key of an asymmetric key; the affected key is skipped. Expected cases (
UnsupportedOperationExceptionfor keys without public material,AccessDeniedException) are logged without this code -
Fix: This is expected for symmetric keys. For asymmetric keys, ensure
kms:GetPublicKeypermission.
-
-
AWSKMS-205– FailedDescribeKey-
Cause: Unexpected failure reading key metadata. Without
DescribeKeymetadata, the affected key is skipped and cannot be reported.AccessDeniedExceptionis logged without this code. -
Fix: Ensure
kms:DescribeKeypermission is granted.
-
Getting Support
Collect diagnostic information:
-
Sensor version
-
Configuration file (redact credentials)
-
Log output
-
AWS details (region, account ID)
Contact Support
-
Portal: https://support.keyfactor.com