The EPR Assertion Provider MockUp is a SoapUI webservice (mock) that provides SAML Assertion when requested. The Assertion Provider is based on a backend Java library net.ihe.gazelle.XUAGenerator that need to be deployed on the running SoapUI.
git clone https://gitlab.inria.fr/gazelle/specific-tools/epr/assertion-provider.git $SAMLGENERATOR_DIR
Build the projet
cd $SAMLGENERATOR_DIR
mvn clean package
Copy the jar into the external SoapUI intallation dir
cp target/epr-saml-generator-X.X.X-jar-with-dependencies.jar $SOAPUI_INSTALL_DIR/bin/ext/.
svn checkout https://svn.ihe-europe.net/gazelle/EPD/trunk/epr-assertion-provider-mockup/ $EPR_AP_MOCK_DIR
Copy the external jars (esapi, velocity and postgresql)
cp $EPR_AP_MOCK_DIR/external_jar/esapi-2.1.0.1.jar $SOAPUI_INSTALL_DIR/lib/
cp $EPR_AP_MOCK_DIR/external_jar/velocity-1.7.jar $SOAPUI_INSTALL_DIR/lib/
cp $EPR_AP_MOCK_DIR/external_jar/postgresql-9.3-1102.jdbc4.jar $SOAPUI_INSTALL_DIR/lib/
Database is not mandatory, but if not configured, it will raise log errors for each recieving request.
psql -U gazelle postgres
> CREATE DATABASE "assertion-provider" OWNER gazelle ;
> \q
psql -U gazelle assertion-provider < $EPR_AP_MOCK_DIR/sql/schema.sql
Edit the init.d script $EPR_AP_MOCK_DIR/init.d/assertionProviderMock
and set the following environment variables
Type the following commands register the init.d script as service
sudo cp $EPR_AP_MOCK_DIR/init.d/assertionProviderMock /etc/init.d/assertionProviderMock
sudo chmod u+x /etc/init.d/assertionProviderMock
sudo chmod 775 /etc/init.d/assertionProviderMock
If you want the service to start at each machine start up
sudo update-rc.d assertionProviderMock defaults
Be careful to allow the service to write logs into your target directory. As example
sudo mkdir /var/log/soapui
sudo chmod 775 /var/log/soapui
To run the mock
sudo /etc/init.d/assertionProviderMock start
To stop the mock
sudo /etc/init.d/assertionProviderMock stop
To get status of the mock
sudo /etc/init.d/assertionProviderMock status
You might need to install those following packets
sudo apt-get install -y libxrender1 libxtst6 libxi6
You might need to resolve errors when starting the mock
sudo mv /root/.soapuios/ /root/.soapuios_old