kind: ConfigMap
apiVersion: v1
metadata:
  name: f5-as3-declaration-juiceshop
  namespace: default
  labels:
    f5type: virtual-server
    as3: "true"
data:
  template: |
    {
        "class": "AS3",
        "declaration": {
            "class": "ADC",
            "schemaVersion": "3.13.0",
            "id": "urn:uuid:33045210-3ab8-4636-9b2a-c98d22ab9176d",
            "label": "End to end SSL with WAF",
            "remark": "A1-5 example",
            "AS3": {
                "class": "Tenant",
                "owasp-juiceshop": {
                    "class": "Application",
                    "template": "https",
                    "serviceMain": {
                        "class": "Service_HTTPS",
                        "virtualAddresses": [
                            "-external-virtual-address-"
                        ],
                        "pool": "juiceshop_pool",
                        "securityLogProfiles": [
                            {
                                "bigip": "/Common/Log all requests"
                            }
                        ],
                        "policyWAF": {
                            "use": "OWASPAutoTune"
                        },
                        "serverTLS": "frontside"
                    },
                    "juiceshop_pool": {
                        "class": "Pool",
                        "monitors": [
                            "http"
                        ],
                        "members": [
                            {
                                "servicePort": -juiceshop-service-port-,
                                "serverAddresses": []
                            }
                        ]
                    },
                    "OWASPAutoTune": {
                        "class": "WAF_Policy",
                        "url": "https://raw.githubusercontent.com/mdditt2000/f5-as3-declarations/master/waf-policy/Common_WAF_Policy.xml",
                        "ignoreChanges": true
                    },
                    "frontside": {
                        "class": "TLS_Server",
                        "certificates": [
                            {
                                "certificate": "certificateDefault"
                            }
                        ]
                    },
                    "backside": {
                        "class": "TLS_Client"
                    },
                    "certificateDefault": {
                        "class": "Certificate",
                        "certificate": {
                            "bigip": "/Common/default.crt"
                        },
                        "privateKey": {
                            "bigip": "/Common/default.key"
                        }
                    }
                }
            }
        }
    }
