You are here

Encrypting passwords

Encrypt all passwords used in the alfresco-global.properties by the SAP Connector instead of storing it as plain-text.
Make sure the SAP Connector is configured properly and working as expected.
  1. Go to the Alfresco Support Portal.
  2. Download the related JAR file:

    sap-content-connector-encryptor-1.0.jar
  3. Create a public key and private key:

    Navigate to the folder of the downloaded JAR and run the following command to create the key pair in the current path:

    java –jar sap-content-connector-encryptor-1.0.jar init -path .

    Two files are created:

    • sapContentConnectorPrivateKey.pri (private key)
    • sapContentConnectorPublicKey.pub (public key)
  4. Create an encrypted password:

    java -jar sap-content-connector-encryptor-1.0.jar encrypt -password H3ll0W0rlD112! -publicKey ./sapContentConnectorPublicKey.pub

    The encrypted password will be printed to the console, for example:

    ENC(XbfE4Z112==)

    Since it's already surrounded by the required ENC() function, it can be copied and used as-is.

  5. Upload the private key file to Alfresco Content Services.

    To be able to resolve the password, the previously created private key (sapContentConnectorPrivateKey.pri) must be uploaded to the application server root directory (such as /usr/local/tomcat/sapContentConnectorPrivateKey.pri).

  6. Provide encrypted password.

    To use the encrypted password, paste it as a value for the required properties in the alfresco-global.properties file.

    For example:

    integrations.sap.system.1.al.alfrescoPassword = ENC(XbfE4Z112==)
  7. Restart the application server since alfresco-global.properties has changed.
The passwords are now encrypted and not plain-text.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.