[JBoss-user] [Security & JAAS/JBoss] - Re: JAAS: How Can I encrypt a password?
I solved it in this way. First download a JCrypt source code from: http://locutus.kingwoodcable.com/jfd/crypt.html Add to that code the following function: public static boolean isPasswordOK(String strCryptedPassword, String strPasswordToVerify) | { | String strVerif = JCrypt.crypt(strCryptedPassword,strPasswordToVerify); | return strVerif.equals(strCryptedPassword); | } And afterwards create a new class that extends from DatabaseServerLoginModule. Mine is: | public class JCryptDatabaseServerLoginModule extends DatabaseServerLoginModule | { | | /** A hook that allows subclasses to change the validation of the input | password against the expected password. This version checks that | neither inputPassword or expectedPassword are null that that | inputPassword.equals(expectedPassword) is true; | @return true if the inputPassword is valid, false otherwise. | */ | protected boolean validatePassword(String inputPassword, String expectedPassword) | { |if( inputPassword == null || expectedPassword == null ) | return false; |return JCrypt.isPasswordOK(inputPassword,expectedPassword); | } | } [/url] View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835641#3835641 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835641 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS & JBossMQ] - JDBCStateManager. Modifiying the default config seems not to
JBoss 3.2.4RC2 In the file: hssql-jdbc-state-service.xml the default config is: | | jboss.jca:service=LocalTxCM,name=DefaultDS | ... If I change the DefaultDS and I use there my datasource for sqlserver (I'm sure that the datasource works properly), for example: | | jboss.jca:service=LocalTxCM,name=MSSQLDS | ... It creates the tables in the DB and seems to work ok. After that I modified the login-config.xml in order to use the same datasource, so I wrote: | | | | guest | java:/MSSQLDS | SELECT PASSWD FROM JMS_USERS WHERE USERID=? | SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=? | | | But it still tries to recover user and password from the hssql database, that is from the default datasource DefaultDS. Is that a bug, or I have to modify anything else? Thanks in advance View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835219#3835219 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835219 --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user