rest-api-fuzz-testing icon indicating copy to clipboard operation
rest-api-fuzz-testing copied to clipboard

Certificates import

Open LYDE1234 opened this issue 3 years ago • 2 comments

Could you give an example of how to use the Certificates option in targetConfiguration? Ideally a sample since I cant find any documentation, issue, or sample that shows how to use certificates import.

LYDE1234 avatar Jun 22 '21 05:06 LYDE1234

@LYDE1234

Do you need this for running with Dredd ? As discussed in the bug #195 that you opened. Dredd does not support self-signed certificates yet. Would disabling certificate validation would work better for you ?

If you want to use it with RESTler - then that will work.

You need a to mount a your folder with certificates, and the pass that mount path in certificates configuration property.

{
  "rootFileshare": "<fileShareName>",
  "namePrefix": "<fileShareName>-fuzz-",

  "readOnlyFileShareMounts": [
    {
      "FileShareName": "swagger-files",
      "MountPath": "/swagger-files"
    },
    {
      "FileShareName" : "certificates",
      "MountPath" : "/my-certs"
    }
  ],

  "testTasks" : {
    "targetConfiguration" : {
      "endpoint": "<EndPoint>",
      "certificates" : ["/my-certs"]
    },

    "tasks": [
      {
        "toolName": "RESTler",
        "outputFolder": "RESTler-fuzz-0",
        "toolConfiguration": {
          "task": "TestFuzzLean",
          "runConfiguration": {
            "inputFolderPath": "/job-compile/<compile.jobID>/RESTler-compile",
            "useSsl": true
          }
        }
      }
     ]
}

stishkin avatar Jun 22 '21 15:06 stishkin

We need this for RESTler and your example helps; I'd still like a sample but this is fine for now. Thanks.

LYDE1234 avatar Jun 24 '21 08:06 LYDE1234