PUBLISHED: JUNE 2026 // CLUSTER: COMPLIANCE // READING: 8 MIN

Preparing for SOC2 Type II: Configuring Immutable Edge Audit Trails

A core requirement of SOC2 Type II Trust Services Criteria (TSC) is Trustworthiness of System Logs. System administrators must be unable to delete or modify records of who downloaded files, when they were transferred, or who rotated quorum vault keys.

We guarantee this in ShareBolt using a chained, cryptographically linked ledger. Every log record forms a block containing the hash of the preceding block. If an attacker tampers with record \(N-1\), the hash chain breaks on block \(N\), failing verification checks.

Cryptographic Chain Code

Here is the Javascript implementation we use to construct, serialize, and append new audit events to our SQLite/JSON ledger backend:

class AuditBlock {
  constructor(index, timestamp, action, payloadHash, prevHash) {
    this.index = index;
    this.timestamp = timestamp;
    this.action = action;
    this.payloadHash = payloadHash;
    this.prevHash = prevHash;
    this.hash = this.calculateHash();
  }

  calculateHash() {
    const data = `${this.index}${this.timestamp}${this.action}${this.payloadHash}${this.prevHash}`;
    return sha256(data); // cryptographic SHA-256 hash
  }
}

Mathematical Formulation

Each block hash \(H_n\) is defined by the concatenation (\(\mathbin{\|}\)) of metadata parameters:

\[H_n = \text{SHA-256}\big(n \mathbin{\|} T_n \mathbin{\|} A_n \mathbin{\|} H_{\text{payload}} \mathbin{\|} H_{n-1}\big)\]

Because SHA-256 is collision-resistant, altering any variable (like changing a timestamp or download action parameter) will produce an entirely different hash, breaking downstream pointers.

Download Technical Guide

Get our comprehensive whitepaper: "Decentralized Quorums in B2B Data Flow". Includes cryptographic architecture diagrams and compliance audit guidelines.

Prepare Your Next Audit Cycle

ShareBolt Guard and Enterprise tiers include audit ledger access via GET /v1/audit/entries (JSON). Each audit entry is Ed25519-signed by the ShareBolt server's audit key and can be verified offline using the public key from GET /v1/audit/public-key. CSV export and SIEM streaming connectors are on the roadmap.

Compare Subscriptions

TL;DR — KEY TAKEAWAYS

What SOC2 Type II Actually Requires from Your Audit Log

SOC2 Type II evaluates whether your controls operated effectively over a period of time — typically 6 to 12 months. For file transfer systems, the relevant criteria are CC6.1 (logical access controls), CC7.2 (monitoring of system components), and CC9.2 (vendor and business partner management). Each requires that access events be logged in a way that precludes modification by system administrators.

A standard append-only log stored in a database is insufficient: a database administrator with DELETE privilege can remove records without detection. A cryptographic hash chain ensures that any deletion or modification is immediately visible at the next verify call — because the hash of the modified block no longer matches the prevHash stored in the following block.

The Full Block Hash Formula

ShareBolt’s ledger hashes all transfer-relevant fields together, including the storage region:

const blockRegion = block.region || 'us-east';
const textToHash = [
  blockIndex,
  action,
  senderStr,
  recipientStr,
  fileHash,
  fileSizeBytes,
  classification,
  timestampStr,
  block.prev_hash,
  blockRegion          // region is tamper-evident
].join('|');
const computedHash = crypto
  .createHash('sha256')
  .update(textToHash, 'utf8')
  .digest('hex');

The region field is critical for GDPR Chapter V compliance: if an EU transfer record’s region is changed from eu-central to us-east post-hoc, the hash chain breaks on the next block and the tampering is detected. This makes the audit ledger a reliable residency compliance artefact, not just an access log.

Ed25519 Per-Entry Signatures

A hash chain prevents undetected modification but does not prove origin — an attacker who can replay the hash computation could rebuild a fraudulent chain. Ed25519 signatures close this gap: each block is signed with the audit service’s private key before being written to the ledger. The corresponding public key is published at GET /v1/audit/public-key and verifiable offline.

// Verify a single block offline
const { createVerify } = require('crypto');
function verifyBlock(block, publicKeyPem) {
  const payload = JSON.stringify({
    block_index: block.block_index, action: block.action,
    sender: block.sender,         recipient: block.recipient,
    file_hash: block.file_hash,   file_size_bytes: block.file_size_bytes,
    classification: block.classification,
    timestamp: block.timestamp,   prev_hash: block.prev_hash,
    hash: block.hash,             region: block.region,
  });
  const v = createVerify('Ed25519').update(payload, 'utf8');
  return v.verify(publicKeyPem, block.signature, 'base64');
}

Exporting for SIEM and Auditor Review

SOC2 auditors require evidence that log monitoring is continuous, not spot-checked. ShareBolt’s CSV streaming export is designed for this: GET /v1/audit/entries?format=csv&from=2026-01-01&to=2026-06-30 streams the full ledger as UTF-8 CSV, with columns for block_index, action, sender, recipient, file_hash, timestamp, hash, prev_hash, region, signature. The stream is chunked and does not buffer the full result set in memory — safe for ledgers of any size.

Feed this directly into Splunk (scripted input), Datadog (log agent file tail), or any SIEM that accepts CSV. The hash and signature columns allow your SIEM to independently verify chain integrity on ingestion — no trust in the export mechanism required.

Frequently Asked Questions

Can a database admin delete or modify audit records without detection?

No. Any deletion or modification changes the block’s SHA-256 hash. The next block’s prevHash will no longer match, and the chain verify endpoint will immediately flag a tamper at the exact block index. Ed25519 signatures provide a second independent check: the signature over the original fields cannot be reproduced without the private key.

Does the audit ledger satisfy SOC2 CC7.2 log-integrity requirements?

Yes. CC7.2 requires that system component monitoring events be complete and protected from unauthorized modification. The SHA-256 hash chain and Ed25519 signatures provide cryptographic completeness and integrity guarantees. The CSV export and verify endpoint give auditors independently verifiable evidence without relying on ShareBolt’s own attestation.

Is the storage region included in the hash, and why does that matter for GDPR?

Yes. Region is part of every block’s SHA-256 input. This means retroactively changing a transfer record’s region from eu-central to us-east breaks the hash chain. For GDPR Chapter V compliance, this makes the ledger a reliable data residency artefact — not just an access log.

How does GDPR Article 18 restriction of processing get logged?

When a data subject invokes Art. 18 restriction, the transfer route returns HTTP 451 (Unavailable For Legal Reasons) and writes a restrict_processing event to the immutable ledger. The block is SHA-256 hashed and Ed25519 signed like any other block, creating a timestamped, tamper-evident compliance record that regulators can independently verify.

Can I verify the audit ledger without trusting ShareBolt?

Yes. Fetch the public key from GET /v1/audit/public-key, then export the ledger via GET /v1/audit/entries?format=csv. Verify each block’s Ed25519 signature and SHA-256 chain locally using any standard cryptography library. The verification code does not call ShareBolt — it operates entirely on the exported data and the published public key.

Related Reading

COMPLIANCE
GDPR, HIPAA & SOC2 Architecture
Edge routing, Art. 18 restriction, and audit ledger compliance overview.
SECURITY
AES-256-GCM & Ed25519 Stack
The full cryptographic architecture behind every transfer and audit entry.
ENTERPRISE
BYOS & HSM for Enterprise Compliance
FIPS 140-2 Level 3 HSM, M-of-N quorum, and dedicated audit ledger access.
BLOG
GDPR Edge Routing via cf-ipcountry
How region is determined and why it appears in the audit hash chain.

Cryptographic & Compliance Glossary

Galois Field GF(2^8) Arithmetic
A finite field containing 256 elements. Shamir's Secret Sharing executes polynomial additions and multiplications over GF(2^8) to split keys. By wrapping arithmetic bounds inside a finite field, we ensure that individual key shares leak zero information about the master vault secret key.

HMAC-SHA256 Key Ratcheting
A cryptographic technique providing Perfect Forward Secrecy (PFS). In ShareBolt, room keying states are ratcheted using HKDF-SHA256 after every chunk transfer. If a current transaction key is compromised, previous and future keys remain mathematically secure because the ratcheting hash function is one-way.

Decentralized Identifier (DID)
An open standard for verifiable, decentralized digital identities. AI agents are assigned Ed25519-based DIDs did:bolt:agent:<pubkey>. Access challenges are signed locally using the agent's private key and verified using the public key linked to the DID.

Directory Sandboxing
A security constraint restricting file read/write scopes. AI agents are trapped within designated workspace folders (e.g. /sandbox/inbox). Any filesystem requests referencing parent directories (../) or configuration paths trigger automatic violations, preventing prompt injection exfiltration.

Geographic Edge Residency Routing
A GDPR compliance protocol. ShareBolt evaluates request headers at edge workers, routing encrypted file chunks directly to localized storage endpoints (e.g. EU-central buckets) without passing through transit servers located in other jurisdictions.

Zero-Knowledge Envelope
A security architecture where files are encrypted client-side using symmetric AES-256-GCM. The symmetric key is envelope-encrypted using the recipient's public key. Plaintext files and decryption keys are never uploaded to the cloud, ensuring full privacy.