You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Larry Rogers <ro...@sprynet.com> on 2001/05/09 19:45:05 UTC

Using Digest method of JDBCRealm

Hi All,

I'm trying to use the static Digest method included in JDBCRealm in 
Tomcat 4b3 from the command line.  When I execute the following

$ java -classpath catalina.jar org.apache.catalina.realm.JDBCRealm -a 
MD5 pass

from tomcat/server/lib, I get the output at the end of this message.  I 
have the same trouble using the Digest method from a simple web application.

I want to use the Digest method provided by Tomcat to store encrypted 
passwords in the JDBCRealm database for use in authenticating users of 
my web apps.  If anyone is able to do this, what did you have to do to 
get it to work?

Thanks for any help,

Larry


pass:Exception in thread "main" java.lang.ExceptionInInitializerError: 
java.util.MissingResourceException: Can't find bundle for base name 
org.apache.tomcat.resources.LocalStrings, locale en_US
	at 
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:679)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
	at org.apache.catalina.util.StringManager.<init>(StringManager.java:115)
	at org.apache.catalina.util.StringManager.getManager(StringManager.java:260)
	at org.apache.catalina.util.HexUtils.<clinit>(HexUtils.java:105)
	at org.apache.catalina.realm.JDBCRealm.Digest(JDBCRealm.java:598)
	at org.apache.catalina.realm.JDBCRealm.main(JDBCRealm.java:640)

		


Re: Using Digest method of JDBCRealm

Posted by Bip Thelin <bi...@apache.org>.
On Tue, 15 May 2001, Oki DZ wrote:
> [...]
>
> > I'm trying to use the static Digest method included in JDBCRealm in
> > Tomcat 4b3 from the command line.  When I execute the following
> 
> I use Tomcat 4b4.
>  
> > $ java -classpath catalina.jar org.apache.catalina.realm.JDBCRealm -a
> > MD5 pass
> > 
> > from tomcat/server/lib, I get the output at the end of this message.  I
> > have the same trouble using the Digest method from a simple web application.

The main method of JDBCRealm has been removed in the later releases
and will be probably me migrated to a standalone tool.

> I believe that the above command is for getting the digest of the
> entered password.
> I looked up your mail header, you use Linux; so, you can get "md5sum"
> program for digesting files.

Yes, invoking main of the older JDBCRealm would return your password
encrypted using MD5. Insert this password for your user in the DB to
make use of it.
  
> > I want to use the Digest method provided by Tomcat to store encrypted
> > passwords in the JDBCRealm database for use in authenticating users of
> > my web apps.  If anyone is able to do this, what did you have to do to
> > get it to work?
> 
> You can see my other posting on JDBCRealm and MD5 passwords.

Yes, look at Oki's previous mail in this thread but basically you would
set your <Realm> entry to use digest i.e. <Realm ... Digest="MD5"/> and
setup in web.xml which section of your site to protect.

	..bip



Re: Using Digest method of JDBCRealm

Posted by Oki DZ <ok...@bdg.pindad.com>.
Larry Rogers wrote:
> 
> Hi All,
> 
> I'm trying to use the static Digest method included in JDBCRealm in
> Tomcat 4b3 from the command line.  When I execute the following

I use Tomcat 4b4.
 
> $ java -classpath catalina.jar org.apache.catalina.realm.JDBCRealm -a
> MD5 pass
> 
> from tomcat/server/lib, I get the output at the end of this message.  I
> have the same trouble using the Digest method from a simple web application.

I believe that the above command is for getting the digest of the
entered password.
I looked up your mail header, you use Linux; so, you can get "md5sum"
program for digesting files.
 
> I want to use the Digest method provided by Tomcat to store encrypted
> passwords in the JDBCRealm database for use in authenticating users of
> my web apps.  If anyone is able to do this, what did you have to do to
> get it to work?

You can see my other posting on JDBCRealm and MD5 passwords.

Oki