24 Commits
Author SHA1 Message Date
adminandClaude Opus 5.5 6ea5bf7f0e Fetch private dredd-core from the Haski Gitea, not GitHub
CI / backend (17) (push) Successful in 1m24s
CI / backend (16) (push) Successful in 1m40s
CI / managed-db (push) Successful in 1m20s
CI / compose-smoke (push) Successful in 1m46s
The Dockerfiles still rewrote credentials for github.com only, so the build
token never reached Gitea and installs worked only while dredd-core was
public. Rewrite http://77.216.148.202:3000/ instead, give every workflow
that pip-installs the same rewrite (org secret DREDD_CORE_TOKEN, the
read-only haski-reader token), and drop the GitHub PAT leftovers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:18:36 +01:00
adminandClaude Opus 5.5 ea66e3ec31 CI: allow a manual run (Actions -> CI -> Run workflow)
CI / managed-db (push) Successful in 1m24s
CI / compose-smoke (push) Successful in 1m57s
CI / backend (16) (push) Successful in 1m16s
CI / backend (17) (push) Successful in 1m8s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:06:30 +01:00
adminandClaude Opus 5.5 f781bd7557 CI: push runs only on main; branches are tested through their pull request [skip ci]
A push of many branches at once (the migration pushed 100 of Atrium's) started
a run per branch and flooded the runners. Every pull request is still tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 16:39:08 +01:00
adminandClaude Opus 5.5 8c29520f13 CI: compose-smoke drives the stack on 8121, the port it publishes
CI / backend (16) (push) Successful in 2m0s
CI / backend (17) (push) Successful in 1m16s
CI / managed-db (push) Successful in 1m19s
CI / compose-smoke (push) Successful in 47s
The family's standalone ports moved the backend to ${PARAFA_PORT:-8121}, and
the smoke test kept asking port 80, so it never saw the stack become ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:41:03 +01:00
adminandClaude Opus 5.5 59ea522f00 Build from Gitea instead of GitHub
CI / backend (16) (push) Successful in 1m15s
CI / backend (17) (push) Successful in 1m12s
CI / managed-db (push) Successful in 1m7s
CI / compose-smoke (push) Failing after 6m34s
The Alpaq92 GitHub account is suspended, so nothing can be fetched from it.
dredd-core (and Lexicon's compass packages from Arbiter) now come from the
public Haski repositories on Gitea, so CI no longer authenticates to GitHub:
the "Authenticate to dredd-core" steps and insteadOf rewrites are gone.
The Dockerfile's dredd_core_token build secret stays; any non-empty value
works now (the Haski org secret DREDD_CORE_TOKEN provides one in CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:05:27 +01:00
admin 97e927078e Merge pull request #10 from Alpaq92/fix/issue-9-seal-evidence
Evidence: /seal off the event loop, /evidence survives one bad row (Parafa#9, points 1, 3, 4)
2026-11-28 15:31:19 +01:00
adminandClaude Opus 5.5 8abd645c72 Evidence: /seal signs off the event loop, one bad row never fails /evidence (Parafa#9)
- POST /seal: run evidence.seal on the thread pool; asyncio.run inside the route's
  own loop raised on every call (500). Tested through the real route and signer.
- GET /evidence: a row whose verification report cannot be made still lists its
  signed PDF; the reason goes into `note`, which the Archive keeps. The Archive
  verifies up to what Parafa stores (MAX_FILE_BYTES) and waits up to 30 s for a
  verification slot instead of a 409.
- The evidence docstring no longer promises a reproducible report hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 14:46:56 +01:00
admin 7256faa2c1 Merge pull request #7 from Alpaq92/naprawa-53
Atrium#53: security fixes and signature providers
2026-11-28 00:22:08 +01:00
adminandClaude Opus 5.5 d410eb6c04 Test: the fake Galena answers POST /projects/roles; hold scramp below 1.5
Fixes Atrium#53 run 2, points 4 and 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:21:41 +01:00
adminandClaude Opus 5.5 bc3575afef chore(env): document ARCHIVE_READER_ID (deploy_check)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:17:24 +01:00
adminandClaude Opus 5.5 ebb4071084 feat(archive): GET /evidence and POST /seal for the Galena archive (Atrium#53)
Evidence: the signed PDF and its verification report (canonical JSON) of every signed request on a
Galena document; a person sees what they may read, the archive's technical account (fixed id
ARCHIVE_READER_ID, minted by the hub) sees all and is audited as evidence.read.
Seal: a detached CAdES signature (application/pkcs7-signature) over <= 1 MB by the operator's local
seal, for the technical account only (404 for everybody else), audited as seal.issued with the
input's sha256. The technical account is refused (404) on every other route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:05:07 +01:00
adminandClaude Opus 5.5 e1a5f8d423 feat: a signing request names the contract's party from the counterparty register (read only)
Spec 2026-11-25 part A (Kontrahenci), step 3: a nullable counterparty_id
(RESTRICT) on the platform's register, a picker over its organisations
and a PUT to set or clear it (owner or moderator, else 404). The module
only reads the register and never shows counterparty_contact. Idempotent
revision ending with runtime_grants_sql; standalone it creates the
(empty) local register, on the platform it drops empty local copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 19:55:35 +01:00
adminandClaude Opus 5.5 e3eeb4ff67 test: manual signing end to end over fakes; the console route driven in Node
complete/send/withdraw/sign refusals, the coverage check, flags read once per list, counts in one
Galena call, and a failed signature hiding the exception, as behaviour instead of source text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:44:38 +01:00
adminandClaude Opus 5.5 fbd643d21e fix: completing a manual signature is a moderator's act, and the last signature covers the file
complete_manual now requires a moderator, as signing always did; send/withdraw stay owner-or-moderator.
as_dict gains can_withdraw/can_complete, read off a Viewer computed once per request or list, and the
console shows "Wgraj podpisany plik" only with can_complete. An upload whose last signature does not
cover the entire file (an unsigned update after it) is refused. Counts are one query plus one Galena
call; the dashboard reads cards and recent from one pass; module_stats takes the token as required.
One bounded-verify helper; Provider.configured is a field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:44:36 +01:00
adminandClaude Opus 5.5 754f73b078 test: raw strings in the LIKE escaping test ("\b" was a backspace)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:52:03 +01:00
adminandClaude Opus 5.5 3628b8e5e5 feat: a request handed over by Workflow, prefilled at the approved version (Atrium#53)
#/new?document_id=&path=&version=&title= opens the new request with the
Galena document fixed (read-only) at the commit Workflow approved; the
version goes to POST /requests/document, which pins exactly those bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:17:28 +01:00
adminandClaude Opus 5.5 3718613db2 feat: Parafa as a gateway to signature providers (local seal + SignuDoc by hand)
Atrium#53, stage 3. Who signs is now a provider (services/providers):
- local: the operator's PAdES seal (pyHanko, PKCS#12), as before;
- signudoc: SignuDoc, the Start edition's default. No API yet, so manual:
  the request is handed over (status `sent`), the person downloads the
  original, signs it in SignuDoc and uploads the signed PDF. Parafa accepts
  it only if it contains the original unchanged (a PAdES signature is an
  incremental update) and carries intact signatures; trust in the signer's
  CA is reported, not required. `sent -> draft` withdraws it.
Completing is one path for every provider (_complete): the file kept, the
Galena write-back, the audit entry with the provider, document.signed.
SIGNING_PROVIDERS (default local,signudoc) chooses what is offered.
Revision 0006: signing_request.provider and `sent` in the status CHECK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:00:42 +01:00
adminandClaude Opus 5.5 1761ce3fe8 fix(security): three medium findings (Atrium#53, stage 3)
1. A request on a Galena document showed its path, hash and commit to its
   owner and every moderator even after Galena stopped letting them read the
   document. Reads, lists, counts, the dashboard and /stats now ask Galena
   (POST /projects/roles, with the person's token) and leave such rows out:
   404, never 403; Galena off or unreachable fails closed.
2. A failed signature stored and returned the exception's own text (file
   paths, internal URLs, library internals). The requester now gets a
   reference; the detail goes to the server log.
3. /verify ran pyHanko on any upload up to the full file cap with no bound.
   It now takes at most 20 MB and two validations at once (409 verify_busy).

Also: the title search escapes LIKE's % and _.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 13:54:19 +01:00
admin 6f8d9c332d Merge pull request #3 into main
# Conflicts:
#	frontend/app.js
2026-11-24 20:21:18 +01:00
admin 06a6e73d61 Merge pull request #4 into main 2026-11-24 20:21:00 +01:00
Piotr ChojnackiandClaude Opus 5.5 3f65503e97 Console a11y: announce toasts and errors, keyboard path to a request, modal stays modal
A pass against the Web Interface Guidelines, bringing the console up to what Atrium's
already does:

- #toast is a polite live region and the sign-in / dialog error banners are role=alert,
  so a screen reader hears "Saved" and "Wrong password" instead of nothing.
- The request table's title is a real link (the row keeps its click): before, a keyboard
  user could not open a request from the list at all.
- A dialog is named by its title (aria-labelledby) and the page behind it is inert while
  it is open, so Tab cannot walk out of it; the opener is remembered before the page goes
  inert and gets focus back. A dialog starts on its first field or else its first RENDERED
  control — the account sheet's .m-only rows are display:none on a desktop and cannot take
  focus. The command palette and its input are labelled.
- A skip link to the main content, which is now focusable (tabindex=-1).
- Icon-only buttons (menu, theme, language) carry an aria-label next to their title. The
  language buttons drop data-no-i18n, as Atrium's did: it also stopped their title from
  being translated, and "PL"/"EN" have no dictionary entry to change them.
- theme-color for the browser chrome, touch-action: manipulation, overscroll containment
  in the dialog, palette and drawer.

Checked in a browser against a fetch stub (no backend here): Enter on a request link opens
it, the account sheet opens from the avatar with focus inside and Escape hands it back.
node --check frontend/app.js passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:55:23 +01:00
tobayahandClaude Opus 5.5 903e9a0036 Console: English only in EN mode (chrome, crumb, toast, signing notices)
The shared chrome, the same in all six modules: the tab title and <html lang>, the language
button's title / aria-label (data-no-i18n, so set in code by localizeChrome()), the search
tooltip, the breadcrumb (setCrumb() now localizes the top bar) and toast(), which wrote outside
every localize() root.

Parafa: the signing-not-configured banner, the operator certificate line, the failed-attempt
banner and the trust / revocation notes of a verification - static text split from data so
localize() matches it; "plik: name" translated before it is glued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:42:35 +01:00
adminandClaude Opus 5.5 5f8c2fd2d7 Brand hue: Open Color yellow instead of indigo
Indigo is Arbiter's; yellow is the one Open Color hue no other module of
the family uses. The app mark, favicon and --brand tokens move to yellow9
#e67700 (yellow5 #fcc419 as the dark theme's brand text), glyph yellow0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:52:44 +01:00
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