webinject Login authenticate is not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Amit_Alone
Posts: 89
Joined: Fri May 08, 2020 11:47 am

Re: webinject Login authenticate is not working

Post by Amit_Alone »

Hi,

I received confirmation from the client stating that Post method is already enable for the shared URL.

Attaching the screen shot provided me confirming this.

Thanks,
Amit
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: webinject Login authenticate is not working

Post by ssax »

Change your testdata to this:

Code: Select all

<testcases repeat="1">

<case
    id="1"
    description1="Connecting to Appication"
    url="https://10.173.8.69/ngetpaid?solutionInstanceGuid=gptest"
    verifypositive="200"
    errormessage="Unable to connect to the login page of Application"
    logrequest="yes"
    logresponse="yes"
/>

<case
    id="2"
    description1="Authentication on Application"
    method="post"
    url="https://10.173.8.69/ngetpaid/#/login"
    postbody="user=MonitorUser&password=***************"
    verfypositive="MonitorUser"
    verifynegative="User unknown"
    errormessage="Unable to authenticate MonitorUser in Application"
    logrequest="yes"
    logresponse="yes"
/>

</testcases>
Then run the check and send us these files after:

Code: Select all

/usr/local/nagiosxi/etc/components/webinject/http.log
/usr/local/nagiosxi/etc/components/webinject/results.html
Amit_Alone
Posts: 89
Joined: Fri May 08, 2020 11:47 am

Re: webinject Login authenticate is not working

Post by Amit_Alone »

As suggested I have updated the shared test data and then run the check cmd below is the o/p.

Code: Select all

[e5613751@avgdlnxvp127 webinject]$ /usr/local/nagios/libexec/check_webinject.sh GASPCRLWINVT314__Web_Transaction_config.xml -v
WebInject CRITICAL - Unable to authenticate MonitorUser in Application

Test: GASPCRLWINVT314__Web_Transaction_testdata.xml - 1
Desc: Connecting to Appication
GET Request: https://10.173.8.69/ngetpaid?solutionInstanceGuid=gptest
Passed HTTP Response Code Verification (not in error range)
Verify: '200'
Passed Positive Verification
TEST CASE PASSED
Response Time = 0.545 sec
-------------------------------------------------------
Test: GASPCRLWINVT314__Web_Transaction_testdata.xml - 2
Desc: Authentication on Application
POST Request: https://10.173.8.69/ngetpaid/#/login
Failed HTTP Response Code Verification (HTTP/1.1 405 Method Not Allowed)
Verify Negative: 'User unknown'
Passed Negative Verification
TEST CASE FAILED : Unable to authenticate MonitorUser in Application
Response Time = 0.09 sec
-------------------------------------------------------

Test Cases Run: 2
Test Cases Passed: 1
Test Cases Failed: 1
Verifications Passed: 3
Verifications Failed: 1
|time=0.68s;0;30;0;0 case1=0.545s;0;0;0;0 case2=0.09s;0;0;0;0
[e5613751@avgdlnxvp127 webinject]$
Attaching the files that are requested after running the check.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: webinject Login authenticate is not working

Post by ssax »

Please PM me the full output of this command:

Code: Select all

curl -k -L -vvv 'https://10.173.8.69/ngetpaid/#/login'
Amit_Alone
Posts: 89
Joined: Fri May 08, 2020 11:47 am

Re: webinject Login authenticate is not working

Post by Amit_Alone »

I had PM the full o/p of the shared cmd.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: webinject Login authenticate is not working

Post by ssax »

Replied via PM, please check and update the user/pass in it.
Amit_Alone
Posts: 89
Joined: Fri May 08, 2020 11:47 am

Re: webinject Login authenticate is not working

Post by Amit_Alone »

Shared details through PM, still cases got failed.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: webinject Login authenticate is not working

Post by ssax »

Replied via PM, I'm not sure if this is going to work for this though as webinject doesn't support javascript and that's what your application needs to load in order to function:
Will client-side scripts embedded in the web responses be executed?

No. Any scripts embedded within the responses are ignored. Your javascript/vbscript/etc will not be executed.
Taken from here:

http://www.webinject.org/faq.html
Locked