Enhance WHMCS integration with mTLS support and product mapping features. Added mTLS configuration options, updated API endpoints for mTLS status and fingerprint registration, and implemented product validation API. Updated database schema and documentation accordingly.
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 9s
CI / Go — node-agent tests (push) Failing after 8s
CI / Go — edge-gateway build (push) Successful in 18s

This commit is contained in:
smueller
2026-06-30 13:17:12 +02:00
parent 4b20efe4bc
commit 316679a913
34 changed files with 1174 additions and 30 deletions

View File

@@ -7,6 +7,8 @@
<a href="{{modulelink}}" class="btn btn-default">Dashboard</a>
<a href="{{modulelink}}&action=events" class="btn btn-default">Events</a>
<a href="{{modulelink}}&action=reconciliation" class="btn btn-default">Reconciliation</a>
<a href="{{modulelink}}&action=mappings" class="btn btn-default">Mappings</a>
<a href="{{modulelink}}&action=mtls" class="btn btn-default">mTLS</a>
<a href="{{modulelink}}&action=poll" class="btn btn-primary">Poll events now</a>
</p>
@@ -49,6 +51,8 @@
<tr><th>Last reconciliation</th><td>{{stats.lastReconciliationAt}}</td></tr>
<tr><th>Last event sync</th><td>{{stats.lastEventSyncAt}}</td></tr>
<tr><th>Last error</th><td>{{lastError}}</td></tr>
<tr><th>mTLS enabled (GameCloud)</th><td>{{stats.mtlsEnabled}}</td></tr>
<tr><th>mTLS fingerprint registered</th><td>{{stats.mtlsFingerprintRegistered}}</td></tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,58 @@
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Product mappings</h3></div>
<div class="panel-body">
<p>
<a href="{{modulelink}}" class="btn btn-default">Dashboard</a>
<a href="{{modulelink}}&action=mappings" class="btn btn-primary">Mappings</a>
<a href="{{modulelink}}&action=mtls" class="btn btn-default">mTLS</a>
</p>
<h4>Add or update mapping</h4>
<form method="post" action="{{modulelink}}&action=save_mapping" class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">WHMCS product</label>
<div class="col-sm-9">
<select name="whmcs_product_id" class="form-control" required>
{{mappings.product_options}}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">GameCloud plan slug</label>
<div class="col-sm-9">
<select name="plan_slug" class="form-control" required>
{{mappings.plan_options}}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Default version</label>
<div class="col-sm-9"><input type="text" name="default_version" value="1.21.1" class="form-control"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Default software</label>
<div class="col-sm-9">
<select name="default_software" class="form-control">
<option>VANILLA</option><option>PAPER</option><option>PURPUR</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<label><input type="checkbox" name="is_active" value="1" checked> Active</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-success">Save mapping</button>
</div>
</div>
</form>
<h4>Current mappings</h4>
<table class="table table-bordered">
<thead><tr><th>Product ID</th><th>Name</th><th>Plan</th><th>Software</th><th>Active</th><th></th></tr></thead>
<tbody>{{mappings.rows}}</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,39 @@
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">mTLS client certificate</h3></div>
<div class="panel-body">
<p>
<a href="{{modulelink}}" class="btn btn-default">Dashboard</a>
<a href="{{modulelink}}&action=mappings" class="btn btn-default">Mappings</a>
</p>
<table class="table table-striped">
<tr><th>GameCloud mTLS enforced</th><td>{{status.mtlsEnabled}}</td></tr>
<tr><th>Fingerprint registered</th><td>{{status.fingerprintRegistered}}</td></tr>
<tr><th>Preview</th><td>{{status.fingerprintPreview}}</td></tr>
<tr><th>Subject</th><td>{{status.subject}}</td></tr>
<tr><th>Configured in addon</th><td>{{fingerprint_configured}}</td></tr>
</table>
<form method="post" action="{{modulelink}}&action=register_mtls" class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">SHA-256 fingerprint</label>
<div class="col-sm-9">
<input type="text" name="fingerprint" class="form-control" placeholder="hex without colons" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Subject CN (optional)</label>
<div class="col-sm-9">
<input type="text" name="subject" class="form-control" placeholder="whmcs-integration-client">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-primary">Register fingerprint on GameCloud</button>
</div>
</div>
</form>
<p class="help-block">Enable <code>INTEGRATION_MTLS_ENABLED=true</code> on GameCloud and terminate TLS at your reverse proxy with client certificate verification.</p>
</div>
</div>