Repository navigation
feat(signing): CSC v1 synthetic laboratory workflow and signer UI - #9659
Draft
vitormattos wants to merge 108 commits into
Draft
vitormattos wants to merge 108 commits into
vitormattos wants to merge 108 commits into
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
13 of 19 tasks
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ms (#9600) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…9600) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…#9611) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
#9611) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Base automatically changed from
feat/9595-external-provider-catalog-20261121
to
main
November 23, 2026 22:55
…ion (#9611) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Contributor
…#9600) Prevent administrative updates, disablement and deletion while signing sessions are unresolved. Serialize session creation and administration on the configured integration row to eliminate the check/insert race. Add regression coverage for pending and uncertain sessions and release of the administrative guard after rejection. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…#9600) Restore ExternalIntegrationConflictException from merged foundation, which was inadvertently omitted from the CSC branch. Guard all integration revision updates while external signing sessions remain unresolved, including redundant enable requests. Verify the regression against a real disposable Nextcloud 36 SQLite instance (99 tests, 378 assertions). Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…9600) Add provider-neutral read-only lookup for the one durable signing session bound to a server-authorized actor and SignRequest. This supports resume after reload or a new PHP worker without client-owned prepared state or replaying an uncertain private-key submission. Require explicit feature gating and context validation. Cover signer and request isolation, uncertainty, and negative access paths. Validated on isolated Nextcloud 36 and SQLite: 103 focused integration tests, 412 assertions. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…9603) Add a strictly laboratory-only orchestration service using SignerPHP v0.5.1 and persisted, actor-bound signing sessions. Recheck the pinned certificate, document and integration before reserving signHash once; classify ambiguous provider failures as UNCERTAIN, never auto-retry. Complete and cryptographically validate PDF Basic / PAdES B-B before reserving publication; provide recovery of validated bytes without a second publication reservation. Production CSC tokens remain blocked. Validated in disposable Nextcloud 36 with synthetic CSC: 168 focused PHPUnit tests, 1464 assertions, including prior signatures, DocMDP, access denial, timeout/retry, and certificate/document substitution. File publication and signer-facing endpoints remain separate work. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Use a database unique constraint on SignRequest ID independently of the current actor identity, preventing duplicate external-signing attempts when a guest authenticates through another context. Keep actor-bound session discovery private and return only a redacted conflict to a competing actor. Add an upgrade-safe, non-destructive migration. Reproduced duplicate actor sessions before the fix and verified the migration and 169 focused Nextcloud 36 SQLite tests (1469 assertions). Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…9599) Create a server-side authorization context bound to the SignRequest and current IUserSession. Enforce the experimental gate, existing signer and workflow validators, exact identity method/value binding and signing credential verification. A guest invitation UUID alone cannot list or use remote credentials; authenticated users must match their bound UID. Use a stable per-SignRequest internal actor ID so account/guest transitions cannot bypass the durable session guard. Production CSC key consent stays separate and blocked. Verify 54 focused tests and 555 assertions on an isolated Nextcloud 36 environment; PHP 8.3 syntax and formatter clean. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…blication Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…tion Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…rience Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true |
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #9599, #9600, #9602, #9603, #9604
📝 Summary
Add the CSC v1 remote-signing workflow to LibreSign's existing signer experience. An authorized signer, including an invited guest, can discover policy-eligible signing providers, choose a remote certificate and PDF/PAdES format, prepare a signing session, follow its state and complete a signature through the native LibreSign signing request. This PR supports approved synthetic CSC laboratory credentials; it does not claim personal production signing or substitute a shared administrator token for signer consent.
The backend enforces system, group and account policy scopes, signer authorization, document revision binding, idempotent session transitions, and cryptographic validation before publishing the PDF. The separate administrative provider/policy UI is in #9665; the shared driver/OCS foundation was merged in #9611. This PR consolidates the signer-facing UI previously developed in #9695.
🧪 How to test
Validation evidence
cf53359ebefore the UX/provider-compatibility changes; the current HEAD must pass its own CI before merge.🎨 UI / Front-end changes
CSC signer UX — visible choices, concise language and mobile review (2026-11-25)
Behavior: one eligible service/certificate is automatically selected; for 2–5 authorized choices, the signer sees native Nextcloud Vue radio cards with names (and certificate expiry dates); 6+ options fall back to a compact select. Multiple options require an explicit selection before preparing the signature. A temporary certificate-lookup failure offers a safe retry. Existing signing status reconciliation and idempotency remain unchanged.
All screenshots above are uploaded as GitHub PR attachments and are not stored in the repository.
The first image is an older real Nextcloud 36 navigation screenshot; it is not a 'before' screenshot of the new service-selection UI. All other images were freshly rendered in Chromium from the actual updated signer Vue component at source revision
31905f681decaa8a5c823c4f64ed626ef6210914with Nextcloud Vue styles and synthetic account, service, certificate, code and session fixtures. The screenshots are component UI evidence only, not proof of full Nextcloud browser integration, signer-bound OAuth/SAD authorization, or a production cryptographic signature. The states and visual checks are described here; screenshots are PR attachments, not source files.Focused verification: 35 Vitest tests passed; TypeScript, ESLint, Stylelint, translator hints and production build passed. Browser checks verified click selection, keyboard ArrowDown for both groups, responsive layouts, and absence of unhandled browser errors. End-to-end CSC authorization remains outside this component-preview evidence.
Separate CSC protocol interoperability evidence (not a UI mock):
pdfsigverification reported Signature is Valid,ETSI.CAdES.detached, SHA-256, and Certificate issuer is unknown (test certificate, not qualified, not production identity).tests/interop/csc/README.md(no OAuth credentials committed).credentials/authorizeinstead of Cleverbase's two browser OAuth authorization-code flows. Consequently this is not evidence that the LibreSign signer web flow supports personal CSC signing yet. Seetests/interop/csc/README.md.Still required for real personal CSC signing: registered OAuth client, short-lived signer-bound
stateand callback, single-use authorization and hash-bound SAD, consent/credential selection with the selected provider, error/recovery integration, and a trusted certificate-chain policy. The existing synthetic execution guard remains intentionally active. Do not present the external stub proof as a personal/qualified signature.🚧 Tasks
⚙️ API / Back-end changes
signHashretries.🚧 Tasks
✅ Checklist
🤖 AI (if applicable)