-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
Author Message
 Post subject: Encryption Process
PostPosted: Wed Nov 24, 2004 11:41 am 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
One of my customers asks me for encrypting the content of the database at the application level :

> insert into mytable (name) values ('Roger')
becomes transparently
> insert into mytable (name) values ('Xc6


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 11:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use a custom UserType


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 12:27 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
In fact, I'd like not to touch to my code. I would hope a transparent encryption layer solution ....


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 12:52 pm 
Beginner
Beginner

Joined: Mon Aug 16, 2004 6:15 am
Posts: 24
As Michael said, a custom UserType is perfect for what you want to achieve.

This keeps your business code happily working with the unencrypted data, but as soon as it gets persisted it gets encrypted. On reading it will be decrypted for you.

Check out the patterns pages http://www.hibernate.org/40.html for more information on creating UserTypes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 1:13 pm 
Regular
Regular

Joined: Thu Oct 07, 2004 4:45 pm
Posts: 92
I have a similar need in my application. I'd already planned to use a UserType, but can anyone recommend a good encryption library for stuff like this? (Sorry, not really a Hibernate question.)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 2:08 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
CSwinney wrote:
As Michael said, a custom UserType is perfect for what you want to achieve.

This keeps your business code happily working with the unencrypted data, but as soon as it gets persisted it gets encrypted. On reading it will be decrypted for you.

Check out the patterns pages http://www.hibernate.org/40.html for more information on creating UserTypes.


Hum, I don't understand very well the process. Do you mean I have to change every standard hibernate type to specific UserType types to handle the encryption/decryption process ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 2:21 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You could look it up in the reference documentation.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 2:48 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
Ok, what I have understood is to replace in my mapping file the regular hibernate types with mine implementing UserType :
- EncryptedStringType
- EncryptedIntegerType
....
Was it what you thought about ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 2:54 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Of course.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 3:23 pm 
Regular
Regular

Joined: Fri Jul 16, 2004 3:04 pm
Posts: 52
Location: Wiltshire UK
rhasselbaum wrote:
I have a similar need in my application. I'd already planned to use a UserType, but can anyone recommend a good encryption library for stuff like this? (Sorry, not really a Hibernate question.)


http://java.sun.com/products/jce/index-14.html

Paul :-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 3:29 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
christian wrote:
Of course.

Ok, so it's not so transparent, I have to recode even it's not so tedious.
For thoses interested, I've found this solution that is really a transparent encryption layer : http://www.safelogic.com/en_api_jdbc_en ... e_sql.html
Richard


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.