Skip to content

feat(signing): consolidate CSC driver catalog, encrypted configuration and admin OCS API - #9611

Merged
vitormattos merged 18 commits into
mainfrom
feat/9595-external-provider-catalog-20261121
Nov 23, 2026
Merged

vitormattos merged 18 commits into
mainfrom
feat/9595-external-provider-catalog-20261121

Conversation

@vitormattos

@vitormattos vitormattos commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Purpose

Provide the backend foundation for configuring external signing integrations in LibreSign. Implements #9595 and #9596; related to #8942 and #8943.

Changes

  • Declarative signing-driver catalog and read-only driver metadata, initially CSC v1.
  • Persistent, multi-instance integration configuration with encrypted secrets through Nextcloud ICrypto.
  • System-administrator-only OCS endpoints for listing, creating, reading, updating, enabling, disabling, and deleting configured integrations.
  • Validation of provider settings and safe endpoint URLs, write-only secret handling, optimistic concurrency with revision checks, and redacted API responses.
  • Database migration, regression tests, and regenerated OpenAPI/TypeScript contracts.
  • Experimental-feature gating; this PR does not implement a signer-facing authorization flow or perform remote signing.

Review priorities

  1. System-admin authorization and the experimental feature gate on every administrative endpoint.
  2. Confidentiality and lifecycle of credentials (including updates, replacement, deletion, and error paths).
  3. Concurrent updates, migration compatibility, input validation, pagination, and OCS contract consistency.

Verification

  • Focused Nextcloud 36/SQLite tests: 244 tests, 555 assertions.
  • OpenAPI tests: 45 tests, 903 assertions; generated contracts checked against source definitions.
  • GitHub Actions on 9452c4a2387051c37eba1850cf8e09c97f89d8f5: required checks passed, including database matrix, Behat, Playwright, Psalm, OpenAPI, and lint.

Dependencies and scope

This is the foundation for the independent administration UI in #9665 and the CSC signing backend in #9659. Merge and review decisions for those downstream changes are separate. No signing workflow or production credential usage is enabled here.

Review status: Yves requested changes; these must be addressed or explicitly resolved before merging, regardless of green CI.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos requested a review from a team as a code owner November 22, 2026 05:05
@github-actions

github-actions Bot commented Nov 22, 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 (d45e5e5) #9611 (8e2228c) +/-
Coverage 77.7% 78.0% +0.3%
Test Execution Time 4m26s 4m55s +29s
Details
  |                     | main (d45e5e5) | #9611 (8e2228c) |  +/-  |
  |---------------------|----------------|-----------------|-------|
+ | Coverage            |          77.7% |           78.0% | +0.3% |
  |   Files             |            525 |             537 |   +12 |
  |   Lines             |          29495 |           29936 |  +441 |
+ |   Covered           |          22940 |           23376 |  +436 |
- | Test Execution Time |          4m26s |           4m55s |  +29s |

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

Files Coverage +/- Patch Coverage Status
lib/Controller/ExternalSigningDriversController.php 100.0% +100.0% 100.0% added
lib/Controller/ExternalSigningIntegrationsController.php 97.7% +97.7% 97.7% added
lib/Exception/ExternalIntegrationConflictException.php 100.0% +100.0% 100.0% added
lib/Exception/ExternalIntegrationSecretException.php 100.0% +100.0% 100.0% added
lib/ResponseDefinitions.php 0.0% 0.0% - modified
lib/Service/Signing/ExternalIntegrationAdministration.php 100.0% +100.0% 100.0% added
lib/Service/Signing/ExternalIntegrationAvailability.php 100.0% +100.0% 100.0% added
lib/Service/Signing/ExternalIntegrationFieldValidator.php 100.0% +100.0% 100.0% added
lib/Service/Signing/ExternalIntegrationRecord.php 100.0% +100.0% 100.0% added
lib/Service/Signing/ExternalIntegrationSecrets.php 100.0% +100.0% 100.0% added
lib/Service/Signing/ExternalIntegrationStore.php 97.8% +97.8% 97.8% added
lib/Service/Signing/Provider/Drivers/Csc/CscDriver.php 100.0% +100.0% 100.0% added
lib/Service/Signing/Provider/ExternalSigningDriverCatalog.php 100.0% +100.0% 100.0% added

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>
Keep the public JSON metadata consistent with the generated OpenAPI
object schema by omitting validation on fields without rules.
Update the contract and regression test accordingly.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Keep technical protocol and driver versions out of administrator-facing
labels while preserving the stable driver ID and adapter compatibility.
Assert the intended translated strings in the existing unit test.

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

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

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

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

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ts (#9595 #9596)

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos marked this pull request as draft November 22, 2026 22:13
@vitormattos vitormattos changed the title feat(signing): expose experimental CSC v1 driver catalog (#9595) feat(signing): consolidate CSC driver catalog, encrypted configuration and admin OCS API Nov 22, 2026
@vitormattos
vitormattos marked this pull request as ready for review November 22, 2026 22:30
vitormattos added a commit that referenced this pull request Nov 23, 2026
…#9611)

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

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos added a commit that referenced this pull request Nov 23, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos added a commit that referenced this pull request Nov 23, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos added a commit that referenced this pull request Nov 23, 2026
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@YvesCesar
YvesCesar self-requested a review November 23, 2026 15:51

@YvesCesar YvesCesar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vitormattos !

I made a few revisions. Could you take a look?

* Distinguish the global rollout gate, the instance's administrative switch,
* and the driver's independently reported technical availability.
*/
final class ExternalIntegrationAvailability {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: ExternalIntegrationAvailability has no caller in lib/ (only its unit test), and the same goes for ExternalIntegrationStore::findRetainedReference() (line 201). Since signing belongs to #9659, would it make sense to move them there with their first consumer?

…eview (#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>
…ation

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>
@vitormattos
vitormattos merged commit 7312fba into main Nov 23, 2026
81 checks passed
@vitormattos
vitormattos deleted the feat/9595-external-provider-catalog-20261121 branch November 23, 2026 22:55
vitormattos added a commit that referenced this pull request Nov 23, 2026
…ion (#9611)

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants