feat(raw-export): accept AUDIT-SP's signed audit.raw-export.v1 format
The AUDIT-SP collector (rebrand of the logpile collection tool) now stamps
raw_export.json with format "audit.raw-export.v1" instead of
"logpile.raw-export.v1" and ships a raw_export.sig alongside it, which broke
import entirely ("no parser found for this archive format").
- accept both format strings when parsing a raw-export bundle
- for the audit format, verify raw_export.sig (Ed25519, 64 bytes) against the
exact bytes of raw_export.json using a trusted public key embedded in the
binary (keys/audit-signing-public.pem); raw_export.sha256 is not consulted
- reject bundles with duplicate raw_export.json or raw_export.sig entries
- import proceeds even if the signature is missing or invalid, but the result
is marked unverified rather than silently trusted
- expose GET /api/signature-status and show a "Signed" badge in the header
when the signature verifies
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
28badfc90c
commit
2b0a2cb562
9 files changed
+356
-10
No files matched your search
@@ -141,6 +141,19 @@ a:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.signature-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
min-height: 34px;
|
||||
border-radius: 4px;
|
||||
padding: 7px 12px;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
color: rgba(255, 255, 255, 0.86);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.page-main {
|
||||
width: min(1500px, calc(100vw - 48px));
|
||||
margin: 28px auto 56px;
|
||||
|
||||
@@ -1416,6 +1416,33 @@ async function loadData(vendor, filename) {
|
||||
loadAuditViewer();
|
||||
loadParseErrors();
|
||||
loadPrivacyScan();
|
||||
loadSignatureStatus();
|
||||
}
|
||||
|
||||
async function loadSignatureStatus() {
|
||||
const badge = document.getElementById('signature-badge');
|
||||
if (!badge) return;
|
||||
|
||||
let data;
|
||||
try {
|
||||
const resp = await fetch('/api/signature-status');
|
||||
if (!resp.ok) {
|
||||
badge.classList.add('hidden');
|
||||
return;
|
||||
}
|
||||
data = await resp.json();
|
||||
} catch (e) {
|
||||
badge.classList.add('hidden');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data || !data.checked || !data.verified) {
|
||||
badge.classList.add('hidden');
|
||||
return;
|
||||
}
|
||||
|
||||
badge.title = 'This export carries a valid AUDIT-SP signature over raw_export.json, verified against the trusted key built into LOGPile.';
|
||||
badge.classList.remove('hidden');
|
||||
}
|
||||
|
||||
async function loadPrivacyScan() {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
</div>
|
||||
<div id="header-log-meta" class="header-log-meta hidden">
|
||||
<div class="header-actions">
|
||||
<span id="signature-badge" class="signature-badge hidden" title="">Signed</span>
|
||||
<button id="clear-btn" class="header-action hidden" onclick="removePersonalData()">Remove personal data</button>
|
||||
<button id="header-raw-btn" class="header-action hidden" onclick="exportData('json')">Raw Data</button>
|
||||
<button id="header-reanimator-btn" class="header-action hidden" onclick="exportData('reanimator')">Reanimator</button>
|
||||
|
||||
Reference in new issue
Block a user