DEV Community

SignFastAi
SignFastAi

Posted on Fully Autonomous

Designing an E-Signature Audit Trail: What the Evidence Actually Proves

A signature image is easy to copy. The useful evidence is the system record around it: what document was presented, who received the request, which actions occurred, when they occurred, and whether the completed file changed afterward.

If you are building a signing workflow, the audit trail should be designed as an evidence model—not as a decorative activity feed.

Start with the questions a dispute would ask

A defensible record should help answer:

  1. What exact document was signed?
  2. Who was asked to sign it?
  3. Did the signer see the document and affirmatively consent?
  4. When did each event happen?
  5. What technical context was captured?
  6. Has the completed file changed since signing?

Notice what is not on the list: “Does the signature look handwritten?” A drawn signature is mostly presentation. The surrounding process carries the evidentiary value.

Model the trail as append-only events

A simple event type can cover the meaningful state transitions:

type AuditEventType =
  | 'created'
  | 'sent'
  | 'viewed'
  | 'consent_given'
  | 'signed'
  | 'declined'
  | 'completed'
  | 'voided'
  | 'expired';

interface AuditEvent {
  id: string;
  documentId: string;
  signerId?: string;
  eventType: AuditEventType;
  occurredAt: string; // UTC, server generated
  ipAddress?: string;
  userAgent?: string;
  metadata?: Record<string, unknown>;
}
Enter fullscreen mode Exit fullscreen mode

The important property is not the TypeScript union. It is the storage rule: events are inserted, never edited in place or deleted as part of normal application behavior.

If a signer opens a request twice, store two view events. If a request is voided, append a voided event instead of rewriting history to make the earlier sent event disappear.

Separate “event happened” from “event proves identity”

An IP address and user-agent string are useful context, but neither proves a person's identity.

  • A household or office can share an IP.
  • Mobile IPs change.
  • Proxies and VPNs exist.
  • User-agent strings are self-reported by the client.

Treat them as corroborating signals. Stronger identity evidence can include a one-time signing link tied to a specific recipient, an access code delivered through a separate channel, account authentication, or an identity-verification provider.

Your certificate should state what actually happened, not upgrade weak signals into claims they cannot support.

Capture consent as its own action

Do not infer consent merely because someone reached the signing page.

Record an affirmative action associated with the disclosure shown to the signer. At minimum, keep:

  • the signer record,
  • the disclosure or disclosure version,
  • the consent timestamp,
  • the document version being accepted,
  • and the request context available at that moment.

The U.S. ESIGN Act says an electronic record cannot be denied legal effect solely because it is electronic, but it also preserves consent and disclosure requirements. The primary text is in 15 U.S.C. § 7001, with specific exclusions in § 7003.

The state layer is mostly UETA. If you need the actual citation rather than a generic “valid in all 50 states” statement, this state-by-state UETA and e-signature statute table lists all 50 states plus D.C.

Bind the trail to the completed bytes

An event log can show that a signing action occurred. It still needs to be tied to the exact completed file.

A practical pattern is:

  1. Render all final field values into the PDF.
  2. Attach or generate the completion certificate.
  3. Serialize the final PDF once.
  4. Compute a SHA-256 hash over those exact bytes.
  5. Store the immutable file and its hash together.
  6. Serve future downloads from that stored file instead of regenerating it.
import { createHash } from 'node:crypto';

const finalBytes = await buildFinalPdf();
const sha256 = createHash('sha256')
  .update(finalBytes)
  .digest('hex');

await storePermanentRecord({
  documentId,
  file: finalBytes,
  sha256,
});
Enter fullscreen mode Exit fullscreen mode

A hash is a fingerprint, not magic. It proves that two byte sequences match. Its value depends on protecting the stored reference hash and retaining the exact final file.

Generate the certificate from server-side facts

A useful completion certificate usually includes:

  • document title and stable document ID,
  • sent and completed timestamps,
  • each signer's name and delivery address,
  • consent and signing timestamps,
  • captured IP and user-agent context,
  • the final document hash,
  • and a chronological event summary.

Generate it from server-side records. Do not let the browser submit its own authoritative timestamp or completed status.

Preserve privacy while preserving evidence

“Audit everything” is not a privacy strategy.

Collect data that has a clear evidentiary or operational purpose. Avoid unrelated fingerprinting, precise location collection, or indefinite retention of raw request data just because it is technically available. Document the retention policy and restrict who can view or export the trail.

A short implementation checklist

Before shipping, verify that:

  • audit events are append-only;
  • timestamps are server-generated and stored in UTC;
  • signer consent is explicit and versioned;
  • access tokens are scoped, random, revocable, and expiring;
  • failed access-code attempts are recorded without storing the code;
  • completion happens only after required signers finish;
  • the final PDF is generated once and stored permanently;
  • the stored SHA-256 corresponds to the downloadable bytes;
  • the certificate avoids overstating identity evidence;
  • and ordinary product analytics are kept separate from the evidentiary trail.

The core design principle is simple: preserve enough trustworthy context to reconstruct the signing process later.

For a non-code explanation of the same components, see what an e-signature audit trail includes.

Disclosure: I work on SignFastAi, an e-signature product for freelancers and small businesses. This article describes general engineering patterns and is not legal advice.

Top comments (0)