Relay server for EDRN DMCC password verification
Project description
🏃 JPL EDRN DMCC Password Relay
This package provides a simple, safe server that listens for usernames and password for the Early Detection Research Network's Data Management and Coordinating Center's so-called "secure site". It uses the center's antique SOAP service to check those passwords, then gives back a single byte response indicating if the password's valid.
It's intended to be used with dmccauth, an overlay to OpenLDAP's standalone slapd server. OpenLDAP overlays must be programmed in C and use dynamically-loaded objects, but SOAP implementations for C are available only as static APIs.
With this running alongside OpenLDAP and the dmccauth
overlay, we can overcome this problem.
💽 Installation
This software requires Python 3. Python 3.9 or later is recommended, but Python 4 is not. Typically, you'll make a virtual environment and install the software with a litany like:
python3 -m venv password-relay
cd password-relay
bin/pip install --upgrade --quiet setuptools wheel pip
bin/pip install password-relay==X.Y.Z
where X.Y.Z
is the version you want. To upgrade an existing installation, add --upgrade
. You can then start the server:
bin/dmcc-passwordrelay
By default, the server creates its listening socket in /tmp/dmcc.socket
. You can customize that with --socket
. Try --help
for all the options.
🩺 Testing
You can see if it's working correctly by running the following from another session:
printf 'USERNAME\PASSWORD\n' | nc -U /tmp/dmcc.socket | more
Replace USERNAME
and PASSWORD
and the socket path if necessary. You'll see a 1
for a valid password, or 0
for invalid.
😈 Daemonizing
The software runs in the foreground and should always be running. However, it supports no automatic restart. For that, it's recommended you run it under Supervisord:
bin/pip install supervisor
Then make a supervisord.conf
similar to the following:
[supervisord]
logfile = %(here)s/var/log/supervisor.log
logfile_backups = 3
loglevel = debug
pidfile = %(here)s/var/supervisor.pid
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[unix_http_server]
file = %(here)s/var/sockets/supervisor
[supervisorctl]
serverurl = unix:%(here)s/var/sockets/supervisor
[program:passwordrelay]
command = %(here)s/.venv/bin/dmcc-passwordrelay --socket %(here)s/var/sockets/dmcc
autorestart = true
🔧 Development
To develop this locally, try the following:
git clone https://github.com/EDRN/jpl.edrn.dmcc.passwordrelay
cd jpl.edrn.dmcc.passwordrelay
python3 -m venv venv
venv/bin/pip install --upgrade --silet setuptools build dist wheel
vnev/bin/pip install --editable .
👥 Contributing
You can start by looking at the open issues, forking the project, and submitting a pull request. You can also contact us by email with suggestions.
🔢 Versioning
We use the SemVer philosophy for versioning this software. For versions available, see the releases made on this project.
👩🎨 Creators
The principal developer is:
📃 License
The project is licensed under the Apache version 2 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jpl.edrn.dmcc.passwordrelay-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f120a8ebdd0e2bd2d42a60f1b70e4271a5829d2b6b07d496412241baab1528b |
|
MD5 | 775d34c20b086c504e94fbbcbc50a38e |
|
BLAKE2b-256 | 10eeec18e4d9f2fec97e9e92b9ef4a2efba6a131a04be307a3e4c3b9c7cda8c1 |
Hashes for jpl.edrn.dmcc.passwordrelay-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b28eaa8727e5fa19270c603d98c28ad4085c7508048a17abfcfda0f1d44154c |
|
MD5 | 0bbfa56c5278a3162ef14f4383dbe797 |
|
BLAKE2b-256 | c5c9172f0f69aae7f3422b84d21d31f5b3e02638aa974278fba24e2c14bd8a8a |