Alfresco connector configuration
Pre-requisites
Check https://github.com/maoo/alfresco-indexer and https://github.com/Alfresco/alfresco-indexer for potential updates (else you’ll need to tune it yourself).
The rest of this document suppose that alfresco is installed in /opt/alfresco, please adapt paths whenever needed to suite your own installation.
Preparation
First, you need to install the Alfresco Module Package (AMP) alfresco-indexer-webscripts-x.amp provided in the ManifoldCF distribution plugin folder (plugins/alfresco-webscript) : https://manifoldcf.apache.org/en_US/download.html.
Copy the amp file into the alfresco installation amps directory (/opt/alfresco/amps).
Stop alfresco:
/opt/alfresco/alfresco.sh stopÂ
Install the amp
The amp file may need to override some of the libraries contained in the alfresco war to complete the installation process. It is not allowed by default by the installer script, so we will need to force the installation. Although the installation scripts make backups of the libraries overridden in the war itself, we would recommend backing up the war before doing the installation anyway.
cp /opt/alfresco/tomcat/webapps/alfresco.war /backup_location/alfresco.war.bakÂ
Then you can install the amp file into the war
/opt/alfresco/java/bin/java -jar /opt/afresco/bin/alfresco-mmt.jar install /opt/alfresco/amps/alfresco-indexer-webscripts-0.8.1.amp /opt/alfresco/tomcat/webapps/alfresco.war -force
It is recommended to clear out temporary files from Tomcat before restarting Alfresco. So, remove the files in the work and temp directory of tomcat (the script /opt/alfresco/bin/clean_tomcat.sh can give you hints about the file to remove, although all the files mentioned there were not existing on the system when I did the test. The script must be run from /opt/alfresco to work).
You can check that the newly added amp has been correctly added to the war by running
Be aware that this does not guarantee that it will be working.
As tomcat un-compresses the war archive at the first startup only and uses the un-compressed version directly for subsequent startups, you must remove the un-compressed version of alfresco from the tomcat directory so that the new war is un-compressed and used at the next startup
Finally, you can start alfresco again
Check https://docs.alfresco.com/5.2/tasks/amp-install.html for the alfresco documentation on amp installation.
Checking if the extension works and troubleshooting
If  you go to http://<server_address>:<port>/alfresco/service/index/uri/ (the forward slash at the end is mandatory, you’ll get a 404 if you don’t put it) you should be able to find an entry /auth/resolve/{username} in the list (it is an alphabetical list).
If you happen to try to configure an MCF authentication connector with the webscript no running properly, you will likely end up with an error as shown below:
This is because the connector expects a JSON response and the alfresco is giving a 404 html page as the response to the query. This is not handled properly in the connector, leading to an exception. You need to debug why the webscript doesn’t work.