https://github.com/rupivbluegreen/omni-sag
Omni-SAG β auditable Linux privileged-access gateway (SSH + SFTP): AD+MFA, single-dialer authz, tamper-evident evidence chain, recording, ICAP inspection, CyberArk injection, four-eyes approvals, control-plane API/TUI. Go modular monolith.
https://github.com/rupivbluegreen/omni-sag
audit-log bastion devsecops golang pam privileged-access security sftp ssh ssh-gateway zero-trust
Last synced: 8 days ago
JSON representation
Omni-SAG β auditable Linux privileged-access gateway (SSH + SFTP): AD+MFA, single-dialer authz, tamper-evident evidence chain, recording, ICAP inspection, CyberArk injection, four-eyes approvals, control-plane API/TUI. Go modular monolith.
- Host: GitHub
- URL: https://github.com/rupivbluegreen/omni-sag
- Owner: rupivbluegreen
- License: mit
- Created: 2026-07-14T08:04:33.000Z (9 days ago)
- Default Branch: master
- Last Pushed: 2026-07-14T13:06:31.000Z (9 days ago)
- Last Synced: 2026-07-14T15:07:30.030Z (9 days ago)
- Topics: audit-log, bastion, devsecops, golang, pam, privileged-access, security, sftp, ssh, ssh-gateway, zero-trust
- Language: Go
- Homepage: https://rupivbluegreen.github.io/omni-sag/
- Size: 949 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README

### the SSH bastion that keeps the receipts
*Your servers' bouncer. Every login checked, every tunnel authorized, every byte accounted for β
with a tamper-evident paper trail you can verify offline, even with the gateway switched off.*
[](https://github.com/rupivbluegreen/omni-sag/actions/workflows/ci.yml)
[](LICENSE)
[](go.mod)
[](docs/audit/fail-closed-matrix.md)
[](#-how-it-was-built)
[](CONTRIBUTING.md)
**[π Website](https://rupivbluegreen.github.io/omni-sag/) Β· [π Quickstart](#-60-seconds-to-whoa) Β· [π§Ύ Audit pack](docs/audit/) Β· [πΊοΈ Roadmap](#οΈ-roadmap)**
---
## π What even is this?
Point your team at **Omni-SAG** instead of straight at your boxes. It authenticates them against
Active Directory (with MFA), decides what they're allowed to reach, and writes down *everything* in
a way nobody can quietly edit later. The default answer is always **no** β access is something you
earn, per connection.
It's **open source**, built in the open for anyone who thinks privileged access should come with
receipts. No enterprise sales call required. π
```console
$ ssh -L 5432:db1.lab.local:5432 alice@gateway # alice β dba
β ALLOWED Β· role=dba Β· tunnel open Β· evidence: tunnel_decision allow=true
$ ssh -L 5432:db1.lab.local:5432 bob@gateway # bob β dba
β administratively prohibited Β· evidence: tunnel_decision allow=false
$ omni-verify -bundle ./evidence -pubkey $KEY
PASS β evidence bundle is intact and authentic.
# flip one byteβ¦
FAIL β TAMPER: record hash mismatch. loudly.
```
That's not a mockup β it's a real recorded run: **[βΆ watch it live](https://rupivbluegreen.github.io/omni-sag/#start)**
(same lab, same two users, same tamper β the raw [asciicast](docs/assets/demo.cast) is in the repo too).
## β¨ Features
| | |
|---|---|
| π **AD + MFA** | LDAPS against Active Directory, then RADIUS MS-CHAPv2 (never PAP). |
| π― **One dialer, one rule** | A single authorized path to targets, with an **SSRF guard** (blocks the metadata IP, loopback, DNS rebinding). |
| π§Ύ **Tamper-evident evidence** | Per-emitter epoch+sequence, Merkle chain, Ed25519 signed checkpoints, WORM archive β verify offline with `omni-verify`. |
| π₯ **Session recording** | Asciicast recording (replay in the TUI). Forwarding is **refused** on must-record targets. |
| π¦ **Content inspection** | SFTP uploads streamed through ICAP (AV/DLP). Blocked or unscannable β quarantined, transfer refused. |
| π **CyberArk injection** | Just-in-time secret fetch; the user never sees it. Vault down = refused. **No silent downgrade.** |
| π **Four-eyes approvals** | Crown-jewel targets block until a *second* human approves (never yourself). Live supervision + kill switch. |
| π°οΈ **API + TUI** | OpenAPI control plane + a Bubble Tea terminal UI. Kill the API? SSH keeps running β it's genuinely out-of-band. |
| π¦ **Ships nicely** | UBI9 non-root image, Helm chart (restricted-v2), graceful drain, Prometheus metrics, SBOM + cosign, FIPS mode. |
## π 60 seconds to "whoa"
Spins up a throwaway lab (Samba AD, MinIO, FreeRADIUS), then two SSH users where only the DBA gets
the tunnel β with both attempts in the evidence log.
```bash
git clone https://github.com/rupivbluegreen/omni-sag
cd omni-sag
make lab-up # samba-AD + MinIO + FreeRADIUS
make lab-seed # create alice (dba) and bob (not)
make binaries # build omni-sag, omnisag-ctl, omni-verify
./bin/omni-sag_linux_amd64 -config deploy/compose/config.example.yaml
# ssh -L 5432:db1.lab.local:5432 alice@gw β allowed
# ssh -L 5432:db1.lab.local:5432 bob@gw β administratively prohibited
# ./bin/omni-verify_linux_amd64 -bundle ./evidence β PASS (tamper a byte β FAIL)
```
Requirements: **Go 1.25+**, **Docker** (for the lab), and an SSH client. `make lab-down` to clean up.
## π§ How it works
A **modular monolith** with CI-enforced package boundaries β comprehensible, without the
distributed-systems tax.
```
client ββsshβββΆ [ session ] βββΆ authn + ratelimit βββΆ policy βββΆ [ dialer ] βββΆ target
β β (the ONLY socket to a target,
βΌ βΌ authorized + SSRF-guarded first)
[ evidence ] ββ hash-chain Β· Merkle Β· Ed25519 Β· WORM βββΆ omni-verify (offline)
β β β β β β β β β β β β β out-of-band control plane β β β β β β β β β β β β β β β
operator ββmTLSβββΆ [ api ] βββΆ sessions Β· policy Β· approvals Β· supervision
β² (the data path never imports this)
omnisag-ctl / TUI
```
**Load-bearing invariants** (each CI- or test-enforced):
1. **Single dialer** β only `internal/dialer` opens sockets to targets, authorized *before* the socket.
2. **Fail closed** β any dependency failure denies. Proven by a [29-row fail-closed matrix](docs/audit/fail-closed-matrix.md).
3. **No silent credential downgrade** β `inject` failure refuses; never falls back to prompt/passthrough.
4. **Evidence is non-optional & tamper-evident** β and emit errors are surfaced, never swallowed.
5. **Secrets never become Go strings** β `[]byte` only, zeroized ([ADR-0001](docs/decisions/0001-mlock-free-credential-handling.md)).
6. **Four-eyes** β approver β requester, server-side, durable across restarts.
7. **Control plane out-of-band** β kill the API, SSH keeps serving. (It's a test, not a slogan.)
## ποΈ How it was built
13 thin slices, **0 β GA**, each one demoable on its own β no five-half-finished-branches energy.
Every slice went through an **adversarial review gate** before the next one started, and a few of
those reviews caught real bugs. That's the point.
- **6** real bugs caught by review/hardening (an ICAP OOM, a policy-eval contract slip, an
inspection fail-open, an SFTP inspection-gap bypass, β¦) β all fixed, all regression-locked.
- A final **12-auditor sweep** (adversarially verified) before calling it v1.
- Full story + slice map on the [website](https://rupivbluegreen.github.io/omni-sag/) and in
[`docs/audit/`](docs/audit/).
## πΊοΈ Roadmap
- **v1 (here):** SSH + SFTP, AD+MFA, dialer authz, evidence chain, recording, inspection,
CyberArk, approvals, API + TUI + packaging. β
- **v1.x:** real SFTP backend & target-shell proxy, SSH certificate authority, Kerberos/GSSAPI,
OIDC-primary MFA, CRD informers, TLS-config FIPS routing.
- **v2:** RDP (native mstsc, then browser RDP with recording).
- **Never:** shared-process multi-tenancy, monetization machinery in the OSS, semantic command
reconstruction from pixels.
## π€ Contributing
Issues, ideas, and PRs all welcome β see **[CONTRIBUTING.md](CONTRIBUTING.md)** and the
[Code of Conduct](CODE_OF_CONDUCT.md). Found a security issue? Please read
**[SECURITY.md](SECURITY.md)** first (don't file it as a public issue). New here? Look for
[`good first issue`](https://github.com/rupivbluegreen/omni-sag/labels/good%20first%20issue).
## π License
[MIT](LICENSE) β do fun things with it.
*Made with too much coffee and a healthy distrust of default-allow.* β