Client-side protection configuration

akamai_appsec_clientside_protection_configuration

Get a security policy's Client-side Protection & Compliance (CPC) configuration to get information about your current edge injection settings, edge test parameters, and injection criteria.

data "akamai_appsec_clientside_protection_configuration" "my_cpc_config" {
  config_id          = 12345
  security_policy_id = "abcd_123456"
}

output "my_cpc_config" {
  value = data.akamai_appsec_clientside_protection_configuration.my_cpc_config
}
my_cpc_config = {
  config_id          = 12345
  security_policy_id = "abcd_123456"
  edge_injection = {
    load_script_async = true
  }
  edge_test_parameters = {
    disable_injection_key   = "cpc-disable"
    disable_injection_value = "true"
    force_injection_key     = "cpc-force"
    force_injection_value   = "true"
  }
  injection_criteria = {
    injection_path_includes = "/shop/*"
    injection_path_excludes = "/shop/static/*"
    injection_percent       = 100
    injection_policy        = "head"
    script_tag_attributes   = []
  }
}

Arguments

ArgumentRequiredDescription
config_id✔️A security configuration ID.
security_policy_id✔️A security policy ID.

Attributes

AttributeDescription
edge_injectionControls how the CPC script is loaded by the edge. Contains:
  • load_script_async. Boolean. When true, the CPC protection script loads asynchronously.
edge_test_parametersQuery string parameters used to override script injection behavior during testing. Contains:
  • disable_injection_key. A key to disable script injection for a specific request.
  • disable_injection_value. The value of the disable_injection_key.
  • force_injection_key. A key to force script injection for a specific request.
  • force_injection_value. The value of the force_injection_key.
injection_criteriaControls which requests receive the injected script and how the script tag is placed. Contains:
  • injection_percent. Integer (0–100). Percentage of eligible requests that receive the injected script.
  • injection_path_includes. Glob-style path pattern for paths eligible for injection.
  • injection_path_excludes. Glob-style path pattern for paths excluded from injection.
  • injection_policy. Controls where in the HTML page the script tag is inserted.
  • script_tag_attributes. A list of custom HTML attributes added to the injected <script> tag.

Did this page help you?