Package: jpl.edrn.dmcc.passwordrelay
🏃 JPL EDRN DMCC Password RelayThis package provides a simple, safe server that listens for usernames and password for theEarly Detection Research Network's Data Management and Coordinating Center's so-called "secure site". It uses the center's antiqueSOAPservice to check those passwords, then gives back a single byte response indicating if the password's valid.It's intended to be used withdmccauth, anoverlaytoOpenLDAP's standaloneslapdserver. OpenLDAP overlays must be programmed in C and use dynamically-loaded objects, butSOAP implementations for Care available only as static APIs.With this running alongside OpenLDAP and thedmccauthoverlay, we can overcome this problem.💽 InstallationThis 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.ZwhereX.Y.Zis the version you want. To upgrade an existing installation, add--upgrade. You can then start the server:bin/dmcc-passwordrelayBy default, the server creates its listening socket in/tmp/dmcc.socket. You can customize that with--socket. Try--helpfor all the options.🩺 TestingYou can see if it's working correctly by running the following from another session:printf 'DN\nPASSWORD\n' | nc -U /tmp/dmcc.socket | moreReplaceDNwith the LDAP distinguished name of an EDRN "secure site" account such asuid=joeschmoe,dc=edrn,dc=jpl,dc=nasa,dc=govandPASSWORDand the socket path if necessary. You'll see a1for a valid password, or0for invalid.👉Note:Nonc -Uon your system? Try installingnetcat-openbsdfor it; or usesocatinstead.😈 DaemonizingThe software runs in the foreground and should always be running. However, it supports no automatic restart. For that, it's recommended you run it underSupervisord:bin/pip install supervisorThen make asupervisord.confsimilar 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
redirect_stderr = true
stdout_logfile = %(here)s/var/log/relay.log🔧 DevelopmentTo 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 .👥 ContributingYou can start by looking at theopen issues, forking the project, and submitting a pull request. You can alsocontact us by emailwith suggestions.🔢 VersioningWe use theSemVerphilosophy for versioning this software. For versions available, see thereleases madeon this project.👩‍🎨 CreatorsThe principal developer is:Sean Kelly📃 LicenseThe project is licensed under theApache version 2license.