AWS API Gateway
This plugin collects read-only metadata for AWS API Gateway custom domain names, evaluates CCF Rego policy bundles against each domain, and emits evidence back through the CCF agent.
This page is for operators who run the plugin-aws-apigateway plugin with the CCF Agent, and for developers who write policies for it. It documents v0.1.2 and is generated from the plugin's README at v0.1.2.
How it works
How it fits in CCF
The CCF agent starts this binary through HashiCorp go-plugin (runner protocol v2), passes configuration and policy paths over gRPC, and receives generated evidence through the runner callback. This repository does not call the CCF API directly.
During Init, the plugin registers the apigateway-domain subject template (identified by account_id, region and domain_name) and the subject and risk templates discovered from the supplied policy bundles.
Configuration
| Key | Required | Description |
|---|---|---|
regions | yes | Comma-separated list of AWS regions to scan. Empty entries are ignored. |
policy_labels | no | JSON object of extra labels added to every evidence, e.g. {"team":"platform"}. |
AWS credentials come from the default AWS SDK credential chain. The account ID is read with sts:GetCallerIdentity in the first configured region.
Any agent-supplied policy_data is passed through to Rego as data.*, on top of the bundle's own data.json (agent-supplied keys win).
Evidence collected
Data collected
For every custom domain name returned by the API Gateway GetDomainNames API (all pages) in each configured region, the plugin builds this policy input:
| Field | Source |
|---|---|
region | the region scanned |
account_id | the caller's AWS account |
domain_name | the custom domain name |
security_policy | the domain's TLS security policy |
certificate_arn | the regional certificate ARN, or the edge-optimized one when there is no regional certificate (omitted when neither is set) |
endpoint_type | the first endpoint type (e.g. REGIONAL, EDGE) |
status | the domain name status |
tags | the domain's tags |
Each evidence carries the labels provider=aws, type=apigateway-domain, domain_name, region and account_id, plus any policy_labels.
Policy input
One document per API Gateway custom domain name, in each configured region. The plugin builds it from GetDomainNames, and a policy reads it as input.
| Field | Type | Description |
|---|---|---|
region | string | AWS region the domain is defined in. |
account_id | string | AWS account ID the plugin is running against. |
domain_name | string | The custom domain name. |
security_policy | string | The domain's TLS security policy, for example TLS_1_2 or TLS_1_0. |
certificate_arn | string | ARN of the certificate on the domain: the regional certificate when there is one, otherwise the edge-optimized one. Omitted when the domain has none. |
endpoint_type | string | First endpoint type of the domain: EDGE, REGIONAL or PRIVATE. Empty when none is set. |
status | string | Domain name status, for example AVAILABLE, UPDATING or PENDING. |
tags | object (string to string) | The domain's tags. An empty object when it has none. |
An example input:
{
"region": "eu-west-1",
"account_id": "111122223333",
"domain_name": "api.example.com",
"security_policy": "TLS_1_2",
"certificate_arn": "arn:aws:acm:eu-west-1:111122223333:certificate/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"endpoint_type": "REGIONAL",
"status": "AVAILABLE",
"tags": {
"Environment": "production"
}
}
Subject templates
The subject templates this plugin registers. Each example is built from sample data.
apigateway-domain
An API Gateway custom domain. The plugin registers it as a component subject and attaches it to the evidence of every domain it evaluates. Title: API Gateway Domain {{ .domain_name }}.
| Identity key | Description |
|---|---|
account_id | AWS account ID. |
region | AWS region. |
domain_name | API Gateway custom domain name. |
Example:
{
"name": "apigateway-domain",
"type": "component",
"title": "API Gateway Domain api.example.com",
"description": "AWS API Gateway custom domain api.example.com in 111122223333/eu-west-1.",
"purpose": "Represents an AWS API Gateway custom domain evaluated for TLS compliance posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"domain_name": "api.example.com"
}
}
Policies
The policy bundles that work with this plugin, at their newest releases. The controls are the ones the bundle's policies list in their metadata.
| Bundle | Latest version | Controls covered | Compatible plugin lines |
|---|---|---|---|
plugin-aws-apigateway-policies | v0.1.1 | CC6.7 | latest |
Default policy bundle mapping
| Repository | Primary input |
|---|---|
plugin-aws-apigateway-policies | one API Gateway custom domain per evaluation |