Manage multiple certificate authorities by organizational context

Open
#9,443 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
php

Research direction

Start by reading the existing policy infrastructure and the code for CA configuration, certificate issuance, key storage, and CRL routing; the issue does not name specific files or tests. Map how issuer identity and organizational context flow through those paths before proposing an implementation. Done means multiple CAs operate with context isolation, legacy certificates and CRL URLs remain valid, and the specified authorization and revocation tests and documentation are complete.

Written by the indexing model from the issue text.

Description

enhancement

Goal

Allow a single LibreSign installation to manage multiple certificate authorities (CAs) and associate them with organizational contexts through the existing policy system.

This enables distinct certificate issuers for SaaS customers without equating a Nextcloud group identifier with the cryptographic identity of a CA.

Current behavior

The active CA is identified primarily through instance-level configuration. Certificate issuance, private-key storage and CRL handling are not yet designed around a registry of independent issuers.

Confirmed requirements

  • Register multiple CAs with stable, opaque public identifiers.
  • Preserve issuer identity, key generation and certificate engine (OpenSSL or CFSSL).
  • Maintain compatibility with the existing single-CA configuration and certificates.
  • Associate CAs with groups and organizational contexts without exposing group names in public CRL paths.
  • Support system-wide defaults and group-scoped CA selection through existing policy infrastructure.
  • Allow the system administrator to delegate specific CA administration capabilities.
  • Separate policy configuration from privileged CA operations, key custody and rotation.
  • Keep CA private keys protected; do not expose raw private-key export as an ordinary group administration feature.
  • Maintain correct CRL generation, distribution, caching and revocation for each issuer.
  • Preserve historical CRL URLs and validation of existing certificates.
  • Identify revocation records by issuer and serial number rather than treating serial numbers as globally unique.
  • Handle users belonging to multiple groups without ambiguous implicit issuer selection.

Initial architectural direction

Use independent CA identities with explicit associations to organizational contexts. Keep engineType as part of CRL routing. Start with independently managed roots; evaluate intermediate-CA hierarchies separately if a demonstrated need arises.

Questions to resolve

  • Whether one context may authorize several CAs.
  • Provisioning, rotation, disablement and eventual retirement of a CA.
  • Exact delegated operations available to group administrators.
  • Migration of legacy issuer, storage and CRL metadata.
  • Isolation boundaries in a shared SaaS process.

Done when

  • Multiple issuers can coexist and operate without cross-context certificate or key access.
  • Policies determine CA eligibility through backend-validated contexts.
  • Revocation and validation remain correct for new and historical certificates.
  • Cross-engine, cross-context and negative authorization tests pass.
  • CA administration and migration are documented.

Handoff

Before closing, reconcile downstream subject-attribute and signing-selection epics with the actual issuer identity, organizational-context and authorization contracts.

Dominant language
PHP
Stars
844
Forks
176
Avg merge
14h 3m
Merged PRs (30d)
344

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LibreSign/libresign

All issues in LibreSign/libresign

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.