Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 99955 invoked from network); 31 Aug 2003 14:08:19 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.188) by daedalus.apache.org with SMTP; 31 Aug 2003 14:08:19 -0000 Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19tSsD-0007QQ-00 for tomcat-user@jakarta.apache.org; Sun, 31 Aug 2003 16:08:09 +0200 Received: from [217.228.254.136] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19tSsD-0000i9-00 for tomcat-user@jakarta.apache.org; Sun, 31 Aug 2003 16:08:09 +0200 Message-ID: <3F520137.1010100@cyberspaceroad.com> Date: Sun, 31 Aug 2003 16:07:51 +0200 From: Adam Hardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en-us, en MIME-Version: 1.0 To: tomcat-user@jakarta.apache.org Subject: JAASRealm with Basic Authentication References: <3F4DD187.60800@cyberspaceroad.com> In-Reply-To: <3F4DD187.60800@cyberspaceroad.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am trying to run my JAASRealm implementation, and I have it working successfully on my own apps using Form-based authentication, but when I try to use it for tomcat's manager tool (configured in webapps/manager.xml) or any other app using basic authentication, I have problems. First of all tomcat throws a NullPointerException which originates from: Caused by: java.lang.NullPointerException at org.apache.catalina.realm.JAASCallbackHandler.handle(JAASCallbackHandler.java:156) at javax.security.auth.login.LoginContext$5.run(LoginContext.java:812) At this point, the browser has just got the authentication request and it shows me the basic authentication dialog. Then when I submit, with the wrong password, I get the retry? dialog, but with the correct password, tomcat gives me a 403: access denied. I can see in tomcat's source that JAASCallbackHandler is not handling a null password, but I don't understand why it is being passed a null password. I think there must be an exception in auth.login.LoginContext.run() which is being swallowed, resulting in null user & pw parameters being passed. Any help appreciated! Adam