Files
adminandClaude Opus 5.5 d2716ed743 Parafa: the signing module (M6) - PAdES signing requests on PDFs
Scaffolded with the dredd skill (simple tenancy, indigo, pl-first,
dredd-core v0.23.0), then the M6 domain from the Compass split plan:

- signing_request (dredd_core.document_ref SubjectRefMixin): a Galena
  DocumentRef read through module_client with the person's token, or a
  plain_files FileRef upload (D9). PDF only, refused with pdf_only.
- draft -> signed | failed (failed is retryable); lists Do podpisu and
  Podpisane; moderators sign, owners see their own.
- PAdES B-B signing with pyHanko (MIT) using the operator's PKCS#12 from
  SIGNING_PKCS12_PATH + passphrase file; no key in the repo (tests make a
  throwaway self-signed certificate at test time).
- Signed result: a new FileRef, and for a Galena subject a new version via
  Galena's /upload with dest=<path>, pinned and read back; document.signed
  emitted via dredd-core events in the same transaction.
- Verification of any PDF's signatures (intact / valid / trusted).
- GET /api/v1/stats (stats_contract): to_sign -> todo, signed -> signed.
- 0005_signing idempotent by catalog; provision.sql rendered for the
  platform; standalone compose published on :8121.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:46:06 +01:00

2.9 KiB

Credits

Parafa is Apache-2.0. Every shipped dependency is permissively licensed — the CI license gate (backend/scripts/license_gate.py) fails the build on GPL, AGPL or SSPL.

Runtime dependencies

Project License Why
FastAPI MIT the API framework
Starlette BSD-3-Clause ASGI toolkit under FastAPI
Uvicorn BSD-3-Clause ASGI server
python-multipart Apache-2.0 multipart/form-data parsing for FastAPI
Pydantic / pydantic-settings MIT validation + typed settings
SQLAlchemy MIT ORM
Alembic MIT migrations
pg8000 BSD-3-Clause pure-Python PostgreSQL driver — no libpq, no LGPL
argon2-cffi MIT Argon2id password hashing
httpx BSD-3-Clause the one outbound HTTP client
OpenTelemetry Python Apache-2.0 optional tracing, off by default
pyHanko + pyhanko-certvalidator MIT PAdES signing and signature validation
asn1crypto MIT ASN.1 / X.509 (via pyHanko)
cryptography Apache-2.0 OR BSD-3-Clause keys, PKCS#12, signatures (via pyHanko; tests make throwaway certificates with it)
lxml BSD-3-Clause XML (via pyHanko)
aiohttp Apache-2.0 pyHanko's HTTP client (no fetching is enabled here)
PostgreSQL PostgreSQL License the database

Console

Project License Why
Open Color MIT the colour palette, light and dark
Tabler Icons MIT outline icon set — path data is vendored into frontend/app.js's ICN map, never loaded from a CDN, because the console's CSP allows no third-party origins

No framework, no bundler, no CDN: the console is index.html + app.css + app.js.

Design credit

The console's shape — grouped sidebar navigation, data tables with row actions, full-page create forms with edit modals, dashboard tiles, a command palette — is inspired by Open Mercato. It is an homage, not a copy or a fork: no Open Mercato code is included, and small deviations are intentional.

Identity, sessions, auth, authz, the org tree and the append-only audit log come from dredd-core, the family's shared package (Apache-2.0), pinned in backend/requirements.txt. The least-privilege database model (app DML / migrator DDL) follows it.