Skip to main content

AWS ELB

This plugin collects read-only AWS Elastic Load Balancing v2 evidence and evaluates CCF Rego policy bundles against one normalized input document per ELBv2 resource.

It implements the RunnerV2 gRPC plugin protocol from github.com/compliance-framework/agent.

Component subject templates registered during Init:

  • aws-elbv2-loadbalancer
  • aws-elbv2-listener
  • aws-elbv2-target-group
  • aws-elbv2-target-health

Account and region are labels and input context. They are not standalone subjects.

This page is for operators who run the plugin-aws-elb plugin with the CCF Agent, and for developers who write policies for it. It documents v0.1.3 and is generated from the plugin's README at v0.1.3.

Configuration​

The CCF agent passes configuration as flat string fields. Structured values are JSON-encoded strings.

KeyDefaultDescription
accounts[]JSON array of {account_id, regions[], role_arn, external_id, session_name, tags{}}. Empty means use the configured AWS credential chain.
default_regions[]JSON array used when an account omits regions; falls back to the AWS SDK default region.
lookback_days90Positive integer no greater than 90, used for CloudTrail LookupEvents.
policy_inputs{}JSON object exposed to Rego as input.policy_inputs.
policy_input{}Alias for policy_inputs.
policy_labels{}JSON string map merged into generated evidence labels.
max_concurrency4Positive integer no greater than 32, used as the worker count for account/region collection.
api_timeout_seconds60Positive integer timeout per account/region target.
tag_batch_size20Positive integer no greater than 20, used as the ELBv2 DescribeTags resource ARN batch size.

Example:

{
"accounts": "[{\"account_id\":\"123456789012\",\"regions\":[\"us-east-1\"],\"role_arn\":\"arn:aws:iam::123456789012:role/elbv2-readonly\",\"external_id\":\"ccf\",\"session_name\":\"ccf-elbv2\",\"tags\":{\"environment\":\"prod\"}}]",
"default_regions": "[\"us-east-1\"]",
"lookback_days": "90",
"policy_inputs": "{\"minimum_availability_zones\":2}",
"policy_labels": "{\"team\":\"security\"}"
}

Evidence collected​

Coverage​

CONFIG evidence includes:

  • DescribeLoadBalancers
  • DescribeListeners
  • DescribeTargetGroups
  • DescribeTargetHealth
  • DescribeTags for load balancer, listener, and target group tags

DYNAMIC evidence includes CloudTrail LookupEvents for elasticloadbalancing.amazonaws.com, filtered to CreateListener, ModifyListener, DeleteListener, CreateRule, ModifyRule, and DeleteRule, and attached to matching load balancer records as dynamic.cloudtrail_events.

Out of scope:

  • ACM certificate expiry and renewal status. This plugin does not call acm.DescribeCertificate; it only records the listener certificate_arn.
  • SSL policy cipher inspection. This plugin records only the listener ssl_policy string.
  • AWS Artifact SOC reports and privacy endpoint inventory.

Policy input​

The plugin evaluates four kinds of resource, and a policy receives one document of the matching kind as input. Every document has the same envelope, and resource.type says which kind it is: loadbalancer, listener, target-group or target-health. Only config differs by kind, and a load balancer also carries CloudTrail events under dynamic. A bundle is matched to a kind by its name: plugin-aws-elb-loadbalancer-policies, plugin-aws-elb-listener-policies, plugin-aws-elb-targetgroup-policies or plugin-aws-elb-targethealth-policies. A bundle with any other name is evaluated against load balancers. The tables list the fields of every kind with nested fields in dot notation, and the example shows one document of each kind under the key named after its resource.type; a real input is only the document itself, without that key.

FieldTypeDescription
schema_versionstringAll kinds. Always v1.
sourcestringAll kinds. Always aws-elbv2.
account.account_idstringAll kinds. AWS account ID.
account.role_arnstringAll kinds. ARN of the role the plugin assumed for the account. Omitted when none is configured.
account.tagsobject (string to string)All kinds. Tags configured on the account in the plugin configuration. Omitted when there are none.
region.namestringAll kinds. AWS region.
resource.idstringAll kinds. Resource ID, the part of the ARN after loadbalancer/ or targetgroup/. A listener keeps its full listener/... part. A target health record is <target group ID>/<target ID>.
resource.arnstringAll kinds. ARN of the resource. A target health record carries the ARN of its target group.
resource.typestringAll kinds. loadbalancer, listener, target-group or target-health.
config.load_balancer_arnstringLoad balancer, listener and target group. ARN of the load balancer. For a target group it is the first load balancer attached, or empty.
config.dns_namestringLoad balancer. DNS name of the load balancer.
config.schemestringLoad balancer. internet-facing or internal.
config.typestringLoad balancer. application, network or gateway.
config.statestringLoad balancer. State code, such as active.
config.availability_zonesarray of stringsLoad balancer. Names of the availability zones.
config.listener_arnstringListener. ARN of the listener.
config.protocolstringListener and target group. Protocol, such as HTTPS or HTTP.
config.portintegerListener and target group. Port.
config.ssl_policystringListener. Name of the TLS security policy. Empty when the listener has none.
config.certificate_arnstringListener. ARN of the first certificate. Empty when there is none.
config.target_group_arnstringTarget group and target health. ARN of the target group.
config.health_check_protocolstringTarget group. Protocol of the health check.
config.health_check_pathstringTarget group. Path of the health check. Empty when it does not apply.
config.healthy_threshold_countintegerTarget group. Consecutive successes before a target is healthy.
config.unhealthy_threshold_countintegerTarget group. Consecutive failures before a target is unhealthy.
config.target_idstringTarget health. ID of the target, such as an instance ID.
config.target_health_statestringTarget health. Health state, such as healthy or unhealthy.
dynamic.cloudtrail_eventsarray of objectsLoad balancer. CloudTrail events for the load balancer within the lookback window, each with event_name, event_time and user_identity_arn (strings). dynamic is an empty object on the other kinds.
tagsobject (string to string)All kinds. ELBv2 tags of the resource. Empty for target health.
collection.collected_atstring (RFC 3339 time)All kinds. When the data was collected.
collection.collector_versionstringAll kinds. Always aws-elbv2.
collection.collection_typestringAll kinds. config_dynamic for a load balancer, config for the others.
collection.lookback_windowobjectLoad balancer. start and end (RFC 3339 times) of the CloudTrail lookback. Omitted on the other kinds.
collection.raw_payload_hashesobject (string to string)All kinds. primary is a SHA-256 hash of the raw AWS payload, as sha256:....
collection.errorsarray of objectsAll kinds. Collection problems for the resource, each with scope and message (strings). Empty when collection was clean.
policy_inputsobjectAll kinds. The policy_inputs object from the plugin configuration, passed through as is. Empty when none is set.

An example input:

{
"loadbalancer": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "app/payments-alb/50dc6c495c0c9188",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"type": "loadbalancer"
},
"config": {
"load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"dns_name": "payments-alb-1234567890.eu-west-1.elb.amazonaws.com",
"scheme": "internet-facing",
"type": "application",
"state": "active",
"availability_zones": [
"eu-west-1a",
"eu-west-1b"
]
},
"dynamic": {
"cloudtrail_events": [
{
"event_name": "ModifyListener",
"event_time": "2026-11-02T10:00:00Z",
"user_identity_arn": "arn:aws:iam::111122223333:role/platform-admin"
}
]
},
"tags": {
"owner": "platform-team"
},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config_dynamic",
"lookback_window": {
"start": "2026-08-12T12:00:00Z",
"end": "2026-11-10T12:00:00Z"
},
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
},
"listener": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2",
"type": "listener"
},
"config": {
"listener_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2",
"load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"protocol": "HTTPS",
"port": 443,
"ssl_policy": "ELBSecurityPolicy-TLS13-1-2-2021-06",
"certificate_arn": "arn:aws:acm:eu-west-1:111122223333:certificate/7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f"
},
"dynamic": {},
"tags": {
"tls": "public"
},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config",
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
},
"target-group": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "payments-tg/73e2d6bc24d8a067",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"type": "target-group"
},
"config": {
"target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"protocol": "HTTP",
"port": 8080,
"health_check_protocol": "HTTP",
"health_check_path": "/healthz",
"healthy_threshold_count": 3,
"unhealthy_threshold_count": 2
},
"dynamic": {},
"tags": {
"service": "payments"
},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config",
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
},
"target-health": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "payments-tg/73e2d6bc24d8a067/i-0abc123def4567890",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"type": "target-health"
},
"config": {
"target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"target_id": "i-0abc123def4567890",
"target_health_state": "healthy"
},
"dynamic": {},
"tags": {},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config",
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
}
}

Subject templates​

The subject templates this plugin registers. Each example is built from sample data.

aws-elbv2-loadbalancer​

A load balancer. Title: ELBv2 load balancer {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.

Identity keyDescription
account_idAWS account ID.
regionAWS region.
resource_idLoad balancer ID.

Example:

{
"name": "aws-elbv2-loadbalancer",
"type": "component",
"title": "ELBv2 load balancer app/payments-alb/50dc6c495c0c9188 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 load balancer app/payments-alb/50dc6c495c0c9188.",
"purpose": "Represents an ELBv2 load balancer evaluated for compliance posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "app/payments-alb/50dc6c495c0c9188"
}
}

aws-elbv2-listener​

A listener on a load balancer. Title: ELBv2 listener {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.

Identity keyDescription
account_idAWS account ID.
regionAWS region.
resource_idListener resource ID.

Example:

{
"name": "aws-elbv2-listener",
"type": "component",
"title": "ELBv2 listener listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 listener listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2.",
"purpose": "Represents an ELBv2 listener evaluated for TLS endpoint posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2"
}
}

aws-elbv2-target-group​

A target group. Title: ELBv2 target group {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.

Identity keyDescription
account_idAWS account ID.
regionAWS region.
resource_idTarget group ID.

Example:

{
"name": "aws-elbv2-target-group",
"type": "component",
"title": "ELBv2 target group payments-tg/73e2d6bc24d8a067 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 target group payments-tg/73e2d6bc24d8a067.",
"purpose": "Represents an ELBv2 target group evaluated for health-check posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "payments-tg/73e2d6bc24d8a067"
}
}

aws-elbv2-target-health​

The health of one target in a target group. Title: ELBv2 target health {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.

Identity keyDescription
account_idAWS account ID.
regionAWS region.
resource_idTarget health ID.

Example:

{
"name": "aws-elbv2-target-health",
"type": "component",
"title": "ELBv2 target health payments-tg/73e2d6bc24d8a067/i-0abc123def4567890 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 target health payments-tg/73e2d6bc24d8a067/i-0abc123def4567890.",
"purpose": "Represents an ELBv2 target health description evaluated for availability posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "payments-tg/73e2d6bc24d8a067/i-0abc123def4567890"
}
}

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.

BundleLatest versionControls coveredCompatible plugin lines
plugin-aws-elb-listener-policiesv0.1.1ctrl-cc6-2-014, ctrl-cc6-2-018, ctrl-cc6-3-004, ctrl-cc6-7-001, ctrl-cc6-7-002, ctrl-cc6-7-004, ctrl-cc6-7-005, ctrl-cc6-7-007, ctrl-cc6-7-008, ctrl-cc6-7-009, ctrl-cc6-7-010, ctrl-cc6-7-011latest
plugin-aws-elb-loadbalancer-policiesv0.1.1ctrl-a1-1-009, ctrl-a1-2-006, ctrl-a1-2-007, ctrl-cc5-2-005, ctrl-cc6-2-015, ctrl-cc6-2-019, ctrl-cc6-3-013, ctrl-cc6-5-001, ctrl-cc6-7-003, ctrl-cc6-7-006, ctrl-cc6-7-017, ctrl-cc6-7-018latest
plugin-aws-elb-targetgroup-policiesv0.1.1ctrl-a1-1-009, ctrl-a1-2-007, ctrl-cc6-7-002, ctrl-cc6-7-005latest
plugin-aws-elb-targethealth-policiesv0.1.1ctrl-a1-1-009, ctrl-a1-2-007latest