Skip to content

feat: manage external signing providers in LibreSign settings (#9598) - #9665

Draft
vitormattos wants to merge 25 commits into
mainfrom
feat/9598-frontend-ocs-adapter-20261122
Draft

vitormattos wants to merge 25 commits into
mainfrom
feat/9598-frontend-ocs-adapter-20261122

Conversation

@vitormattos

@vitormattos vitormattos commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Resolves: #9598

📝 Summary

External signing providers now use a native policy card in LibreSign → Policies → How signing works. The existing policy workbench manages account, group and system rules, with the CSC connection manager available from inside the policy configuration.

This adds a single place to manage multiple integrations, configure their provider-specific fields, see whether a provider is operational or administratively enabled, and safely update or remove an instance. Stored secrets are never displayed, and simultaneous changes or signing sessions that prevent an update produce actionable feedback.

This PR covers policy administration and scoped CSC connections for system, groups and accounts. The signer-facing CSC workflow lives in #9659; the combined backend must check the effective external_signing_enabled policy and the provider scope before any external signing operation is allowed. A connection never grants signer consent.

🧪 How to test

  1. In an isolated Nextcloud 36 installation with experimental signing enabled, sign in as a system administrator.
  2. Open Policies → How signing works → External signing providers → Configure (the same policy card and CRUD presentation used by other policy definitions).
  3. In the native Create rule dialog, choose System, Group or Account, select a target where required, set the allow/deny value and save. Reopen a single rule to configure integrations only for that rule's scope.
  4. From the same policy dialog, choose Configure integrations to open the connection settings; create two CSC instances, validate fields, edit one and verify that stored tokens never reappear.
  5. Verify unavailable signing drivers cannot be enabled and administrative errors do not report false success.
  6. Switch to compact/mobile layouts and confirm the policy and its connection configuration remain usable.
  7. Disable the experimental gate or use a non-admin account: neither the policy card nor integration administration must be exposed. Server authorization remains authoritative.
  8. When feat(signing): CSC v1 synthetic laboratory workflow and signer UI #9659 is integrated, verify the effective policy is enforced server-side for allowed/denied account, group and guest scenarios before claiming signer flow acceptance.

Validation evidence

  • Focused regression/acceptance tests
  • Relevant lint and TypeScript checks
  • Broader suite on the latest screenshots commit
  • CI fully passing on the latest HEAD

🎨 UI / Front-end changes

  • Native external-signing policy card with the same existing rule CRUD, plus an embedded connection-manager entry inside the policy dialog.
  • Driver-driven form for creating and editing multiple integration instances.
  • Separate operational and administrative states, safe secret handling, and feedback for errors and conflicts.
  • Actual, sanitized screenshots captured on a disposable Nextcloud 36 instance running this PR's native policy frontend and policy backend; attached to GitHub, not committed to the source tree.

Live CSC policy-scoped administration — Nextcloud 36 (combined #9659 + #9665 code)

External signing connections are not global by default. Each configured connection belongs to exactly one policy scope — system, group or account — and its credentials are stored as encrypted integration secrets, outside policy values. The system admin may configure a global connection or explicitly delegate the CSC policy to a group or account. For group administrators, editing the delegated rule opens Configure integrations for that group only; other groups' and system-level CSC accounts are never shown in that list.

A new rule must first be saved through the regular policy CRUD. Then the rule can be edited to configure one or more CSC integrations under its scope.

Actual workflow step Screenshot captured in disposable Nextcloud 36
1. Policy card under Policies → How signing works CSC policy card
2. Native policy CRUD listing an existing group rule CSC policy scoped rules
3. Add-rule selector (Account / Group / Everyone) CSC policy scope selector
4. Edit the selected group's rule; configuration belongs to this rule CSC group rule editor and Configure integrations
5. Scoped connection list is initially empty, even while system-level CSC integrations exist Empty CSC integrations for this group
6. CSC integration form fields (connection scope is defined in the preceding rule) CSC integration configuration form fields
7. Connection saved: CSC — Cliente A (teste) visible only within this group's scope CSC configured for Client A
8. CSC group connections in the 390px mobile layout CSC policy scoped connection on mobile

This is an experimental synthetic CSC laboratory. The browser snapshots prove policy-scope configuration and segregation in the isolated test installation, not production CSC authorization or a valid external cryptographic signature. The final signer flow must also pass negative authorization tests on the merged backend.

Names and endpoints in the screenshots are test data, not production integrations. “Driver unavailable” is the expected state in this isolated administration-only setup until the separately developed signing backend is integrated.

  • Desktop and mobile layout exercised in Chromium
  • Component tests added or updated (Vitest)
  • Independent accessibility and design review
  • Documentation published (draft administration guide: LibreSign/documentation#185)

🚧 Tasks

✅ Checklist

  • I have read and followed the contribution guide.
  • The diff contains no unrelated refactors or generated code.
  • Commits follow Conventional Commits.
  • All commits contain DCO sign-off.

🤖 AI (if applicable)

  • The content of this PR was partially or fully generated using AI

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>
@vitormattos vitormattos changed the title feat(frontend): connect external signing administration to OCS feat(frontend): deliver external signing administration UI and OCS integration (#9598) Nov 23, 2026
@vitormattos
vitormattos changed the base branch from feat/9598-frontend-admin-integrations-20261122 to main November 23, 2026 00:35
@vitormattos vitormattos added the frontend Frontend work label Nov 23, 2026 — with ChatGPT Codex Connector
@vitormattos
vitormattos marked this pull request as ready for review November 23, 2026 22:58
@vitormattos
vitormattos requested a review from a team as a code owner November 23, 2026 22:58
Do not imply that an active-session indicator exists in the current
administrative OCS model: it does not. Keep lifecycle validation
server-authoritative and report HTTP 409 accurately for both stale
revisions and unresolved signing sessions. Add Vue regression coverage
for rejected removal without claiming success.

No backend API change, no secret disclosure, and no alteration to
existing signing workflows.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
The Node test runner does not expose window.confirm by default, so
spying on that missing method fails during fixture setup. Install an
explicit Vitest global stub and restore it during cleanup, preserving
the regression that HTTP 409 never shows removal success.

CI reproduction: 1 test failed at line 100; 3,774 other tests passed
on the prior head. This commit addresses that exact fixture failure.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add screenshots from the actual external-signing Vue administration UI
running on an isolated Nextcloud 36 instance with the current main
administrative API. Demonstrate the policy entry point, an empty state,
creating and editing a provider, multiple instances, and mobile layout.

Only synthetic example names and URLs are shown; the unavailable driver
state accurately reflects the absent separate signer backend.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Apply the repository's AGPL-3.0-or-later screenshot copyright
annotation to the six real UI captures in PR #9665.

Locally confirmed `reuse lint` passes with 2128 of 2128 source
files attributed; no changes to screenshots or application code.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos changed the title feat(frontend): deliver external signing administration UI and OCS integration (#9598) feat: manage external signing providers in LibreSign settings (#9598) Nov 24, 2026
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>
@vitormattos
vitormattos marked this pull request as draft November 24, 2026 21:13
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>
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Code Metrics Report

Note: Metrics describe the revision analyzed by the successful PHPUnit run. Newer commits with pending, canceled or failed checks may not yet be represented in this report.

main (64db6c0) #9665 (098932a) +/-
Coverage 78.0% 78.0% -0.1%
Test Execution Time 5m24s 5m24s 0s
Details
  |                     | main (64db6c0) | #9665 (098932a) |  +/-  |
  |---------------------|----------------|-----------------|-------|
- | Coverage            |          78.0% |           78.0% | -0.1% |
  |   Files             |            537 |             538 |    +1 |
  |   Lines             |          29953 |           30007 |   +54 |
+ |   Covered           |          23393 |           23426 |   +33 |
  | Test Execution Time |          5m24s |           5m24s |    0s |

Code coverage of files in pull request scope (0.0% → 61.1%, patch 61.1%)

Files Coverage +/- Patch Coverage Status
lib/Service/Policy/Provider/ExternalSigning/ExternalSigningPolicy.php 61.1% +61.1% 61.1% added
lib/Service/Policy/Provider/PolicyProviders.php 0.0% 0.0% - modified

Reported by octocov

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

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

Labels

frontend Frontend work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the generic external signing administration UI

1 participant