Hi Puneeth, welcome to the jPOS users list.
If you are using jpos DB to access hibernate, all you have to do to obfuscate the password is to get an obfuscated value by running:
q2> obf mypassword
obf::aji0cwAAABXjIDkTc/RwOziQL3vsNCqxg49sa2hM9lz4+smcKvQlaZXPOv8=
And then just
put that returned value in the db.properties
file, e.g., if the line looked like this:
hibernate.connection.password=mypassword
Then, all you need to do is to replace it by:
hibernate.connection.password=obf::aji0cwAAABXjIDkTc/RwOziQL3vsNCqxg49sa2hM9lz4+smcKvQlaZXPOv8=
If you are
using hibernate in another way, you would somehow need to call Environment.getProperty()
before passing the properties to hibernate if you want to use
this jPOS support for that.
That said, keep in mind that obfuscation is just that, obfuscation, not encryption nor secure. It just hides the password from being displayed in plain, but anyone with jPOS sources will be able to get the original value, just as jPOS does.
I will leave the best practices part to people with more practical experience in this matter.
Andrés Alcarraz
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jpos-users/CAAirsO%2Bb3Vjfep54uf0s2T9sFav6OMQ%3Dm_uuianiwX%2B6X%2BBisQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/jpos-users/76b6ec77-93ea-4535-a5bd-149bf6119a96%40gmail.com.
If you could share a toy repository or zip file where you just configure a known simple password, and a script to create the db we could try to replicate the issue.
But for now, I
noticed you entered the exact obfuscated text that I shared to
you, which does not correspond to mypassword
.
I just copied it from the tutorial, which used mySuperSecurePassword
,
but I can not confirm it is the associated password, can you
describe the exact steps you followed?
Andrés Alcarraz
To view this discussion visit https://groups.google.com/d/msgid/jpos-users/CAAirsOKskkU68T-tos-%3DfCCX%3DwH5uwYbRy%2BXuMds_nDaadAW4Q%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/jpos-users/7a7fe79f-4d1e-4c95-816b-9a8e2024fe20n%40googlegroups.com.