cancel
Showing results for 
Search instead for 
Did you mean: 

Encryption in Alfresco

n_pancholi87
Champ in-the-making
Champ in-the-making
There were problems in using the version of IDEALX plugin available on the internet for encryption in alfresco hence some steps to make it easier.
The following works well with Alfresco community version 3.3.


1). Download the plugin - IDEALX from source forge. (IDX-eDOC-1.0). This would be a zip file, extract it and make changes to the code acc to the following.

2). Open the file '<Plugin-Folder>/sources/src/com/idx/edoc/plugins/decipher/DecipherDialog.java' - add lines:

/** node service object*/
protected NodeService nodeService;

in between the following two lines:

           protected ContentService contentService;

           /** The name space property */
   
   This code would come under the definition of the class DecipherDialog extends BaseDialogBean

3). Go the 'sources' directory (containing 'build.xml' file) in the plugin folder and type the command on the terminal:

  –> ant package-extension

      This generates a zip file, located in the 'sources/plugin' directory and would create the required jar file in 'sources/build' containing the class file for the above java code.

4). Make changes in extension/encipher.jsp as follows:
   Change the variable acceptCharset to acceptcharset

5). Make the required changes in the files mimetype-map.xml and webclient.properties in the Alfresco installation folder as follows:
   copy the contents of samples/pkcs5-mimetype-map-extension.xml.sample to 'tomcat/webapps/alfresco/WEB-INF/classes/alfresco/mimetype/mimetype-map.xml'

         <mimetype mimetype="application/pkcs5" display="PasswordBasedEncryption">
           <extension>pkcs5</extension>
         </mimetype>

   copy the contents of samples/webclient.properties to 'tomcat/webapps/alfresco/WEB-INF/classes/alfresco'

         ################################################################
         # Add to webclient.properties                                  #
         # to integrate the messages for the decryption plugin          #
         ################################################################


         #####################################
         # Encipher Action Messages          #
         #####################################
         title_action_cipher=Cipher Action
         passphrase=Enter the passphrase
         passphrase_explanation=(This passphrase participates in the content encryption)
         content_cipher=Content encrypted with passphrase
         #####################################
         # Decipher Dialog Messages          #
         #####################################
         decipher=Enter the passphrase
         decrypt_dialog=Decrypt to my home
         decrypt_dialog_title=Decrypt the content
         decrypt_dialog_description=Decrypt an encrypted content into user's home space
         decrypt_dialog_errors_passphrase=Wrong passphrase
         decrypt_dialog_errors_notencrypted=This content was not encrypted
         decrypt_dialog_file_already_exists=This content already exists


6). Extract the contents of zip file in 'tomcat/webapps/alfresco' folder, it will merge images, jsp and WEB-NF/lib


7). Start/Restart Alfresco server. If installation was successful, the encryption action “crypt content” will be visible in the drop down list for actions in Alfresco instance.
4 REPLIES 4

amameda
Champ in-the-making
Champ in-the-making
I was able to encrypt a document but I can not find the decrypt  action on alfresco. Can you help me on this.Thanks!

n_pancholi87
Champ in-the-making
Champ in-the-making
Decrypt action comes under the details view for the enrypted document itself.

mitpatoliya
Star Collaborator
Star Collaborator
Hello,
We are facing some problem with the same setup.
Our decryption was working fine but some how after some days for zip file at the time of decryption it is giving following error.
Caused by: javax.crypto.BadPaddingException: pad block corrupted
   at org.bouncycastle.jce.provider.JCEBlockCipher.engineDoFinal(Unknown Source)
   at javax.crypto.Cipher.doFinal(DashoA13*..)
   at com.idx.edoc.pbe.PBEImplSymCipher.decrypt(PBEImplSymCipher.java:119)

Have you ever faced this?
Any idea how to solve this?

hi

I have downloaded the IDEALX plugin for encryption in alfresco. I am able to encrypt document by defining a rule (in create rule dialog i am getting crypt content option) but i am not getting dcrypt option in detiailed view.


Please help me with this.

Regards,
Nancy