Ask and answer questions about WebRatio, WebML and BPMN

Salve, so che è possibile cifrare le tuple nel database, ma non con sistemi che permettono il decrypt dei dati. Percui la mia domanda è: si puó implementare un algoritmo di cifratura arbitrario? Se si come?

asked 07 Dec '11, 13:35

4ndr34hack's gravatar image

4ndr34hack
0111
accept rate: 0%


Ciao,

potresti provare a creare una classe ed implementare un Hibernate Type estendendo ad esempio StringType e redefinendo i metodi set() e get().

http://www.docjar.com/html/api/org/hibernate/type/StringType.java.html

Nel Data Model occorre selezionare gli Attributi desiderati ed indicare la classe nella Proprietà Hibernate Type nel Tab Mapping del Pannello delle Proprietà

Inoltre potrebbe essere poco significativo aggiungere condizioni sugli Attributi o degli ordinamenti sulle unit perchè i dati saranno criptati.


Hi,

you can try to prepare a class, implement an Hibernate Type which extends the StringType and redefine the set() and get() methods.

http://www.docjar.com/html/api/org/hibernate/type/StringType.java.html

In the Data Model you have to select the Attributes and set your class to the Hibernate Type Property in the Mapping tab in the Properties View.

Moreover Attributes Conditions and sorting are not useful for crypted data.

link

answered 28 Dec '11, 04:51

albertomolinaroli's gravatar image

albertomolin...
63424
accept rate: 62%

Mi sembra una soluzione accettabile. La classe creata, va messa in un progetto java a parte, oppure è possibile creare classi all'interno del progetto web? Webratio mi dà come esempio di inserire com.webratio.acme.Base64StringType ma non trovo tale package da nessuna parte, quindi non so come comportarmi di conseguenza.

(09 Jan, 10:36) 4ndr34hack

La classe java compilata è possibile salvarla nella cartella WebContent del Progetto Web.

Se ad sesempio il progetto corrente è Acme la classe Base64StringType.class andrà salvata in WebContent/WEB-INF/classes/com/webratio/acme

Tale cartella se non è già presente nel Progetto Web è possibile aggiungerla in questo modo: - Selezionare il Progetto nell'elenco presente nella Outline View - dal menu contestuale selezionare WebRatio -> Add WebContent folder

Il Package per la relativa classe com.webratio.acme.Base64StringType è solo un suggerimento, un nome di esempio che propone WebRatio.

(13 Jan, 07:12) albertomolin...

Ciao,

puoi cifrare gli Attributi di tipo Password. Se ad esempio consideri l'Entità User nel Data Model e selezioni l'Attributo "password" puoi impostare l'algoritmo di cifratura da applicare. In questo caso nel Pannello delle Proprietà c'è la voce Crypt Algorithm abilitata. Puoi quindi selezionare un algoritmo tra quelli proposti oppure aggiungerne uno. Cliccando sul pulsante Browse accedi alle Preferenze, qui puoi aggiungere i riferimenti all'algorimo desiderato.


Hi,

you can encrypt the Password Attributes. For example if you consider the User Entity in the Data Model and choose the "password" Attribute you can apply an encryption algorithm. In this case the Crypt Algorithm Property in the Properties View is enabled. Now you can choose the algoritm that you prefer between the shown items or add a new one. Clicking on the Browse button the Preference Window will be opened and here you can add the references to the desired algorithm.

link

answered 21 Dec '11, 03:53

albertomolinaroli's gravatar image

albertomolin...
63424
accept rate: 62%

Si, questo lo so, ma forse non mi sono spiegato. Facciamo l'esempio che ho un db di un sistema anagrafico. Quindi ho un'entità con nome,cognome e data di nascita. Voglio proteggere questi tre valori nel db, ma voglio anche poterci accedere e leggere il contenuto. Nel modo da lei indicato dovrei indicare tutto password, e come gestisco la data? E i tipi blob? E per decifrare quello che ho criptato?

link

answered 21 Dec '11, 04:34

4ndr34hack's gravatar image

4ndr34hack
0111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1
×1

Asked: 07 Dec '11, 13:35

Seen: 412 times

Last updated: 13 Jan, 07:12

Related questions

©2001-2011 Web Models s.r.l. All rights reserved