• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Plugin for Decrypting Data Source Passwords in Jboss

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I ahve already gone thru this.

But I need to use my own encryption-decryption algorithms.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic