necodoc / Security and governance

Security and governance

Controls you can check, inside a boundary you already audit.

necodoc runs in your account, signs people in through your IdP and writes to your Postgres. Each control says where it stops.

The one thing that can leave your environment is AI, and it's off by default. If an admin setsANTHROPIC_KEY, the template assistant sends the draft template (fields, content, sample data) and AI field detection sends page images of the uploaded form to Anthropic's API. Generation data isn't sent. The audit log records each AI request. Without the key, nothing leaves your boundary except the webhooks you configure.AI template assistant spec

Controls list

Every control, and the spec that defines it.

Download it as CSV and paste it straight into a vendor questionnaire. Each spec lists that control's known limits. Download as CSV
ControlHow necodoc does itProof
Identity and access
Single sign-onEntra ID, Auth0, SiteMinder or any OIDC or SAML 2.0 IdP, or a trusted SiteMinder-style header. necodoc creates the account at first sign-in.Single sign-on
Role mappingIdP groups map to roles: admin, publisher, reviewer, editor, viewer. A user can hold several roles, and each role grants one kind of work.Users and roles
Session controlAdmins ban users, revoke sessions and reset passwords. Impersonation is admin-only and audited from start to stop.Users and roles
System access
Service accountsKeys belong to a person or to a service account that can never sign in.ADR 0029
Scoped keysEach key has scopes no wider than its owner's roles, an optional template allowlist, IP allowlist and expiry date, and a rate limit. Admins can revoke a key and see its usage.HTML to PDF API
Signed callbacksWebhooks carry an HMAC-SHA256 signature over the timestamp and body. necodoc logs each delivery attempt.Webhooks
Data
ResidencyRecords in your Postgres; PDFs in your S3-compatible bucket, Azure Blob container or disk, in the region you choose.ADR 0023
DownloadsFiles download through signed links that expire. The audit log records each link that is issued.Generation log
RetentionAn admin sets how long generated PDFs, and optionally their input data, are kept.Generation log
Audit and logging
Audit logEvery configuration and access change, sign-ins including failures, impersonation and API key use, with before and after diffs. A database trigger keeps it append-only. Exports to CSV.Audit log
Generation logEvery PDF with its input, output, template version, caller and a timing breakdown; re-runnable against the exact version.Generation log
Operational logsJSON logs, Prometheus metrics and OpenTelemetry traces, with one request id end to end. Logs and traces never carry field values.Observability
Change control and output
VersioningEach template has one working draft. Published versions are numbered and can't change. Publishing needs its own permission.Publishing
Review gateWhen an admin requires it, only an approved, unchanged draft can be published.Review
Regression testsNamed test cases with assertions, and a page-by-page visual and text diff against the published version.Test cases
Output integrityPDF/A-2b or 2u, PDF/UA-1, and PAdES B-B or B-T certification with your certificate. Each generation records the profiles it applied.Archival output
Privacy and vendor risk
Sensitive fieldsFields marked sensitive are masked in audit diffs and in other people's log entries.Personal data
ErasureAn admin finds everything stored about a data subject and erases it. necodoc writes an erasure report.Personal data
ExitMIT source, standard Postgres, PDFs in your storage, templates as data. No vendor holds your data.Licence

Audit and logging

Who changed the bond wording, who approved it, and when.

The audit log records each change, its diff and who approved it. The generation log records every PDF made from each version.
Audit log filtered to template events: review submitted, changes requested, approved, updated
Audit entry detail: actor, target, IP, user agent, request id, and a before and after diff
Append-only in the database.

A trigger rejects updates and deletes on audit rows. The app, an API key or a bug can't change a past entry.

Tamper-resistant, not tamper-evident.

There is no hash chain, and a DBA can disable the trigger. Ship the log to your SIEM if you need proof against your own administrators.

Change control

Forms staff change the wording. Your systems code against the fields.

Fields are the contract with your systems, with a JSON Schema per published version.

  • Published versions can't change, and the API always fills a published version
  • A reviewer sees structure, page and test changes, then approves or asks for changes
  • Test cases and a visual diff run on the draft before it's published
  • Shared clauses live in snippets, so you change a clause in one place
Limit: One review step. Multi-step approval chains aren't supported.
Templates gallery with published versions, drafts and unpublished changes

Output integrity

Archival, accessible and certified PDFs

PDF/A-2b or 2u, tagged PDF/UA-1, and PAdES certification that shows a recipient if a copy was edited. necodoc doesn't mark a file with a profile it can't meet.

Archival output →

Privacy

Masking and erasure

necodoc masks sensitive fields in diffs and in other people's log entries. Admins find and erase a data subject's records, and get a report for the request.

Personal data →

Signatures

E-signature ready

Signing packages list signers, routing order and box positions as envelope JSON. Your provider runs the legally binding signing.

Signing packages →
RequirementHow necodoc helpsStill yours
OSFI B-10
third-party risk
Self-hosted MIT software: audit and access rights are yours, and the exit plan is your own Postgres and bucket.Your third-party assessment and exit testing
OSFI B-13
technology and cyber
Runs inside your controls: your IdP, network, keys, logging and patch cycle.Operating and patching it
Bill 96
Québec, French first
English and fr-CA from one template. Both languages use the same fields and layout, and translations are reviewed with each version.Translation quality and legal review. An untranslated string prints in the source language.
Law 25 · PIPEDA
privacy
You choose the region; sensitive-field masking; erasure per data subject with a report.Privacy assessments, retention policy
AODA
accessible formats
Tagged PDF/UA-1 output from designed and HTML documents.Accessible content and alt text in templates

What we don't claim

Attestations and claims we don't make.

There's no hosted service to attest. necodoc runs inside your SOC 2 and B-13 boundary.
No SOC 2, ISO 27001 or "certified secure".

We describe controls, not attestations.

Not "tamper-proof".

The audit log is tamper-resistant, as described above.

Not an e-signature service.

No ESIGN, eIDAS or UECA claims. Your provider signs.

Not "data never leaves" without the AI caveat.

With AI off, the default, nothing leaves except your webhooks. The AI caveat is at the top of this page.