This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Plugin for Decrypting Data Source Passwords in Jboss

 
P Lavti
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am using Jboss4.0.4 GA server and My SQL as DB.
I can not not use cleartext password in mysql-ds.xml.

I have my own encryption and decryption API for the same.

Could you please let me know how to write an plugin for Jboss which will use my decryption API to decrypt the data source password and provide me the connection pooling for MySQL.

Thanks!
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by P Lavti:


I am using Jboss4.0.4 GA server and My SQL as DB.
I can not not use cleartext password in mysql-ds.xml.

I have my own encryption and decryption API for the same.



Actually, JBoss provides a way to encrypt your datasource passwords. Have a look at EncryptingDataSourcePasswords
 
P Lavti
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I ahve already gone thru this.

But I need to use my own encryption-decryption algorithms.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the same mechanism, but write your own login module using the SecureIdentityLoginModule as a template. It is the login module that employs the en/decryption algorithms.
 
P Lavti
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter.

I tried it using the SecureIdentityLoginModule as template for my class, and its working fine as well.

The only issue is I need to keep my custom class also in the same package "org.jboss.resource.security" else i'll get compiler error. I am not sure if its acceptable. Any suggetions!!!

Thanks!
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by P Lavti:



The only issue is I need to keep my custom class also in the same package "org.jboss.resource.security" else i'll get compiler error. I am not sure if its acceptable. Any suggetions!!!



What error do you get? Can you post it? Is it a compiler error or a classloader error (when JBoss is starting)?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no problem with keeping your class in that same package - but you should package your class in your own jar.
 
P Lavti
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jaikiran Pai:


What error do you get? Can you post it? Is it a compiler error or a classloader error (when JBoss is starting)?


For the import of org.jboss.resource.security.SubjectActions, I get the compiler error "The type org.jboss.resource.security.SubjectActions is not visible", since SubjectActions has visibility only within the package. By keeping my custome class in package "org.jboss.resource.security" removes the error.

Originally posted by Peter Johnson:


There is no problem with keeping your class in that same package - but you should package your class in your own jar.


I have kept it in my own jar

Thanks!
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter Johnson:
There is no problem with keeping your class in that same package - but you should package your class in your own jar.


I don't exactly know how the licenses work, but I always thought, creating your own class under the org.jboss package wasn't (legally) allowed. Isn't that the case?
 
P Lavti
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what actually my next question was.

Having my custom class in the same package and then using it in production, Is it legal?

If not, then what kind off licencing formalities are required?

Otherwise I need write complete login module itself.

Thanks!
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic