You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ja...@kp.org on 2010/04/13 03:10:33 UTC
JMeter Cookie Question
I am trying to test a site that uses authentication provided by Oracle's
CoreID product (also known as WebGate). A problem is arising when webgate
tries to set a cookie that is intended for a target 2 hops down a redirect
chain. JMeter refuses to set the cookie because it violates path rules. If
you set the cookie manually everything works fine.
How can I go about getting this cookie set by the cookie manager (or some
other element) instead of blindly setting it for everything? Or is that
actually fine since the path rules will only really allow the cookie to be
set for the one page?
i.e.
1) frontPage.html sets cookie "yada" with a path of "/foo.cgi" and
redirects to setupStuff.html
2) <-- cookie is not set by JMeter due to rule violation
3) setupStuff.html does arbitrary setup type things and redirects to
/foo.cgi
- Jason
Re: JMeter Cookie Question
Posted by Ja...@kp.org.
Yes, it probably is a bug in the app - however it's a 3rd party app and I
have to live with it.
Deepak Shetty <sh...@gmail.com> wrote on 04/12/2010 07:44:01 PM:
> Hi
> Isnt this a bug in the app
> http://[snip]/obrareq.cgi
> can only set cookies scoped to /obrareq.cgi or /
> If this is a single sign on solution as it looks that it is , then you
need
> to configure it to scope cookies to '/'
>
> regards
> deepak
>
> On Mon, Apr 12, 2010 at 6:29 PM, <Ja...@kp.org> wrote:
>
> > Sebb,
> >
> > Thanks for the quick reply.
> >
> > sebb <se...@gmail.com> wrote on 04/12/2010 06:16:05 PM:
> > > On 13/04/2010, Jason.F.Dawes@kp.org <Ja...@kp.org> wrote:
> > > > I am trying to test a site that uses authentication provided by
> > Oracle's
> > > > CoreID product (also known as WebGate). A problem is arising
when
> > webgate
> > > > tries to set a cookie that is intended for a target 2 hops down a
> > redirect
> > > > chain. JMeter refuses to set the cookie because it violates path
> > rules. If
> > > > you set the cookie manually everything works fine.
> > > >
> > > > How can I go about getting this cookie set by the cookie manager
(or
> > some
> > > > other element) instead of blindly setting it for everything? Or
is
> > that
> > > > actually fine since the path rules will only really allow the
cookie
> > to be
> > > > set for the one page?
> > > >
> > > > i.e.
> > > >
> > > > 1) frontPage.html sets cookie "yada" with a path of "/foo.cgi"
and
> > >
> > > JMeter will save the cookie.
> > >
> >
> > Actually, it's not. Here's the relevant [amended] message from the
log:
> > Not storing invalid cookie: <ObFormLoginCookie=[snip];
> > path=/kpsso/loginAction;> for URL http://[snip]/obrareq.cgi?[snip]
> > (Illegal path attribute "/kpsso/loginAction". Path of origin:
> > "/obrareq.cgi")
> >
> > > > redirects to setupStuff.html
> > > > 2) <-- cookie is not set by JMeter due to rule violation
> > >
> > > Yes.
> > >
> > > > 3) setupStuff.html does arbitrary setup type things and redirects
to
> > > > /foo.cgi
> > >
> > > At which point JMeter should send the yada cookie.
> >
> > I wish this was the case, however the cookie is not present - I assume
> > because the CookieManager is refusing to store it.
> >
> > >
> > > Add the Tree View Listener to track what is happening.
> > >
> >
> > I'm using Tree View Listener and Fiddler2 as well. Normal browser
traffic
> > the cookie is set, it's not in JMeter.
> >
> > >
> > > Make sure you have "Follow redirects" enabled and "Auto redirect"
> > disabled.
> > >
> >
> > This was already done.
Re: JMeter Cookie Question
Posted by Deepak Shetty <sh...@gmail.com>.
Hi
Isnt this a bug in the app
http://[snip]/obrareq.cgi
can only set cookies scoped to /obrareq.cgi or /
If this is a single sign on solution as it looks that it is , then you need
to configure it to scope cookies to '/'
regards
deepak
On Mon, Apr 12, 2010 at 6:29 PM, <Ja...@kp.org> wrote:
> Sebb,
>
> Thanks for the quick reply.
>
> sebb <se...@gmail.com> wrote on 04/12/2010 06:16:05 PM:
> > On 13/04/2010, Jason.F.Dawes@kp.org <Ja...@kp.org> wrote:
> > > I am trying to test a site that uses authentication provided by
> Oracle's
> > > CoreID product (also known as WebGate). A problem is arising when
> webgate
> > > tries to set a cookie that is intended for a target 2 hops down a
> redirect
> > > chain. JMeter refuses to set the cookie because it violates path
> rules. If
> > > you set the cookie manually everything works fine.
> > >
> > > How can I go about getting this cookie set by the cookie manager (or
> some
> > > other element) instead of blindly setting it for everything? Or is
> that
> > > actually fine since the path rules will only really allow the cookie
> to be
> > > set for the one page?
> > >
> > > i.e.
> > >
> > > 1) frontPage.html sets cookie "yada" with a path of "/foo.cgi" and
> >
> > JMeter will save the cookie.
> >
>
> Actually, it's not. Here's the relevant [amended] message from the log:
> Not storing invalid cookie: <ObFormLoginCookie=[snip];
> path=/kpsso/loginAction;> for URL http://[snip]/obrareq.cgi?[snip]
> (Illegal path attribute "/kpsso/loginAction". Path of origin:
> "/obrareq.cgi")
>
> > > redirects to setupStuff.html
> > > 2) <-- cookie is not set by JMeter due to rule violation
> >
> > Yes.
> >
> > > 3) setupStuff.html does arbitrary setup type things and redirects to
> > > /foo.cgi
> >
> > At which point JMeter should send the yada cookie.
>
> I wish this was the case, however the cookie is not present - I assume
> because the CookieManager is refusing to store it.
>
> >
> > Add the Tree View Listener to track what is happening.
> >
>
> I'm using Tree View Listener and Fiddler2 as well. Normal browser traffic
> the cookie is set, it's not in JMeter.
>
> >
> > Make sure you have "Follow redirects" enabled and "Auto redirect"
> disabled.
> >
>
> This was already done.
Re: JMeter Cookie Question
Posted by sebb <se...@gmail.com>.
On 13/04/2010, Jason.F.Dawes@kp.org <Ja...@kp.org> wrote:
> Sebb,
>
> Thanks for the quick reply.
>
> sebb <se...@gmail.com> wrote on 04/12/2010 06:16:05 PM:
>
> > On 13/04/2010, Jason.F.Dawes@kp.org <Ja...@kp.org> wrote:
> > > I am trying to test a site that uses authentication provided by
> Oracle's
> > > CoreID product (also known as WebGate). A problem is arising when
> webgate
> > > tries to set a cookie that is intended for a target 2 hops down a
> redirect
> > > chain. JMeter refuses to set the cookie because it violates path
> rules. If
> > > you set the cookie manually everything works fine.
> > >
> > > How can I go about getting this cookie set by the cookie manager (or
> some
> > > other element) instead of blindly setting it for everything? Or is
> that
> > > actually fine since the path rules will only really allow the cookie
> to be
> > > set for the one page?
> > >
> > > i.e.
> > >
> > > 1) frontPage.html sets cookie "yada" with a path of "/foo.cgi" and
> >
> > JMeter will save the cookie.
> >
>
>
> Actually, it's not. Here's the relevant [amended] message from the log:
> Not storing invalid cookie: <ObFormLoginCookie=[snip];
> path=/kpsso/loginAction;> for URL http://[snip]/obrareq.cgi?[snip]
> (Illegal path attribute "/kpsso/loginAction". Path of origin:
> "/obrareq.cgi")
That's different from what I understood from your original e-mail; I
was under the impression that the original cookie was valid, and that
you were just concerned about the intervening redirect.
The problem here is nothing to do with redirects.
>
> > > redirects to setupStuff.html
> > > 2) <-- cookie is not set by JMeter due to rule violation
> >
> > Yes.
> >
> > > 3) setupStuff.html does arbitrary setup type things and redirects to
> > > /foo.cgi
> >
> > At which point JMeter should send the yada cookie.
>
>
> I wish this was the case, however the cookie is not present - I assume
> because the CookieManager is refusing to store it.
Yes.
If changing the Cookie Spec does not work, then set the Jmeter property:
CookieManager.check.cookies=false
to disable cookie checking.
See: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Cookie_Manager
para beginning:
"JMeter version 2.3.2 and earlier ..."
You still need to set the appropriate Cookie spec to enable the
cookies to be parsed.
>
> >
> > Add the Tree View Listener to track what is happening.
> >
>
>
> I'm using Tree View Listener and Fiddler2 as well. Normal browser traffic
> the cookie is set, it's not in JMeter.
>
>
> >
> > Make sure you have "Follow redirects" enabled and "Auto redirect"
> disabled.
> >
>
>
> This was already done.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: JMeter Cookie Question
Posted by Ja...@kp.org.
Sebb,
Thanks for the quick reply.
sebb <se...@gmail.com> wrote on 04/12/2010 06:16:05 PM:
> On 13/04/2010, Jason.F.Dawes@kp.org <Ja...@kp.org> wrote:
> > I am trying to test a site that uses authentication provided by
Oracle's
> > CoreID product (also known as WebGate). A problem is arising when
webgate
> > tries to set a cookie that is intended for a target 2 hops down a
redirect
> > chain. JMeter refuses to set the cookie because it violates path
rules. If
> > you set the cookie manually everything works fine.
> >
> > How can I go about getting this cookie set by the cookie manager (or
some
> > other element) instead of blindly setting it for everything? Or is
that
> > actually fine since the path rules will only really allow the cookie
to be
> > set for the one page?
> >
> > i.e.
> >
> > 1) frontPage.html sets cookie "yada" with a path of "/foo.cgi" and
>
> JMeter will save the cookie.
>
Actually, it's not. Here's the relevant [amended] message from the log:
Not storing invalid cookie: <ObFormLoginCookie=[snip];
path=/kpsso/loginAction;> for URL http://[snip]/obrareq.cgi?[snip]
(Illegal path attribute "/kpsso/loginAction". Path of origin:
"/obrareq.cgi")
> > redirects to setupStuff.html
> > 2) <-- cookie is not set by JMeter due to rule violation
>
> Yes.
>
> > 3) setupStuff.html does arbitrary setup type things and redirects to
> > /foo.cgi
>
> At which point JMeter should send the yada cookie.
I wish this was the case, however the cookie is not present - I assume
because the CookieManager is refusing to store it.
>
> Add the Tree View Listener to track what is happening.
>
I'm using Tree View Listener and Fiddler2 as well. Normal browser traffic
the cookie is set, it's not in JMeter.
>
> Make sure you have "Follow redirects" enabled and "Auto redirect"
disabled.
>
This was already done.
Re: JMeter Cookie Question
Posted by sebb <se...@gmail.com>.
On 13/04/2010, Jason.F.Dawes@kp.org <Ja...@kp.org> wrote:
> I am trying to test a site that uses authentication provided by Oracle's
> CoreID product (also known as WebGate). A problem is arising when webgate
> tries to set a cookie that is intended for a target 2 hops down a redirect
> chain. JMeter refuses to set the cookie because it violates path rules. If
> you set the cookie manually everything works fine.
>
> How can I go about getting this cookie set by the cookie manager (or some
> other element) instead of blindly setting it for everything? Or is that
> actually fine since the path rules will only really allow the cookie to be
> set for the one page?
>
> i.e.
>
> 1) frontPage.html sets cookie "yada" with a path of "/foo.cgi" and
JMeter will save the cookie.
> redirects to setupStuff.html
> 2) <-- cookie is not set by JMeter due to rule violation
Yes.
> 3) setupStuff.html does arbitrary setup type things and redirects to
> /foo.cgi
At which point JMeter should send the yada cookie.
Add the Tree View Listener to track what is happening.
Make sure you have "Follow redirects" enabled and "Auto redirect" disabled.
> - Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org