Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8658381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:45:10+00:00 2026-06-12T15:45:10+00:00

Hi I have read Glassfish 3.1.2's JDBCRealm has a new Password Encryption Algorithm field.

  • 0

Hi I have read Glassfish 3.1.2's JDBCRealm has a new Password Encryption Algorithm field. What is it for? and googled for similar topics but it seems no definitive answer has been published.

In short, I have a jdbc realm working in glassfish 3, when I upgrade to 3.1.2, same configuration does not work. According to the previous thread, I have set the JaasContext to jdbcDigestRealm (in addition to jdbcRealm which also does not work), set the Digest Algorithm to MD5 (I used MD5 in v 3 and it worked). For Password Encryption Algorithm I tried ‘blank’, and ‘hex’, both do not work.

Could someone please tell me how I should configure. My credentials table is based on mysql with MD5 hashed passwords according to http://jugojava.blogspot.hk/2011/02/jdbc-security-realm-with-glassfish-and.html.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:45:12+00:00Added an answer on June 12, 2026 at 3:45 pm

    I succeed to make it works with the following settings. I add a few comments with my current (mis)understanding.

    • JAASContext = “jdbcRealm” => The value must be set according to file ‘glassfish3/glassfish/domains/domain1/config/login.conf’. By default, the class ‘com.sun.enterprise.security.auth.login.JDBCLoginModule’ (which implement the JDBCrealm) is configured under “jdbcRealm”. There is another login module configured under “jdbcDigestRealm”. This one is not part of the current topic.
    • JNDI = “…” => I put there the name of a datasource that already
      exists for the database of my application.
    • UserTable = “MY_SCHEMA.usertable” => The ‘full qualified name’ of the
      database table.
    • UserNameColumn = “userid” => column name where you store the user
      name
    • PasswordColumn = “password” => column name where you store the (hash
      of the) user passsword.
    • GroupTable = “MY_SCHEMA.grouptable” => The ‘full qualified name’ of
      the database table.
    • GroupTableUserNameColumn = “” => no clue about the usage of this…
    • GroupNameColumn = “groupid” => column name where you store the user
      name
    • AssignGroups = “” => As far as I understand the GF code, this is a way to assign a list of groups to every user registered in the realm. It’s kind of hard-coding. More or less every realm available on GlassFish (could) make use of this property.
    • DatabaseUser = “” => As I understood, you need this if you aren’t
      using the JNDI (the second parameter).
    • DatabasePassword = “” => As I understood, you need this if you aren’t
      using the JNDI (the second parameter).
    • DigestAlgorithm = “SHA-256” => ‘MD5’, ‘SHA-1’ or ‘SHA-256’. ‘SHA-256’
      is the default. Let’s take ‘SHA-256’.
    • PasswordEncryptionAlgorithm = “AES” => The digest algorithm is applied to the password before storing the password. The new password encryption is an added layer of security which allows the “hash” (the string after the DA has been applied to the password) to be encrypted. In this way, if an attacker retrieves the passwords from the database they are encrypted and hashed. It’s highly unlikely that such data would be useful to an attacker.
    • Encoding = “Hex” => You have the choice between ‘Hex’ or ‘Base64’.
      Hex was convenient for me.
    • Charset = “” => As my database does not have an ‘exotic’ charset, I
      do not think I need to set something smart there. I leave it blank
      and it works.

    Hope it will help.

    PS: If somebody have a link to REAL documentation (not the official one which is completly useless at this moment), please, put a link here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read many answers to questions about dynamically resizing NSWindows and nothing has
I have read few articles about table partioning but still I am bit confused
I have read some of the questions and answers here, but it none match
I have read a bunch of forums on this but none have solved my
I have read something about threadsafety but I want to understand on what operations
I have read in multiple places that final methods are early bound but none
I have seen the same topics here and some topics on other sites, but
Have read thru other source, such as: https://discussions.apple.com/message/7844057#7844057 Seems there is no way to
I have read quite a lot of R docs, but I can't find anything
I have read various posts in stackoverflow and I am trying to figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.