Browse Source

Changes to Terraform files and added AppSec files

main
kusum 1 year ago
parent
commit
eb5be1702b

+ 9
- 0
appsec-cli-lab/sec_config.json View File

{
"contractId": "W-KXID8R",
"description": "AppSec CLI Lab",
"groupId": "240742",
"hostnames": [
"<User ID>clilab.akaudevops.com"
],
"name": "<User ID>-clilab"
}

+ 47
- 0
appsec-cli-lab/sec_customrule.json View File

{
"operation": "AND",
"structured": true,
"conditions": [
{
"positiveMatch": true,
"type": "requestMethodMatch",
"value": [
"GET"
]
},
{
"positiveMatch": true,
"type": "requestHeaderMatch",
"name": [
"BlockMe",
"blockme",
"Blockme",
"blockMe"
],
"nameWildcard": true,
"value": [
"1",
"yes",
"true"
],
"valueCase": false,
"valueWildcard": true
},
{
"positiveMatch": true,
"type": "pathMatch",
"value": [
"/*"
],
"valueCase": false,
"valueWildcard": true,
"valueIgnoreSegment": true,
"valueNormalize": true
}
],
"description": "Custom rule for AppSec CLI Lab",
"name": "Blockme header custom rule",
"tag": [
"CLI"
]
}

+ 4
- 0
appsec-cli-lab/sec_policy.json View File

{
"policyName": "<User ID>JuiceShop",
"policyPrefix": "0001"
}

+ 0
- 1
appsec-cli-lab/test.txt View File

hello world

+ 10
- 4
terraform/ion.tf View File

type = "string" type = "string"
} }
variables { variables {
name = "cpcode"
value = "${var.cpcode}"
name = "cpcodeId"
value = "${var.cpcodeId}"
type = "number" type = "number"
} }
variables {
name = "cpcodeName"
value = "${var.cpcodeName}"
type = "string"
}
} }


resource "akamai_property" "ion_premier" { resource "akamai_property" "ion_premier" {
contract_id = "ctr_${var.contract_id}" contract_id = "ctr_${var.contract_id}"
group_id = "grp_${var.group_id}" group_id = "grp_${var.group_id}"
hostnames { hostnames {
cname_from = "${var.prefix}${var.hostname}"
cname_from = "${var.prefix}${var.program}.${var.hostname}"
cname_to = var.edge_hostname cname_to = var.edge_hostname
cert_provisioning_type = "CPS_MANAGED" cert_provisioning_type = "CPS_MANAGED"
} }
property_id = "${akamai_property.ion_premier.id}" property_id = "${akamai_property.ion_premier.id}"
version = "${akamai_property.ion_premier.latest_version}" version = "${akamai_property.ion_premier.latest_version}"
network = "${var.network}" network = "${var.network}"
contact = ["${var.prefix}@akamai.com"]
contact = ["${var.email}"]
note = "Automatic deployment for ${var.program} Lab" note = "Automatic deployment for ${var.program} Lab"
auto_acknowledge_rule_warnings = true
} }

+ 2
- 2
terraform/property-snippets/augment_insights.json View File

"name": "cpCode", "name": "cpCode",
"options": { "options": {
"value": { "value": {
"id": "${env.cpcode}",
"name": "devOps-lab"
"id": "${env.cpcodeId}",
"name": "${env.cpcodeName}"
} }
} }
} }

+ 9
- 1
terraform/vars.tf View File

variable "origin" { variable "origin" {
type = string type = string
} }
variable "cpcode" {
variable "cpcodeId" {
type = number type = number
} }

variable "cpcodeName" {
type = string
}

variable "secure" { variable "secure" {
type = bool type = bool
} }
variable "program" { variable "program" {
type = string type = string
} }
variable "email" {
type = string
}

Loading…
Cancel
Save