Tomcat and CAS

Scott Battaglia scott.battaglia at gmail.com
Fri Sep 22 07:42:21 EDT 2006


It should work regardless of whether the jsessionid is encoded or not.  The
jsessionid is there in case cookies are disabled.  But if this works for
you, go for it :-)

-Scott

On 9/22/06, Nino Katic <nkatic at public.srce.hr> wrote:
>
> We have find solution that includes changing the form source, so form now
> looks like:
>
>   <form method="post"
> action="login<%=response.encodeRedirectURL((request.getQueryString() !=
> null && request.getQueryString().length() > 0 ? "?" +
> request.getQueryString() : ""))%>">
>
> instead of
>
>   <form method="post" action="<%=response.encodeRedirectURL("login" +
> (request.getQueryString() != null && request.getQueryString().
> length() > 0 ? "?" + request.getQueryString() : ""))%>">
>
>
> I don't know if this is a bug or not, but things work now as they should.
> This was jsessionid parameter is not appended to login string in action.
>
> Regards,
>
> Nino
>
>
> On Thu, 21 Sep 2006, Scott Battaglia wrote:
>
> > The form action needs to make sure it includes the original parameters (
> i.e.
> > service).  The sample login form page should have a good example.
> >
> > -Scott
> >
> > On 9/18/06, Nino Katic <nkatic at public.srce.hr> wrote:
> > >
> > > Hello,
> > >
> > > I'm using CAS filtered based authentication in Tomcat and have some
> > > problems with it. I access my java application on URL:
> > >
> > > http://server.com/myapp
> > >
> > > Filter is put on all appclication (/*) so when u enter
> > > http://server.com/myapp in a browser u're redirected to CAS login
> page.
> > >
> > > If i write login filter like this:
> > >
> > >     <init-param>
> > >       <param-name>edu.yale.its.tp.cas.client.filter.loginUrl
> </param-name>
> > >       <param-value>https://cas.server.com/cas/login</param-value>
> > >     </init-param>
> > >
> > > the URL on CAS login page looks something like this
> > > https://cas.server.com/cas/login?service=htpp://server.com/myapp. In
> the
> > > source of that same page, login form looks like this:
> > >
> > > <form action"login;jsessionid=fdfpfidfaifoadfdfz" ... >
> > >
> > > When i enter some username and password nothing much happens. The same
> > > form is drawn again BUT with URL looking like this:
> > >
> > > https://cas.server.com/cas/login
> > >
> > > so, there is NO service parameter! If i enter username and password
> again
> > > authentication passes but i'm not redirected back to my application.
> > >
> > > If i write login filter like this:
> > >
> > >     <init-param>
> > >       <param-name>edu.yale.its.tp.cas.client.filter.loginUrl
> </param-name>
> > >       <param-value>https://cas.server.com/cas/</param-value>
> > >     </init-param>
> > >
> > > then i get form with source:
> > >
> > > <form action="login" .. > (notice - there is no jsessionid parameter)
> and
> > > when i enter username/pass it passes authentication BUT i'm again not
> > > redirected to my application. The URL also doesn't contains service
> > > parameter.
> > >
> > > So, my question is how to solve this - to get redirected back to my
> > > application? I'm using CAS 3.0 and i'm accessing it through Apache 1.3->
> > > mod_jk -> Tomcat. I'm also using this init param in filter:
> > >
> > >     <init-param>
> > >       <param-name>edu.yale.its.tp.cas.client.filter.serverName
> > > </param-name>
> > >       <param-value>server.com:80</param-value>
> > >     </init-param>
> > >
> > > Thx. and regards,
> > >
> > > Nino
> > > _______________________________________________
> > > Yale CAS mailing list
> > > cas at tp.its.yale.edu
> > > http://tp.its.yale.edu/mailman/listinfo/cas
> > >
> >
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20060922/29342153/attachment.html


More information about the cas mailing list