Skip to content

feat: Enforce issuer validity limits and warnings - #2820

Open
aw1cks wants to merge 1 commit into
smallstep:masterfrom
aw1cks-forks:submit/issuer-validity-limit
Open

aw1cks wants to merge 1 commit into
smallstep:masterfrom
aw1cks-forks:submit/issuer-validity-limit

Conversation

@aw1cks

@aw1cks aw1cks commented Oct 11, 2026 •

Copy link
Copy Markdown

Name of feature:

Limit X.509 certificate validity to the issuing CA chain.

Pain or issue this feature alleviates:

A certificate can currently be issued with an expiry date later than its intermediate or root CA, even though it will stop being trusted when that CA expires.

This change shortens the certificate's lifetime to match its issuing chain and reports a warning. Operators can set authority.issuerValidityLimit to reject instead if they need requests for a longer lifetime to fail.

Why is this important to the project (if not answered above):

Users and renewal tools rely on a certificate's expiry date. Making that date reflect its usable lifetime avoids a misleading signal, while the warning tells operators that the issuing CA needs attention.

Is there documentation on how to use this feature? If so, where?

The README's Issuer validity limits section covers configuration, warnings, and operational caveats. The changelog records the behavior change.

In what environments or workflows is this feature supported?

  • Local SoftCAS issuance: signing, renewal, rekey, and subordinate CA creation.
  • Native CA requests and SSH-associated X.509 identities. Their responses include warnings when validity is shortened.
  • ACME and SCEP issuance, with warnings in server logs and no changes to successful protocol responses.
  • StepCAS forwarding of warnings from the upstream CA.

In what environments or workflows is this feature explicitly NOT supported (if any)?

This does not enforce limits in Vault, Cloud CAS, or other external signers, or in standalone step certificate create/sign. It does not change SSH certificate validity, automatically renew CAs, or add proactive startup-expiry warnings.

Existing renewal scheduling is unchanged. Shortened certificates can fall below the provisioner's minimum lifetime, and a fixed renewal interval longer than the remaining lifetime can cause repeated renewals. The reject policy also applies to the CA's own TLS certificate, so it can prevent startup near CA expiry.

Verification:

Much of the diff is regression coverage for the issuance paths affected by #381 and #560. The tests cover signing, renewal/rekey and subordinate CA creation, checking both certificate expiry and the warnings or errors returned through the relevant APIs and protocols. This guards against fixing one issuance path while leaving others inconsistent.

After rebasing onto current upstream, both repositories' full short test suites passed and both binaries built. Earlier verification also covered the TPM simulator, lint, focused CLI race checks, and real issuance and warning-handling scenarios.

Supporting links/other PRs/issues:

Bound local X.509 expiration by the selected signing path and its matching
roots, defaulting to truncation with an explicit reject policy. Preserve
policy selection in generated SoftCAS configurations and enforce before
signing or subordinate-key creation.

Carry successful truncation warnings through native and SSH identity
responses, request-correlated logs, internal issuance, and StepCAS.
Map typed policy rejections to native, ACME, and SCEP responses without
changing their successful protocol payloads.

Document backend scope, below-minimum validity, startup and renewal risks.
Cover real authorities, path rotation, persistence ordering, protocol
responses, warning isolation, and generated configuration roundtrips.

See smallstep#381, smallstep#560
@CLAassistant

CLAassistant commented Oct 11, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the needs triage Waiting for discussion / prioritization by team label Oct 11, 2026
@aw1cks
aw1cks marked this pull request as ready for review October 11, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants