B.W.A TLS-Gate Mock Pipeline (RC1)

Bits With Attitude (B.W.A) — Street-code on silicon level. Providing deterministic, offline-ready encryption management for the CrumbForest-Crew and waldmitte core-nodes.

TLS-Gate is an interactive developer tool, local dashboard, and SOAP/WSDL protocol visualizer custom-engineered for handling secure TLS environments, certificate validation, and CSR generation. Built in alignment with CrumbLegal-RC0 guidelines (No Cloud, Offline-First, structural determinism, and direct sandbox testing).


🌲 Architecture Overview

This workspace acts as a local developer sandbox and mock pipeline for testing integration with traditional domain order endpoints (domain-bestellsystem.de).

         +-----------------------+         +-----------------------+
         |   Developer Browser    |         |   Terminal / CLI      |
         |   (index.php SPA)      |         |   (dashboard.sh)      |
         +-----------------------+         +-----------------------+
                     |                                 |
                     |                                 v
                     |                     +-----------------------+
                     |                     |     soap_cli.php       |
                     |                     |  (list / info -> JSON) |
                     |                     +-----------------------+
                     |                                 |
                     v                                 v
                 +---------------------------------------------+
                 |   SslHandler.php  (shared SOAP logic)        |
                 |   getCertList() · getCertInfo() · sslInfo()  |
                 +---------------------------------------------+
                     |                                 |
       (SoapClient over TLS)              (Mock-Fallback if no ext-soap)
                     v                                 v
         +-----------------------+         +-----------------------+
         |   SOAP Status WSDL    |         |      sample.json      |
         +-----------------------+         +-----------------------+

Eine Quelle, zwei Frontends: Web (index.php) und Terminal (dashboard.sh
via soap_cli.php) teilen sich dieselbe SslHandler.php. Steht keine
SOAP-Verbindung (fehlende ext-soap oder kein Netz), fällt beides automatisch
auf sample.json zurück — die Ansicht zeigt dann die Quelle „Mock-Fallback".

📦 What's Inside

  1. index.php (The SOAP Portal SPA):
  2. Migrated from a fragile 1990s HTML frameset into a secure, single-page application context.
  3. Leverages PHP's native SoapClient connected to the domain-bestellsystem SOAP endpoint.
  4. Upgraded to use local OpenSSL sha256 signatures instead of deprecated sha1 for CSR generation.
  5. Fixed runtime variables (like $startDate) to prevent parsing crashes.

  6. sample.json (Structured Metadata Store):

  7. Houses simulated database-state payloads reflecting real Let's Encrypt (YE2) and Sectigo live certificate facts captured directly from the crumbforest.org, branko.de, and onezeromore.com domains.

  8. sample.html (Naked Packet Sandbox):

  9. Fully responsive, custom dark terminal UX showcasing mock forms (replica of high-fidelity PHP forms) with integrated DOM-level live searching/grepping.
  10. Includes a Bi-directional Naked SOAP XML Packet Trace Modal allowing programmers to view the exact, raw soap envelope request and response markup transmitted for every function trigger.

  11. SslHandler.php (Shared SOAP Core):

  12. Kapselt die gesamte SOAP-Logik (Credentials-Bootstrap via getenv, SoapClient, sslListExtended, sslInfo).
  13. Normalisiert Antworten über getCertList() und getCertInfo() und liefert bei fehlender Verbindung einen sauberen Mock-Fallback aus sample.json.
  14. Wird von index.php und soap_cli.php inkludiert — eine einzige Quelle der Wahrheit.

  15. soap_cli.php (CLI-Bridge):

  16. CLI-only (guarded via PHP_SAPI), gibt maschinenlesbares JSON aus:
    php soap_cli.php list und php soap_cli.php info <orderNumber>.
  17. Bindeglied zwischen der PHP-SOAP-Welt und dem Bash-Dashboard.

  18. dashboard.sh (Terminal Dashboard):

  19. Zieht Live/Mock-Daten über soap_cli.php, zeigt eine Tabelle mit Order · Domain · Status · Expire samt Restlaufzeit-Farbcode.
  20. Interaktiver Detail-Abruf per Order-Nummer (zeigt Zertifikat/PEM bei Live-SOAP).

🛠️ Usage & Local Deployment

1. High-Fidelity Mock Visualizer

Simply open sample.html in any browser to execute simulations offline:

# On Linux / MacOS
xdg-open sample.html   # or double-click to view immediately
  • Use the Grep Interface to dynamically filter active certs in the list.
  • Submit different tabs (CSR Form, Order Form, etc.) and click View Naked XML SOAP to check the raw payload tracer.

2. Live PHP Client

Configure your production/sandbox credentials inside the live engine /home/sysop/workspace/index.php:

$soap_user = "your_actual_username";
$soap_pw = "your_actual_password";
$wsdl = "https://www.domain-bestellsystem.de/soapstatus/wsdl/soap.wsdl";

Credentials werden aus der Umgebung gelesen (siehe SECURITY.md), Platzhalter nur als Mock-Fallback:

export BWA_SOAP_USER="your_actual_username"
export BWA_SOAP_PASS="your_actual_password"
export BWA_SOAP_WSDL="https://www.domain-bestellsystem.de/soapstatus/wsdl/soap.wsdl"

Serve locally via PHP's built-in server:

php -S localhost:8080

Then navigate to http://localhost:8080 in your web browser.

3. Terminal CLI (dashboard.sh) — Handbuch

Das Dashboard nutzt dieselbe Datenquelle wie das Web-Frontend (soap_cli.phpSslHandler.php), also Live-SOAP mit automatischem Mock-Fallback.

./dashboard.sh                    # Interaktives Dashboard: Liste + Detail-Abruf per Order-Nr
./dashboard.sh stats              # Schnelle Statistik (Gesamt / aktiv / pending / sonstige)
./dashboard.sh details <orderNr>  # Detail-Info inkl. Zertifikat (PEM) zu einer Order
./dashboard.sh export <domain>    # Domain-Details als JSON exportieren (aus sample.json)
./dashboard.sh export consensus <domain>  # Dezentrale Konsens-Abfrage (api_consensus.py)
./dashboard.sh help               # Hilfe

Die Expire-Spalte färbt sich nach Restlaufzeit: 🔴 abgelaufen · 🟠 ≤ 30 Tage · 🟡 ≤ 90 Tage · 🟢 > 90 Tage. Die Kopfzeile zeigt an, ob gerade Live SOAP oder Mock-Fallback aktiv ist.

Voraussetzungen: php, jq und (für die Restlaufzeit in Tagen) GNU date.

Rechte / Deployment im RZ: dashboard.sh ruft php soap_cli.php auf, das wiederum SslHandler.php und sample.json liest. Der ausführende User braucht Ausführ- und Leserechte auf diese Dateien:

chmod +x dashboard.sh
# Dateien dem ausführenden User/Gruppe zuordnen, z.B.:
chown "$USER":"$USER" dashboard.sh soap_cli.php SslHandler.php sample.json

Fehlen Rechte oder php, bricht das Skript nicht mehr stumm hinter dem Banner ab, sondern gibt eine klare Fehlermeldung samt Hinweis aus.


⚖️ Governance & Compliancy

This structure conforms to CrumbLegal-RC0:
* Structural Determinism: No permanent tracking cookies, tracking IDs, or remote profiling.
* Offline-First Integration: Designed to be mocked and checked fully locally prior to making real-world root calls.
* Strict Privacy Policy: Local key pairs (genCSR) are generated purely in system RAM via PHP-OpenSSL and never transmitted over external network vectors.


Created in Hammerbrooklyn / Hamburg inside the OZM Art Space. Peace, open learning, and bits with attitude.