Files
jump-host/nodejs/bin/www
T
wmantly 36e9d5b0b3 feat: initial jump-host — SSH jump host for the theta42 stack
An SSH jump host that authenticates users against the shared LDAP
directory, authorizes them from the SSO Manager's inventory graph, and
bridges them to downstream hosts — auditing everything.

- Username-grammar routing (uid_-_target@jump) + interactive TUI picker
- Inbound LDAP auth (publickey / password with off|local|all policy)
- Directory-driven access (LDAP groups x /api/discovery/resources?group=)
- Per-user key injection into sshPublicKey, connects downstream as the user
- Shell / exec / SFTP-subsystem bridging (WinSCP works)
- Web UI + HTTP API (:3002) for audit + metrics; LDAP-admin gated
- Packaged like proxy: ops/install.sh + systemd, all-in-one Docker, compose
- Tests: 23 unit + 3 integration (node --test), all green

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:48:49 -04:00

32 lines
824 B
JavaScript

#!/usr/bin/env node
'use strict';
// Boots BOTH faces of the jump host: the SSH front door (services/ssh_server)
// and the web UI/API (app.js). One process, one redis, shared audit store.
const http = require('http');
const conf = require('@simpleworkjs/conf');
require('../models'); // wire model-redis + register models
const app = require('../app');
const sshServer = require('../services/ssh_server');
// Web server
const webPort = (conf.web && conf.web.port) || 3002;
const server = http.createServer(app);
server.listen(webPort, () => {
console.log(`[web] jump-host UI/API on :${server.address().port}`);
});
// SSH server
sshServer.start();
function shutdown() {
console.log('[jump-host] shutting down');
server.close();
process.exit(0);
}
process.on('SIGTERM', shutdown);
process.on('SIGINT', shutdown);