HTTPS Test

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Harland Adelaars
Posts: 12
Joined: Thu Dec 28, 2006 9:48 am

HTTPS Test

Post by Harland Adelaars »

Hi,

Last question for today, thanks for helping setting up every test with HM.

Question, i have a website running on HTTPS, that use a form login, i want to check the status, for errors. But when i setup an HTTP test i don't get any value back.

I used https://xxx.xxxxx.xx
with Check Contents : Error

Authorization :
Username & Password

How can i setup this check?

Regards,
Harland
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

If you want to check that requires login thru login form, you may use:
- use URL string to send parameters if your web form and script uses GET method (http://www.ks-soft.net/hostmon.eng/mfra ... ts.htm#url)
- use HTTP test method and "Post data" option if your web form uses POST method (http://www.ks-soft.net/hostmon.eng/mfra ... s.htm#http)

However, in URL field of URL or HTTP test you should specify NOT login page url, but url of page, where login page leads you after submit. You should in your browser invoke view source for login page, and find tag <Form>. "Action" attribute of tag <Form> provides url page we are looking for. So, in URL field of appropriate test you shoud provide this url. Understand? Lets continue.
You should find all tags <input> and concatenate attribute name of each one into one string, i.e.: username=your_username&password=your_password etc. Where your_username/your_password means your really credentials.
Such string you should provide in "Post data" field of HTTP test, or concatenate with URL field using '?' if you will use URL test (e.g. http://www.somesite.com/check_credentia ... sword=test). Do not forget mark "Follow redirect" option.

Please read the following topics, which are related to the similar problem:
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=2870
http://www.ks-soft.net/cgi-bin/phpBB/vi ... 74&start=0

Regards,
Max
Harland Adelaars
Posts: 12
Joined: Thu Dec 28, 2006 9:48 am

Post by Harland Adelaars »

Hi,

I tried to do the POST request, with form username & password

The url i used was /brightmail/Login.do

But i get a BAD, 400, Bad Request when i test the configuratie.

The website is running on TomCat somethingm it's a website for managing antispam servers (control panel).

Please Help, Regards,
Harland

--------HTML------------------------------------------------------------------


<head>
<title>Symantec Brightmail AntiSpam -Login</title>


<meta http-equiv="refresh" content="2100">

<base href="https://bcc.ispweb.nl:443/brightmail/"/>
<link href="styles/bmimc.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="scripts/common.js"></script>
<script type="text/javascript" src="scripts/validation.js"></script>
<script type="text/javascript">
/* Displays the "About" window */
function showAbout()
{
window.open('/brightmail/about.jsp','AboutPage','scrollbars=no,toolbar=no,resizable=no,width=730,height=565');
}

/* Displays the help window */
function showHelp()
{
window.open('/brightmail/showHelp.do','Template','scrollbars=no,toolbar=yes,width=734,height=617,resizable=no');
}

function showLoginHelp()
{
window.open('/brightmail/showLoginHelp.do','Template','scrollbars=no,toolbar=yes,width=734,height=617,resizable=no');
}
</script>


<script type="text/javascript" language="javascript">

var helpPage = "default_login_help.jsp";
var helpNav = "";
var helpNavAnchor = "";

<!--
var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=navigator.appName=='Netscape'&&!isDOM?1:0;
var isIE4=isIE&&!isDOM?1:0;
var isOp=window.opera?1:0;
var isDyn=isDOM||isIE||isNS4;
var isWin=navigator.platform.indexOf('Win')!=-1?1:0;
var version=navigator.appVersion
var isIE5_0=version.indexOf("MSIE 5.0")>-1?1:0;

// Detect unsupported browsers and redirect appropriately
if(isNS4)
{
window.location.replace('navigator4.jsp');
}
if(isIE5_0)
{
window.location.replace('ie50.jsp');
}

var missingUsernameMessage = "Please enter a user name.";
var missingPasswordMessage = "Please enter a password.";

function validate()
{
if (document.logonForm.username.value == "")
{
alert(missingUsernameMessage);
document.logonForm.username.focus();
return false;
}

if (document.logonForm.password.value == "")
{
alert(missingPasswordMessage);
document.logonForm.password.focus();
return false;
}
return true;
}

window.onload = function()
{
document.logonForm.username.focus();
}
//-->

</script>

</head>

<body>
<table align="center" width="732" border="0" cellpadding="0" cellspacing="0" class="pageBorder">
<tr><td>
<div style="background-image:url(images/Header_NoTab_Spacer.gif); "><nobr><img src="images/Header_NoTab_BMLogo.gif" alt=""/></nobr></div>
</td></tr>
<tr><td></td></tr>
<tr><td height="426" valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form name="logonForm" action="login.do" onsubmit="return validate()" method="post">
<input type="hidden" name="path" value="">
<input type="hidden" name="compositeId" value="">
<tr>
<td colspan="1" nowrap="nowrap" style="padding-bottom:30px;padding-top:25px;" align="center"><img
src="images/Logo_BM_Watermark.gif" height="90" alt=""/></td>
</tr>
<tr>
<td valign="middle">
<table align="center" width="732" border="0" cellpadding="0" cellspacing="0" class="defaultText">
<tr align="center">
<td colspan="6">









</td>
</tr>

<tr>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
<td><img src="images/Dialogue_CornerTL.gif" width="25" height="22" alt=""></img></td>
<td height="22" class="defaultHeading1" colspan="2">User Login</td>
<td><img src="images/Dialogue_CornerTR.gif" width="25" height="22" alt=""></img></td>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="200" height="16" alt=""/></td>
<td class="dialogueLeft"></td>
<td colspan="2"></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="200" height="16" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
<td class="dialogueLeft"></td>
<td>Login as: </td>
<td align="right"><input type="text" id="username" name="username" size="38" MAXLENGTH="255" style=" width:211px; height:19px;border:1px; border-style:solid; border-color:#7F9DB9;font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;font-size:11px;padding-left:2px;padding-top:2px;padding-bottom:2px;"/></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="200" height="6" alt=""/></td>
<td class="dialogueLeft"></td>
<td colspan="2"><img src="images/Spacer.gif" height="6" alt=""/></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="200" height="6" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
<td class="dialogueLeft"></td>
<td>Password:</td>
<td align="right"><input type="password" id="password" name="password" size="38" MAXLENGTH="50" style=" width:211px; height:19px;border:1px; border-style:solid; border-color:#7F9DB9;font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;font-size:11px;padding-left:2px;padding-top:2px;padding-bottom:2px;"/></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
</tr>

<tr>
<td><img src="images/Spacer.gif" width="198" height="15" alt=""/></td>
<td class="dialogueLeft"></td>
<td></td>
<td></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="198" height="15" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="198" height="1" alt=""/></td>
<td class="dialogueLeft"></td>
<td style=" background-color:#8F9BBB;" colspan="2" align="center"></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="198" height="1" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="198" height="16" alt=""/></td>
<td class="dialogueLeft"></td>
<td style="padding-top:10px;" colspan="2" align="center"><a href="javascript:showLoginHelp()"
class="defaultLink">Need help logging in?</a></td>
<td class="dialogueRight"></td>
<td><img src="images/Spacer.gif" width="198" height="16" alt=""/></td>
</tr>
<tr>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
<td><img src="images/Dialogue_CornerBL.gif" width="25" height="30" alt=""></img></td>
<td colspan="2"><img src="images/Dialogue_Bottom.gif" width="100%" height="30" alt=""></img></td>
<td><img src="images/Dialogue_CornerBR.gif" width="25" height="30" alt=""></img></td>
<td><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
</tr>
<tr>
<td colspan="2"><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
<td colspan="2" align="right"><input name="loginButton" type="image" id="buttonLogin"
src="images/Button_Login_60w.gif" alt=""
onMouseDown="changeButtonState('buttonLogin', '_Press')"
onMouseOver="changeButtonState('buttonLogin', '')"
onMouseUp="changeButtonState('buttonLogin', '')"
onMouseOut="changeButtonState('buttonLogin', '')"></td>
<td colspan="2"><img src="images/Spacer.gif" width="200" height="22" alt=""/></td>
</tr>
<tr>
<td colspan="6" height="15"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="headerSpacer" colspan="6" align="center" height="18" width="732"></td>
</tr>
<tr>
<td style="background-color:#023669;" height="71"></td>
</tr>
</form>
</table>

</td></tr>
<tr><td>

<table width="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" align="center">
<tr>
<td width="100%" height="17" style="background-image:url(images/FooterSpacer.gif); padding-left:5px;"
class="footerText" nowrap ><a HREF="javascript:showAbout()"
class="footerText">Copyright © 1998-2005 Symantec Corporation. All rights reserved.</a>
</td>
</tr>
</table>
</td></tr>
</table>
</body>
</html>
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

So, I suppose, ypur configuration should be like:
URL: http://bcc.ispweb.nl:443/brightmail/login.do
Request : POST
Post Data :
path=path_value&compositeId=composed_value&username=user_name&password=user_password&loginButton=yes

Do not forget enable "Folow redirect" option. It is important.

Instead of path_value, composed_value, user_name and user_password in foregoing string, you should specify real values.

I think, it should work.

You may also try the URL test, with the URL like: https://bcc.ispweb.nl/brightmail/login. ... Button=yes

It might help.

Please, also enable "Accept SSL/PCT certificates with invalid host name" and "Accept SSL/PCT certificates with invalid dates" options in Options > Miscellaneous > Settings for URL test tab.

If it does not help, you should check your web server log files, to figure out what is going on.

Regards,
Max
Harland Adelaars
Posts: 12
Joined: Thu Dec 28, 2006 9:48 am

Post by Harland Adelaars »

If i try :
https://bcc.ispweb.nl/brightmail/login. ... ssword=xxx
It works without problems in my webbrowser.

If i configure HM
URL : https://bcc.ispweb.nl/brightmail/login.do
Request : POST
Post data : username=xxx&password=xxx

Follow Redirect : checked

It doesn't work,

I checked the SSL with invalid hostname and invalid dates, under options

I get the response back :
Test status: BAD
Error code: 400
Error msg: Bad Request

Regards,
Harland
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sure, it does not work. HTTP test was designed for HTTP protocol, it does not support HTTPS.
URL test method support HTTPS protocol, it uses GET requests.

Regards
Alex
Last edited by KS-Soft on Fri Dec 29, 2006 1:50 pm, edited 1 time in total.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Harland Adelaars wrote:If i try :
https://bcc.ispweb.nl/brightmail/login. ... ssword=xxx
It works without problems in my webbrowser.
Then you may use URL test method with URL like: https://bcc.ispweb.nl/brightmail/login. ... ssword=xxx

http://www.ks-soft.net/hostmon.eng/mfra ... ts.htm#url

Regards,
Max
Harland Adelaars
Posts: 12
Joined: Thu Dec 28, 2006 9:48 am

Post by Harland Adelaars »

Yep with the URL it's working....

Thanks for the help...

Regards,
Harland
msv
Posts: 11
Joined: Tue Jan 15, 2008 7:18 am

Post by msv »

We are trying to test our Outlook Web Access site using the HTTPS test.

Headers
HTTP/1.1 401 Unauthorized
Content-Length: 83
Content-Type: text/html
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="xxxxx.co.uk"
X-Powered-By: ASP.NET

We are happy to get a "not authorized" response as this indicates the site is OK, but how do you get it to test this?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Bad means there is some response from web server.
I think you may use Optional status processing
http://www.ks-soft.net/hostmon.eng/mfra ... processing
E.g. you may use "Use Normal status" option and expression like ('%SuggestedStatus%'=='Bad')

If you update to version 7.22 (will be available soon), you will be able to use more precise expression: ('%SuggestedStatus%'=='Bad') and (%HttpCode%==401)

Regards
Alex
msv
Posts: 11
Joined: Tue Jan 15, 2008 7:18 am

Post by msv »

Thanks, that works nicely.
Post Reply