[Webtest] Oracle SSO

Colin O'Brien webtest@lists.canoo.com
Fri, 7 Jul 2006 11:40:21 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_03D8_01C6A1BA.20AC2760
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Melvin,
 
I had a similar issue regarding SSO and authentication, the problem I
had was overcome by doing the following
 
<!-- Harvest the SSO Cookie -->
<storeCookie
    description="Store JSESSIONIDSSO cookie value"  
    name="JSESSIONIDSSO" 
    property="sessidSSO"
/>
<!-- Invoke the target page directly, pass the SSO cookie value with the
request -->
<invoke
    description="Go to start add KPI page"
 
url="http://${gen_host}:${gen_port}/revenueoffice/secure/KPIs/StartCreat
eKPI.do?JSESSIONIDSSO=#{sessidSSO}"
/>
 
A good tool to view the http traffic between server and client is
Fiddler (http://www.fiddlertool.com/Fiddler/) you will be able to see
all the redirections and cookie value assignments as the user logs in.
 
Hope this helps a bit.
 
Regards,
Colin.
 
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of MELVIN CHEE
Sent: 07 July 2006 10:30
To: webtest@lists.canoo.com
Subject: [Webtest] Oracle SSO
 

Hi gurus,

I intend to test my j2ee application with Webtest. The 
application is deployed on a Oracle 10g Application Server. 
 
All users need to login via Oracle Single-Sign On. I hit a brick
wall when I discovered that Oracle Single-Sign uses several
redirections and cookie injections to authenticate users.
I have found a article describing how to "follow" the redirections
using httpunit. 

See http://www.fm-berger.de/ora_webtest/ch06.php
 
As you can see Oracle uses a lot of page redirects as well as 
cookies to handle SSO. However, I am not sure how the same
can be done with Webtest.
My webtest script keep returning with a 401 error when i reference
the first page of my application. In a typical user scenario,
the browser will be redirected to the Oracle SSO Login page first.
I suspect that Webtest stalled at the login page.
 
The Webtest script always stall when it is trying to establish the
connection to the deployed application (the waitfor tag).
I am never able to reach the first webtest case.
 
Any ideas guys?
 
  
  _____  

Now you can scan
<http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/reading_pane/
*http:/us.rd.yahoo.com/evt=40565/*http:/uk.docs.yahoo.com/nowyoucan.html
>  emails quickly with a reading pane. Get the new Yahoo!
<http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/reading_pane/
*http:/us.rd.yahoo.com/evt=40565/*http:/uk.docs.yahoo.com/nowyoucan.html
>  Mail. 



------=_NextPart_000_03D8_01C6A1BA.20AC2760
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C6A1BA.207A1AE0">
<link rel=3DEdit-Time-Data href=3D"cid:editdata.mso@01C6A1BA.207A1AE0">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
p
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
span.EmailStyle18
	{mso-style-type:personal-reply;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:navy;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dblue style=3D'tab-interval:36.0pt'>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Hi Melvin,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I had a similar issue regarding SSO and
authentication, the problem I had was overcome by doing the following<o:p><=
/o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dnavy face=
=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>&lt;!--</span></fon=
t></span><font
size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size:10.0pt;font-fam=
ily:Arial;
color:navy'> Harvest the SSO Cookie --&gt;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>&lt;storeCookie<o:p></o:p></span></fon=
t></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span class=3DGramE>de=
scription</span>=3D&quot;Store
JSESSIONIDSSO cookie value&quot;<span style=3D'mso-spacerun:yes'>&nbsp; </s=
pan><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span class=3DGramE>na=
me</span>=3D&quot;JSESSIONIDSSO&quot;
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span class=3DGramE>pr=
operty</span>=3D&quot;sessidSSO&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>/&gt;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dnavy face=
=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>&lt;!--</span></fon=
t></span><font
size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size:10.0pt;font-fam=
ily:Arial;
color:navy'> Invoke the target page directly, pass the SSO cookie value with
the request --&gt;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>&lt;invoke<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span class=3DGramE>de=
scription</span>=3D&quot;Go
to start add KPI page&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span class=3DGramE>ur=
l</span>=3D&quot;http://${gen_host}:${gen_port}/revenueoffice/secure/KPIs/S=
tartCreateKPI.do?JSESSIONIDSSO=3D#{sessidSSO}&quot;<o:p></o:p></span></font=
></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>/&gt;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>A good tool to view the http traffic
between server and client is Fiddler (<a
href=3D"http://www.fiddlertool.com/Fiddler/">http://www.fiddlertool.com/Fid=
dler/</a>)
you will be able to see all the redirections and cookie value assignments as
the user logs in&#8230;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Hope this helps a bit&#8230;<o:p></o:p=
></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Regards,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Colin.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=
=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D2 face=3DTah=
oma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> webtest-admin@lists.ca=
noo.com
[mailto:webtest-admin@lists.canoo.com] <b><span style=3D'font-weight:bold'>=
On
Behalf Of </span></b>MELVIN CHEE<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> 07 July 2006 10:30<br>
<b><span style=3D'font-weight:bold'>To:</span></b> webtest@lists.canoo.com<=
br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [Webtest] Oracle SS=
O</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><o:p>&nbsp;</o:p>=
</span></font></p>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><br>
Hi gurus,<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><br>
I intend to test my j2ee application with Webtest. The <br>
application is deployed on a Oracle 10g Application Server. <o:p></o:p></sp=
an></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p>=
</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>All users need to=
 login
via Oracle Single-Sign On. I hit a brick<br>
wall when I discovered that Oracle Single-Sign uses several<br>
redirections and cookie injections to authenticate users.<o:p></o:p></span>=
</font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>I have found a ar=
ticle
describing how to &quot;follow&quot; the redirections<br>
using httpunit. <o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><br>
See <a href=3D"http://www.fm-berger.de/ora_webtest/ch06.php">http://www.fm-=
berger.de/ora_webtest/ch06.php</a><o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p>=
</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>As you can see Or=
acle
uses a lot of page redirects as well as <br>
cookies to handle SSO. However, I am not sure how the same<br>
can be done with Webtest.<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>My webtest script=
 keep
returning with a 401 error when i reference<br>
the first page of my application. In a typical user scenario,<br>
the browser will be redirected to the Oracle SSO Login page first.<o:p></o:=
p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>I suspect that We=
btest
stalled at the login page.<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p>=
</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>The Webtest scrip=
t always
stall when it is trying to establish the<br>
connection to the deployed application (the waitfor tag).<br>
I am never able to reach the first webtest case.<o:p></o:p></span></font></=
p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p>=
</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>Any ideas guys?<o=
:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p>=
</span></font></p>

</div>

<p style=3D'margin-left:36.0pt'><font size=3D3 face=3D"Times New Roman"><sp=
an
style=3D'font-size:12.0pt'><span style=3D'mso-spacerun:yes'>&nbsp; </span><=
o:p></o:p></span></font></p>

<div class=3DMsoNormal align=3Dcenter style=3D'margin-left:36.0pt;text-alig=
n:center'><font
size=3D3 face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>

<hr size=3D1 width=3D"100%" align=3Dcenter>

</span></font></div>

<p class=3DMsoNormal style=3D'margin-left:36.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>Now you can <a
href=3D"http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/reading_p=
ane/*http:/us.rd.yahoo.com/evt=3D40565/*http:/uk.docs.yahoo.com/nowyoucan.h=
tml">scan
emails quickly with a reading pane</a>. Get the new <a
href=3D"http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/reading_p=
ane/*http:/us.rd.yahoo.com/evt=3D40565/*http:/uk.docs.yahoo.com/nowyoucan.h=
tml">Yahoo!
Mail</a>. <o:p></o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_03D8_01C6A1BA.20AC2760--