ves-io-schema-waf-API-Create
On This Page:
Examples of creating waf
Usecase:
Create waf-1
Request using vesctl:
vesctl configuration create waf -i waf.yaml
where file waf.yaml has following contents (waf.CreateRequest):
metadata:
name: waf-1
namespace: documentation
spec:
appProfile:
cms:
- DOKUWIKI
- DRUPAL
- WORDPRESS
- NEXTCLOUD
- CPANEL
language:
- PHP
- JAVA
webserver:
- IIS
disabledDetectionTags:
detectionTagType:
- DATA_LEAKAGE
- SQLI_ATTACK
- XSS_ATTACK
- PROTOCOL_ATTACK
- RCE_ATTACK
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: waf-1
namespace: documentation
spec:
appProfile:
cms:
- DOKUWIKI
- DRUPAL
- WORDPRESS
- NEXTCLOUD
- CPANEL
language:
- PHP
- JAVA
webserver:
- IIS
disabledDetectionTags:
detectionTagType:
- DATA_LEAKAGE
- SQLI_ATTACK
- XSS_ATTACK
- PROTOCOL_ATTACK
- RCE_ATTACK
systemMetadata:
creationTimestamp: "2021-03-31T08:30:51.030691400Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 045604b2-293a-4a26-b328-f316ea7aed9d
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"waf-1","namespace":"documentation"},"spec":{"appProfile":{"language":["PHP","JAVA"],"cms":["DOKUWIKI","DRUPAL","WORDPRESS","NEXTCLOUD","CPANEL"],"webserver":["IIS"]},"disabledDetectionTags":{"detectionTagType":["DATA_LEAKAGE","SQLI_ATTACK","XSS_ATTACK","PROTOCOL_ATTACK","RCE_ATTACK"]}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build318584715_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/wafs'
curl response:
HTTP/1.1 200 OK
Content-Length: 1055
Content-Type: application/json
Date: Wed, 31 Mar 2021 08:30:51 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "waf-1",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "045604b2-293a-4a26-b328-f316ea7aed9d",
"creation_timestamp": "2021-03-31T08:30:51.030691400Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"spec": {
"app_profile": {
"language": [
"PHP",
"JAVA"
],
"cms": [
"DOKUWIKI",
"DRUPAL",
"WORDPRESS",
"NEXTCLOUD",
"CPANEL"
],
"webserver": [
"IIS"
]
},
"mode": "BLOCK",
"disabled_detection_tags": {
"detection_tag_type": [
"DATA_LEAKAGE",
"SQLI_ATTACK",
"XSS_ATTACK",
"PROTOCOL_ATTACK",
"RCE_ATTACK"
]
}
}
}