Re: troubles using JAASRealm with SecurityFilter
Christopher Schultz <chris-Nf+wZpSdgwfUvtVhod0YCwZWvwf/[email protected]> Thu, 31 Jul 2008 09:58:14 -0400
| Newsgroups | gmane.comp.java.securityfilter.user |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1435664654== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF25ACC25F8166A18FBBBB4CB" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF25ACC25F8166A18FBBBB4CB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Matt, Matthew Hixson wrote: > Without catalina.jar in my WEB-INF/lib I can view any of the non-=20 > protected pages. There's nothing wrong until I try to login. > > With catalina.jar in my WEB-INF/lib I can't view any of the site. =20 > Going to the front page (which does not require you to login) gives me = =20 > a Tomcat HTTP Status 500 error page with: >=20 > java.lang.ClassCastException: =20 > org.apache.catalina.util.DefaultAnnotationProcessor =20 That's a little weird -- I wouldn't imagine that the JSP processor would = need to observe the Realm or anything like that. It's possible that it's = unrelated, but not likely. I would stick to /not/ putting catalina.jar into your webapp's=20 WEB-INF/lib directory. The problem is that the Realm being used is not getting its "Container"=20 set. The CatalinaRealmAdaptor (the sf realm that wraps Tomcat's realms)=20 does not set that component on the wrapped realm. My guess is that when=20 the adapter class was written, that step was unnecessary, and that most=20 people either abandon sf when it doesn't work, or write their own realms = (as I did). Are you willing to do some sf hacking and recompiling? If so, take a=20 look at CatalinaRealmAdapter.java -- it's very short. You'll have to=20 call Realm.setContainer and pass-in the Container from Tomcat. Who=20 knows... maybe it doesn't even require the "real" container that is=20 actually running -- although using the currently-running container would = be ideal. I'll ask over on the TC list about the Container and how to get it proper= ly. Oh, one more thing -- which version of sf are you using? Honestly, the=20 best version to use is the latest cvs HEAD, which has some nice new=20 features and is still quite stable. -chris --------------enigF25ACC25F8166A18FBBBB4CB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkiRxPoACgkQ9CaO5/Lv0PCY1ACgqsB2Hpw/Rtj/r2fTvEXm2fIz TWMAnR8n/VkR/A8zHre61WSRPImfUcYE =Br61 -----END PGP SIGNATURE----- --------------enigF25ACC25F8166A18FBBBB4CB-- --===============1435664654== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============1435664654== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ securityfilter-user mailing list securityfilter-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/securityfilter-user --===============1435664654==--