Hi Simon,
Below is my requirement:
a) From the openapi Spec I wanted to do CRUD Operation like POST, PUT, PATCH, GET,DELETE on multiple API Endpoint using ZAP with Correct Payload
b) Run a) with Bad Payload(Attacks, Incorrect Keys etc)
To achieve this I tried following:
a) Imported API Spec which imported all the above CRUD operations with payload in different order like PUT -> DELETE -> PATCH -> POST -> GET
b) I change all the operation with correct payload and ran
c) Since order was incorrect CRUD operations were failing. Ideally the CRUD Operation order should be POST -> PUT -> PATCH -> GET -> DELETE make the crud
d) I realized from above thread we cannot change the order of Operation in ZAP via UI directly, other option recommended was to capture all the CRUD operation via HAR file from Browser.
e) I created the HAR file with all the operation in sequence with Cookies and Login Captured and imported in ZAP
f) I imported the HAR file and replayed, it resulted in Authorization Failure because for every operation we do, we wanted cookie to be sent what is received from Server and along with we add another header X-Csrftoken this needs to be filled with csrftoken what we obtain in Cookie, which ZAP is failing to honor that is expected but how to make ZAP add the value to X-Csrftoken header and send in POST/PUT/PATCH Request
My Question is how to achieve point f) during ZAP CRUD operation replay of HAR file.
Thanks
Srikanth