Secure STOMP Messenger (SSM) is designed to simply send messages using the STOMP protocol or via the ARGO Messaging Service (AMS). Messages are signed and may be encrypted during transit. Persistent queues should be used to guarantee delivery.
SSM is written in Python. Packages are available for RHEL 6 and 7, and Ubuntu Trusty.
For more information about SSM, see the EGI wiki.
SSM is provided by STFC, a part of UK Research and Innovation, and is co-funded by the EOSC-hub project (Horizon 2020) under Grant number 777536. Licensed under the Apache 2 License.
The EPEL repository must be enabled. This can be done by installing the RPM for your version of SL, which is available on this page: http://fedoraproject.org/wiki/EPEL You will also need to have the OpenSSL library installed. Other prerequisites are listed below.
The Python STOMP library (N.B. versions between 3.1.1 (inclusive) and 5.0.0 (exclusive) are currently supported)
yum install stomppyThe Python AMS library. This is only required if you want to use AMS. See here for details on obtaining an RPM: https://github.com/ARGOeu/argo-ams-library/
The Python daemon library
yum install python-daemonThe Python ldap library
yum install python-ldapOptionally, the Python dirq library (N.B. this is only required if your messages are stored in a dirq structure)
yum install python-dirqYou need a certificate and key in PEM format accessible to the SSM. There are a number of ways to do this. One is to make a copy of the hostcert and hostkey files, owned by the apel user (created later):
You need certificates against which you're going to verify any certs you use or receive in the directory /etc/grid-security/certificates (or other configured location). The best way to do this for EGI is to install the ca-policy-egi-core package:
cd /etc/yum.repos.d/wget http://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI-trustanchors.repoyum install ca-policy-egi-coreIf you want to check CRLs when verifying certificates, you need fetch_crl installed:
yum install fetch-crlservice fetch-crl-cron startchkconfig fetch-crl-cron onfetch-crl must have run once for the certificates to be verified successfully.
rpm -i apelssm-<version>.noarch.rpmThe RPM carries out a number of steps to run the SSM in a specific way.
Install APEL SSM:
dpkg -i apel-ssm_<version>_all.debInstall any missing system packages needed for the SSM:
apt-get -f installInstall any missing Python requirements that don't have system packages:
pip install "stomp.py<5.0.0" dirqIf you wish to run the SSM as a receiver, you will also need to install the python-daemon system package:
apt-get install python-daemonThe DEB carries out a number of steps to run the SSM in a specific way.
Create the apel user:
useradd -r apelEnsure that the apel user running the SSM has access to the following:
chown apel:apel /var/spool/apel/chown apel:apel /var/log/apel/chown apel:apel /var/run/apelThe configuration files are in /etc/apel/. The default configuration will send messages to the test APEL server.
There are multiple manual and programmatic ways to add files to be sent:
All file and directory names must use hex characters: [0-9a-f].
123456781234567890abcdEnsure path_type: directory is set in your sender.cfg.
Then add messages as files to /var/spool/apel/outgoing,
there are no restrictions on the file names used.
Use the Python or Perl dirq libraries:
Create a QueueSimple object with path /var/spool/apel/outgoing/ and add your messages.
Use the MessageDirectory class provided in ssm.message_directory.
Create a MessageDirectory object with path /var/spool/apel/outgoing/ and
add your messages using the add method.
/etc/apel/sender.cfg, as per the migration instructions with some minor differences:
[sender] section as it already exists. Instead change the protocol to AMS.ams_project to the appropriate project.sender.cfg file as above for sending either via the EGI message brokers or the ARGO Messaging Service.docker run \
-d --entrypoint ssmsend \
-v /path/to/downloaded/config/sender.cfg:/etc/apel/sender.cfg \
-v /path/to/read/messages:/var/spool/apel/outgoing \
-v /etc/grid-security:/etc/grid-security \
-v /path/to/persistently/log:/var/log/apel \
stfc/ssm
-v /path/to/persistently/log:/var/log/apel \ is only required if you want to access the sender log as a file. If console: true is set in your sender.cfg, the container will also log to stdout/stderr.service apelssm startservice apelssm stopdocker run \
-d --entrypoint ssmreceive \
-v /path/to/downloaded/config/sender.cfg:/etc/apel/sender.cfg \
-v /path/to/read/messages:/var/spool/apel/outgoing \
-v /path/to/dns/file:/etc/apel/dns \
-v /etc/grid-security:/etc/grid-security \
-v /path/to/persistently/log:/var/log/apel \
stfc/ssm
-v /path/to/persistently/log:/var/log/apel \ is only required if you want to access the receiver log as a file. If console: true is set in your receiver.cfg, the container will also log to stdout/stderr.'kill `cat /var/run/apel/ssm.pid`'/etc/apel/receiver.cfg, as per the migration instructions with some minor differences:
[receiver] section as it already exists. Instead change the protocol to AMS.ams_project to the appropriate project.rpm -e apelssmyum remove stomppy
yum remove python-daemon
yum remove python-ldap
rm -rf /var/spool/apel
rm -rf /var/log/apel
rm -rf /var/run/apel
revert any changes to or copies of the host certificate and key
Content type
Image
Digest
Size
334.6 MB
Last updated
about 5 years ago
docker pull gregcorbett/ssm:github_actions_docker