AnsweredAssumed Answered

Encryption in Alfresco

Question asked by n_pancholi87 on Sep 15, 2010
Latest reply on Jun 19, 2015 by nancyaggarwal
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.

Outcomes