ves-io-schema-malicious_user_mitigation-API-Replace

Examples of replacing malicioususermitigation

Usecase:

Use replace to update malicious-user-mitigation to add ANOMALYSERVICEPER_SITE

Request using vesctl:

vesctl configuration replace malicious_user_mitigation -i malicious_user_mitigation.yaml

where file malicioususermitigation.yaml has following contents (malicioususermitigation.ReplaceRequest):

metadata:
  name: malicious-user-mitigation
  namespace: documentation
spec:
  javascriptChallengeSettings:
    cookieExpiry: 10
    jsScriptDelay: 3000
  mitigationType:
    rules:
    - mitigationAction:
        javascriptChallenge: null
      threatLevel:
        low: null

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"malicious-user-mitigation","namespace":"documentation"},"spec":{"mitigationType":{"rules":[{"threatLevel":{"low":null},"mitigationAction":{"javascriptChallenge":null}}]},"javascriptChallengeSettings":{"jsScriptDelay":3000,"cookieExpiry":10}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build185306297_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/malicious_user_mitigations/malicious-user-mitigation'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Mon, 19 Oct 2020 09:48:42 GMT
Vary: Accept-Encoding

{

}