Skip to content

feat(frontend): integrate synthetic CSC signer experience (#9604) - #9695

Closed
vitormattos wants to merge 2 commits into
feat/9602-csc-v1-runtime-20261122from
feat/9604-csc-signer-ui-20261124
Closed

vitormattos wants to merge 2 commits into
feat/9602-csc-v1-runtime-20261122from
feat/9604-csc-signer-ui-20261124

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Purpose

Implement the signer-facing portion of #9604 inside the existing LibreSign SignPDF experience. This is a draft stacked on backend PR #9659; it does not modify the independent administrative UI in #9665 or enable personal CSC credentials.

Changes

  • Add an optional experimental external-signing control to existing Sign.vue, preserving normal signing methods and hiding the experimental path in approval/unsupported visible-signature and required-geolocation contexts.
  • Use the existing signer code-request flow and the backend's signer-bound authorization; keep codes in POST bodies, never the URL or persistent browser storage.
  • Discover only server-approved synthetic laboratories and eligible certificates; present provider, X.509 subject/expiry/SHA-256 and supported PDF profile.
  • Prepare and continue one server-owned CSC session; show pending, signature-received, completing, completed, rejected, failed, expired, and uncertain states. Never automatically resubmit an uncertain private-key operation.
  • Restore a server-owned session after fresh authorization on return; protect document-switch races and ignore late responses; emit the existing signed event only after confirmed server publication.
  • Add typed OCS client and focused Vue/service regression tests.

Validation on the backend HEAD 85519503bdec57aba1be075cbffe85d1a3abd904

  • Focused Vitest: 49 passed across external-signing client, component, existing signer controls, and sidebar signing workflow.
  • npm run ts:check: passed.
  • ESLint of changed frontend paths, Stylelint of changed Vue components, npm run lint:translator-hints, git diff --check: passed.
  • Separately, disposable Nextcloud 36/PostgreSQL 17 backend exercise: 110 PHPUnit tests / 1,291 assertions, including CSC session workflow and synthetic PDF. This does not validate the new frontend against a live browser.

Dependency and remaining acceptance work

  • Requires feat(signing): CSC v1 synthetic laboratory workflow and signer UI #9659. After that PR merges, retarget this PR to main and rerun CI/E2E on the combined SHA. No direct merge while stacked.
  • Real HTTP + Playwright smoke tests of authenticated and invited signer journeys, responsive/keyboard verification and screenshots remain NOT RUN. Unit tests do not substitute for E2E.
  • The v1 adapter only allows an operator-pinned synthetic CSC laboratory; actual personal CSC consent/credential authorization is intentionally unavailable.
  • A request requiring visible signature fields, mandatory device geolocation, or identification-document approval is not offered this experimental path until supported by the server-side workflow.
  • The existing src/tests/views/SignPDF/Sign.spec.ts suite is failing on this same backend base SHA with a deficient vue-router mock; this PR deliberately does not modify that unrelated file. Address independently and confirm original base behavior before attributing CI issues.

No merge or release is requested by this draft.

)

Extend SignPDF signing controls with an experimental provider-neutral
remote signing option for authenticated and verified-email signers.
Discover only server-authorized integrations and certificates; show
expiry, fingerprint, PDF profile and durable progress.

Keep signing codes in POST bodies; require fresh authorization after
navigation; ignore stale responses across requests; forbid automatic
retry of uncertain submissions. Emit success only after server-confirmed
publication. Preserve ordinary signing and approval paths.

Validated: 49 focused Vitest tests, vue-tsc, ESLint, Stylelint,
translator hints and git diff --check. Requires CSC backend PR #9659;
end-to-end browser and review checks remain outstanding.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…9604)

Add signer UI regression covering a timed-out session preparation:
block a second attempt until a fresh server status read, then reuse
the original idempotency key rather than creating another operation.

Validated: 29 focused Vitest tests, vue-tsc --noEmit, ESLint, and
whitespace checks. This also rechecks the signer PR against the latest
signed CSC backend base, including its Psalm typing fix.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos added a commit that referenced this pull request Nov 24, 2026
Bring the signer-facing provider-neutral OCS client and Vue interface
into the existing SignPDF workflow. Discover only authorized laboratory
credentials, revalidate identity and show resumable session states.
Keep existing signing methods and protect uncertain outcomes.

Replay the independent signed commit from #9695, without squashing or
changing the original commit on the superseded branch.
Original-Commit: 4e28d7e
Related-PR: #9695

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos added a commit that referenced this pull request Nov 24, 2026
)

Keep the independent regression for a lost preparation response:
require server status reconciliation before allowing another request,
and reuse the original attempt identifier to prevent duplicate signing.

Keep this as a separate signed commit without changing #9695 history.
Original-Commit: 18ca9e7
Related-PR: #9695

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>

Copy link
Copy Markdown
Member Author

Superseded by the canonical CSC PR #9659.

The two commits from this draft were transferred as two independent signed/DCO commits to the existing backend PR (without squash or rewriting the originals):

  • 4e28d7eb → e2cef0d6 (signer-facing OCS/Vue implementation)
  • 18ca9e73 → c444499a (lost-response/idempotency regression)

All six affected files were verified to have identical Git blob SHAs at this PR's HEAD and the new #9659 HEAD. The original commits remain accessible in this closed PR for audit/review history.

This closure is administrative consolidation only. It does not mean that #9604, the CSC signing acceptance criteria, E2E tests, or #9659 are completed or merged. Continue all code review and CI work in #9659; #9665 remains an independent admin UI PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant