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

2016-03-10 Thread Christopher Schultz
production system right 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://gpgtools.org Com

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.

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

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:

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 <ch...@christopherschultz.net> wrote: > >> For authentication our configuration is using a MemoryRealm with >> digest="SHA". We are storing usernames and pas

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

2016-03-09 Thread Christopher Schultz
bviates 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.MessageDigestCredentialHan

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

2016-03-08 Thread Jason Overland
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(username

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 passwords i

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 link to a tomcat

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: Context

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

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
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

RE: memoryrealm

2008-03-12 Thread Edward Quick
:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4096) From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: RE: memoryrealm Date: Wed, 12 Mar 2008 12:51:20

RE: memoryrealm

2008-03-12 Thread Caldarale, Charles R
From: Edward Quick [mailto:[EMAIL PROTECTED] Subject: RE: memoryrealm Context path=/sample debug=9 privileged=true Unless your Context element is in server.xml (it shouldn't be), the path attribute is not allowed; remove it. If you did put your Context element in server.xml, move

RE: memoryrealm

2008-03-12 Thread Edward Quick
Thanks Chuck. Here is my context.xml now: Context debug=9 privileged=true Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=SampleUserDatabase / Resource name=SampleUserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database

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: !-- Define reference to the user database for looking up roles -- resource-env-ref

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 is. That might be causing

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 be mistaken. However, both 5.5's admin app

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 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. Access

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! == Context Realm className=org.apache.catalina.realm.MemoryRealm

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/context.xml file

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]/Apps.xml exist? If so

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 GlobalNamingResources Resource name=UserDatabase auth=Container type