Hello,
my "multi redirect Oauth2 Auth script" is now working in ZAP UI !!
I have to integrate that on a GitLab CI now so, I've exported my context, added the authentication script and launched a docker image with command script :
zap-baseline.py -t
https://mytarget -I -n target.context -m 10 -T 60 -U test r ./report.html --hook=hook.py \
-z "-config
script.scripts.name=auth_peconnect -config script.scripts.engine='Oracle Nashorn' -config script.scripts.enabled=false -config script.scripts.type=authentication -config script.scripts.file=/zap/wrk/scripts/authentication/peam.js"
the context is loaded and the script is founded. The hook file is just to list "zap.spider.all_urls" to be sure what is crawled by the spider.
So the spider is returning no error, my target script is crawled but the authentication script is not executed.
Do you know if there is a "config" parameter to implement the equivalent of the UI padlock "forced user mode" option ?
do you have another idea to help me find why my authentication script is not executed?
(to validate everything's ok, i use the ZAP UI with a new session, I load the context, lock the option "forced user mode" and launch a spider from the top of target... the script is launched and the authentication is validated.)
thanks a lot,
Dave