Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-10 Thread Christopher Schultz
ight away if you'd like. The final patch will simply be more robust, support more options, and likely cover cases outside what you were requesting. Sorry about the oversight in the MemoryRealm. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gp

Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-10 Thread Mark Thomas
On 10/03/2016 21:40, Jason Overland wrote: > Chris, > > On Thu, Mar 10, 2016 at 6:18 AM, Christopher Schultz > wrote: >> Give this patch a try: >> ... >> I have no idea how the options get parsed; we'll see if this simple >> implementation will get you going again. >> >> -chris >> > > The parsin

Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-10 Thread Jason Overland
Chris, On Thu, Mar 10, 2016 at 6:18 AM, Christopher Schultz wrote: > Give this patch a try: > ... > I have no idea how the options get parsed; we'll see if this simple > implementation will get you going again. > > -chris > The parsing is working correctly. After applying the patch I could logi

Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-10 Thread Christopher Schultz
Jason, On 3/9/16 1:19 PM, Jason Overland wrote: > For what it's worth, that analysis & approach to fixing seem > reasonable to me. Yes I'll be glad to file a bug report and test a > patch. Give this patch a try: CUT = Index: java/org/apache/catalina/realm/JAASMemoryLog

Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-09 Thread Jason Overland
Chris, Thanks for the quick and informative response. On Wed, Mar 9, 2016 at 7:26 AM, Christopher Schultz wrote: > >> For authentication our configuration is using a MemoryRealm with >> digest="SHA". We are storing usernames and passwords in a >> tomcat-

Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-09 Thread Christopher Schultz
obviates most of my other questions. I guess the > important question is: how do I set the CredentialHandler on the > MemoryRealm? The way you are setting the CredentialHandler is correct: >> >> > className="org.apache.catalina.realm.MessageDigestCredentialH

Re: NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-08 Thread Jason Overland
on is: how do I set the CredentialHandler on the MemoryRealm? === --- MemoryRealm.java (revision 1734183) +++ MemoryRealm.java (working copy) @@ -115,16 +115,16 @@ GenericPrincipal principal = principals.get(use

NullPointerException in MemoryRealm after upgrading to Tomcat 8.0.32 from 7.0.26

2016-03-08 Thread Jason Overland
Hi, I'm upgrading an existing Vaadin 6 application from Tomcat 7.0.26 to Tomcat 8.0.32 and have some questions. I'm using Windows 7 and debugging in Eclipse. For authentication our configuration is using a MemoryRealm with digest="SHA". We are storing usernames and p

MemoryRealm Setup

2010-01-13 Thread cgswtsu78
Hello, I'm trying to setup basic auth with tomcat using a MemoryRealm but I'm unsure as to how to set the username and password for a given role. I don't have just one username and password for auth but 1000s. My users are logging into an apache/perl application which has a l

RE: memoryrealm

2008-03-12 Thread Caldarale, Charles R
> From: Edward Quick [mailto:[EMAIL PROTECTED] > Subject: RE: memoryrealm > > I'm not sure about that because I copied the format that's > used in the tomcat manager webapp 's web.xml in > tomcat-5.5.16/server/webapps/manager/WEB-INF/web.xml O.k., I could

RE: memoryrealm

2008-03-12 Thread Edward Quick
Thanks Chuck, I'm not sure about that because I copied the format that's used in the tomcat manager webapp 's web.xml in tomcat-5.5.16/server/webapps/manager/WEB-INF/web.xml which has in it: Link to the UserDatabase instance from which we request lists of defined role n

RE: memoryrealm

2008-03-12 Thread Caldarale, Charles R
> From: Edward Quick [mailto:[EMAIL PROTECTED] > Subject: RE: memoryrealm > I also updated the webapps web.xml file so that it refers > to SampleUserDatabase instead of Tomcat's UserDatabase. You shouldn't do that; the webapp isn't using the Resource, only the Realm

RE: memoryrealm

2008-03-12 Thread Edward Quick
Thanks Chuck. Here is my context.xml now: And this is in the webapp's META-INF. I also updated the webapps web.xml file so that it refers to SampleUserDatabase instead of Tomcat's UserDatabase. SampleUserDatabase org.apache.catalina.UserDatabase Unfortunatel

RE: memoryrealm

2008-03-12 Thread Caldarale, Charles R
> From: Edward Quick [mailto:[EMAIL PROTECTED] > Subject: RE: memoryrealm > > Unless your element is in server.xml (it shouldn't be), the path attribute is not allowed; remove it. If you did put your element in server.xml, move it to the proper location (the webapp'

RE: memoryrealm

2008-03-12 Thread Edward Quick
] > To: users@tomcat.apache.org > Subject: RE: memoryrealm > Date: Wed, 12 Mar 2008 12:51:20 + > > > I don't know if this helps, but here's an extract from the log below. This > gets created at deployment, but when I visit the URL, I don't get any output.

RE: memoryrealm

2008-03-12 Thread Edward Quick
I don't know if this helps, but here's an extract from the log below. This gets created at deployment, but when I visit the URL, I don't get any output. Also I've determined now that the sample app is using conf/tomcat-users.xml and not my own /tmp/tomcatusers.xml file as I get a 403 returned w

RE: memoryrealm

2008-03-12 Thread David Cassidy
On your realm up the level of debug and let us know whats in the logs D On Wed, 2008-03-12 at 11:16 +, Edward Quick wrote: > Thanks David, I had forgotten the web.xml as you suggested. I have now added > this so my web.xml is as shown below, and I get the prompt but the userid I'm > using

RE: memoryrealm

2008-03-12 Thread Edward Quick
Thanks David, I had forgotten the web.xml as you suggested. I have now added this so my web.xml is as shown below, and I get the prompt but the userid I'm using 'test' (passwd: test) isn't going through. Hope this isn't a daft question, but do I need to add code to the servlet to get this to wo

Re: memoryrealm

2008-03-12 Thread David Cassidy
whats in your web.xml ? is your app forcing a login ? all the realm provides is a system to do authentication unless you are triggering it, it isn't used On Wed, 2008-03-12 at 10:36 +, Edward Quick wrote: > Hi, > > I would like to specify my own tomcat-users.xml for my webapp to use (

memoryrealm

2008-03-12 Thread Edward Quick
Hi, I would like to specify my own tomcat-users.xml for my webapp to use (not the server's main one in conf/tomcat-user.xml). I tried the following configuration in my webapp's context.xml file but unfortunately when I went to the URL, I wasn't even prompted for a logon: Could so

Re: MemoryRealm question

2007-11-19 Thread Mark Thomas
Bárbara Vieira wrote: > When I use that Realm, how the principals variable, that is declared in that > class(MemoryRealm) as a HashMap, is loaded? Configure Tomcat to use the MemoryRealm. Start tomcat with JPDA debugging enabled. Set a break point at the start of the authenticate() method.

MemoryRealm question

2007-11-19 Thread Bárbara Vieira
Hi everyone!! I have a question about org.apache.catalina.realm.MemoryRealm. When I use that Realm, how the principals variable, that is declared in that class(MemoryRealm) as a HashMap, is loaded? I.e. How the data that is in the file (ex. Tomcat-users.xml) is loaded to that variable?! I’m

Re: MemoryRealm problems!

2006-12-05 Thread Omar Adobati
On 12/5/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > From: Omar Adobati [mailto:[EMAIL PROTECTED] > Subject: MemoryRealm problems! > > I put it into the $MY_APP/META-INF directory, but it seems to > be ignored. Does the file $(catalina.home)/conf/[engine]/[host]/A

RE: MemoryRealm problems!

2006-12-05 Thread Caldarale, Charles R
> From: Omar Adobati [mailto:[EMAIL PROTECTED] > Subject: MemoryRealm problems! > > I put it into the $MY_APP/META-INF directory, but it seems to > be ignored. Does the file $(catalina.home)/conf/[engine]/[host]/Apps.xml exist? If so, it will override the $MY_APP/META-INF/c

MemoryRealm problems!

2006-12-05 Thread Omar Adobati
Here is the context.xml about the webapplciation I'm trying to develop. I put it into the $MY_APP/META-INF directory, but it seems to be ignored. Neither the user database and the log seems to be used! == == Have I done any mistake? Maybe I can't do this? Thanks for your help -- Omar

JAASRealm and MemoryRealm

2006-03-06 Thread MW Janssen
: Unexpected error java.lang.SecurityException: Unable to locate a login configuration. But I don't want (and use) JAASRealm but I want MemoryRealm (users in tomcat_users.xml). I placed this in my server.xml So why Tomcat doesn't pick up the MemoryRealm but is l