Skip to content

[FEAT]: Digital Signature Support on Output PDFs #231

@krrishrastogi05

Description

@krrishrastogi05

📝 Description

FireForm's output PDFs are currently unsigned. For legal incident reports submitted to county sheriffs, EMS, and other agencies, a verifiable digital signature from the originating fire department is often a compliance requirement.

💡 Rationale

If FireForm is to be adopted as an official reporting tool by departments, the output must be legally defensible. A digitally signed PDF certifies the document's origin and integrity — critical for incident reports that may be used in investigations or court proceedings.

🛠️ Proposed Solution

  • Integrate pyhanko for PDF signing
  • Allow departments to upload a PKCS#12 certificate (.p12 / .pfx) via a configuration endpoint
  • Add an optional sign: true flag to the fill request payload
  • Apply a visible or invisible signature field to the final output PDF
  • Add pyhanko to requirements.txt

✅ Acceptance Criteria

  • Output PDFs can be optionally signed with a department-provided certificate
  • Signature is verifiable in Adobe Acrobat and standard PDF viewers
  • Unsigned behaviour is unchanged when sign: false (default)
  • Works within the existing Docker container setup
  • Documented in Swagger UI (/docs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions