Script Based Authentication - Integration in Jenkins - Help Needed

74 views
Skip to first unread message

Tamil

unread,
Nov 17, 2017, 5:27:18 AM11/17/17
to OWASP ZAP User Group
Am trying to integrate Script Based Authentication in Jenkins, Following is the setting what I have made in Jenkins



This is the basic script what I have used for (since I was facing "Does not follow Authentication script interface" issue, so I thought of checking for basic script developed based on default template.js template provided in ZAP)
Even using this script am facing the same issue "Does not follow Authentication script interface".



23:28:37 134331 [ZAP-ProxyThread-44] INFO org.zaproxy.zap.
authentication.ScriptBasedAuthenticationMethodType  - Loaded script for API:DefaultScript.js
23:28:37 134331 [ZAP-ProxyThread-44] ERROR org.zaproxy.zap.authentication.ScriptBasedAuthenticationMethodType  - Unable to load Script Based Authentication method. The script DefaultScript.js does not properly implement the Authentication Script interface.
23:28:37 134331 [ZAP-ProxyThread-44] WARN org.zaproxy.zap.extension.api.API  - ApiException while handling API request:
23:28:37 An error has occurred when loading the provided script (bad_script_format) : Does not follow Authentication script interface
23:28:37  at org.zaproxy.zap.authentication.ScriptBasedAuthenticationMethodType$1.handleAction(Unknown Source)
23:28:37  at org.zaproxy.zap.extension.authentication.AuthenticationAPI.handleApiAction(Unknown Source)
23:28:37  at org.zaproxy.zap.extension.api.API.handleApiRequest(Unknown Source)
23:28:37  at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(Unknown Source)
23:28:37  at org.parosproxy.paros.core.proxy.ProxyThread.run(Unknown Source)
23:28:37  at java.lang.Thread.run(Thread.java:748)
23:28:37 ERROR: org.zaproxy.clientapi.core.ClientApiException: An error has occurred when loading the provided script
23:28:37  at org.zaproxy.clientapi.core.ApiResponseFactory.getResponse(ApiResponseFactory.java:32)
23:28:37  at org.zaproxy.clientapi.core.ClientApi.callApi(ClientApi.java:312)
23:28:37  at org.zaproxy.clientapi.gen.Authentication.setAuthenticationMethod(Authentication.java:78)
23:28:37  at org.jenkinsci.plugins.zap.ZAPDriver.setUpScriptBasedAuth(ZAPDriver.java:1526)
23:28:37  at org.jenkinsci.plugins.zap.ZAPDriver.setUpAuthentication(ZAPDriver.java:1715)
23:28:37  at org.jenkinsci.plugins.zap.ZAPDriver.executeZAP(ZAPDriver.java:1184)
23:28:37  at org.jenkinsci.plugins.zap.ZAPBuilder$ZAPDriverCallable.invoke(ZAPBuilder.java:448)
23:28:37  at org.jenkinsci.plugins.zap.ZAPBuilder$ZAPDriverCallable.invoke(ZAPBuilder.java:436)
23:28:37  at hudson.FilePath.act(FilePath.java:998)
23:28:37  at hudson.FilePath.act(FilePath.java:976)
23:28:37  at org.jenkinsci.plugins.zap.ZAPBuilder.perform(ZAPBuilder.java:292)
23:28:37  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
23:28:37  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)

thc...@gmail.com

unread,
Nov 17, 2017, 5:57:06 AM11/17/17
to zaprox...@googlegroups.com
Hi.

For the record, this is being handled in:
https://groups.google.com/d/topic/zaproxy-jenkins/51vAizP0BQg/discussion

Best regards.

On 17/11/17 10:27, Tamil wrote:
> Am trying to integrate Script Based Authentication in Jenkins, Following is
> the setting what I have made in Jenkins
>
>
>
> This is the basic script what I have used for (since I was facing "Does not
> follow Authentication script interface" issue, so I thought of checking for
> basic script developed based on default template.js template provided in
> ZAP)
> Even using this script am facing the same issue "Does not follow
> Authentication script interface".
>
>
>
Reply all
Reply to author
Forward
0 new messages