• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tomcat using same user+password

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,
I have a small app running in tomcat and I need a forum. I chose JForum and now I want the users that have access to JForum to be mapped to my Tomcat app..
I was able to configure my Tomcat to work with a mysql temp database holding username+password+role(group).

Now my problem: the userpassword is encypted and now it�s not workin anymore...

This is what I found but I don�t know how to use.....

Using digested passwords

To use digested password you need to store them digested. To achieve this, you will need to use the same digest strategies that JDBCrealm uses to store the passwords. Iinside JDBCRealm there is a static method with signature final public static String digest(String password,String algorithm). This method is provided as a tool to be used outside JDBCRealm by an application that wants to generate digested passwords readable by JDBCRealm.

The class JDBCRealm contains a main method, so it can be used as an application to generate digests and print them to stdout. Usage is:
java org.apache.tomcat.modules.aaa.RealmBase -a <algorithm> <password> [<password> ...]
where <algorithm> is a supported message digest algorithm, e.g. MD5, and <password> is a plaintext password to be digested.

Note: the jar where RealmBase class can be found is %TOMCAT_HOME%/lib/container/tomcat_modules.jar



What gigest alg is used?
THX
[originally posted on jforum.net by masjabb]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hm... but for what are you trying to use that? JForum has its own user management, as well mysql, so this tomcat configuration don't affect them.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

I want to use the users(and groups) from the forum to get access to my app.

If you are a user in the forum an you are for instance member of the admin-group than you should be able to get access to my app with the same username and group(role).

I want my app to take it�s users from the mysql database that�s holds the users from the app.

[originally posted on jforum.net by masjabb]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to use the smae user database of JForum, you should authenticate against the table jforum_users, field username and user_password. The password is hashed using MD5.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic