users@glassfish.java.net

Re: RE: DIGEST & file realm

From: <forums_at_java.net>
Date: Tue, 14 May 2013 03:45:15 -0500 (CDT)

I gave up trying to get DIGEST & file realm to work. There weren't a lot of
levers to tweak! In the end, I tried DIGEST and a jdbc realm and this worked.
Here is what I did.

Install a mysql database with yum.

Follow these instructions (with some changes, this blog is for FORM
authentication so stop at step 4)

http://jugojava.blogspot.ie/2011/02/jdbc-security-realm-with-glassfish-and.html

Create the mysql database "realm_db" with the tables in the above blog

Using the Glassfish console UI, I created a JDBC Connection Pool and JDBC
Resource for mysql database.

In the Pool Additional Properties, add in your mysql database properties as
shown in the blog

On the server-config, Security page, I set "Default Realm" to jdbc-realm

IMPORTANT: When creating the JDBC security realm, use JAAS context of
"jdbcDigestRealm" and JNDI of "jdbc/realm_db".

I left these fields blank, Digest Algorithm, Encoding, Charset, Password,
Encryption Algormithm etc. and I put the passwords in the mysql database in
clear text. By the way, I used an up-to-date version of wget for testing
because I read somewhere that older versions don't have proper RFC2617 DIGEST
support. The version is 1.14 from Aug 12. don't support


--
[Message sent by forum member 'FionaS']
View Post: http://forums.java.net/node/896170