Skip to content

[auto-rotation feature] feat: add key auto-rotation specification + manual rotation for all key types#968

Open
Manuthor wants to merge 3 commits into
developfrom
docs/key-autorotation-spec
Open

[auto-rotation feature] feat: add key auto-rotation specification + manual rotation for all key types#968
Manuthor wants to merge 3 commits into
developfrom
docs/key-autorotation-spec

Conversation

@Manuthor
Copy link
Copy Markdown
Contributor

@Manuthor Manuthor commented May 28, 2026

Summary

Delivers the complete key auto-rotation specification and the full manual-rotation
implementation for all key types.

This is PR 1 of 4 in the key auto-rotation feature stack:

develop
  ← PR 1  docs/key-autorotation-spec          ← this PR
  ← PR 2  feat/key-rotation-scheduler          (#970)
  ← PR 3  feat/key-rotation-notifications      (#971)
  ← PR 4  feat/key-rotation-ui                 (#973)

What's included

Documentation

  • Full rotation-policy attribute table (x-rotate-interval, x-rotate-name,
    x-rotate-offset, x-rotate-generation, x-rotate-date)
  • Seven rotation scenarios with Mermaid diagrams: plain key, wrapping key,
    wrapped key, asymmetric key pair, wrapped private key (CoverCrypt),
    certificate renewal (ReCertify), server-wide KEK
  • KMIP link chain after successive rotations (ReplacementObjectLink /
    ReplacedObjectLink)
  • Attribute update table for auto-rotation vs manual rekey (intentional asymmetry)
  • Server-side scheduler configuration reference
  • HSM-resident key limitation note
  • Step-by-step end-to-end configuration guide
  • Implementation roadmap with actual branch names and PR numbers for all 4 PRs

Implementation — Re-Key, Re-Key Key Pair, Re-Certify

Complete manual-rotation implementation for all six scenarios:

  1. Plain symmetric key — new material, new UID, rotation metadata
  2. Wrapping key — rotate + re-wrap all dependants (two-phase commit)
  3. Wrapped key — unwrap → new material → re-wrap
  4. Asymmetric key pair — new private key + new public key UIDs, all curve types
    (RSA, EC, ML-KEM, ML-DSA, SLH-DSA, X25519, secp256k1, CoverCrypt)
  5. Wrapped private key / CoverCrypt — CoverCrypt rekeying with wrapping preserved
  6. Server-wide KEK — transparent via default wrapping config

Implements ReCertify (KMIP 2.1 §6.1.45) for certificate renewal:

  • Self-signed and CA-signed renewal
  • Replacement link chain management (ReplacedObjectLink / ReplacementObjectLink)
  • Offset-based PreActive state for future-activation certificates

All 344 test vectors pass.

Breaking changes

None.

Reviewer notes

This document is the canonical reference for all subsequent PRs in this stack.
Please review terminology and attribute semantics carefully; changes here will
cascade to the implementation PRs.

@Manuthor Manuthor changed the title docs: add key auto-rotation specification [auto-rotation feature] docs: add key auto-rotation specification May 28, 2026
@Manuthor Manuthor changed the title [auto-rotation feature] docs: add key auto-rotation specification [auto-rotation feature] feat: add key auto-rotation specification + manual rotation for all key types May 29, 2026
@Manuthor Manuthor force-pushed the docs/key-autorotation-spec branch from 6cc8ce5 to fa12cc6 Compare May 29, 2026 14:02
Manuthor and others added 3 commits May 31, 2026 08:29
Add comprehensive specification for scheduled key rotation covering:
- 6 rotation scenarios (plain, wrapping, wrapped, asymmetric, CoverCrypt, KEK)
- Rotation policy vendor attributes (x-rotate-interval, etc.)
- Server-side cron scheduler
- KMIP attribute tables (auto vs manual rotation semantics)
- Implementation roadmap (5 stacked PRs)

Ref: #900
…s + test vectors (#969)

* feat(rekey): implement symmetric key ReKey with wrapping key re-wrap

- Implement KMIP ReKey for symmetric keys with name transfer per §4.4
- Support re-wrapping dependent keys when a wrapping key is rekeyed
- Add find_wrapped_by() to ObjectsStore trait (SQLite, PostgreSQL, MySQL)
- Fix: transfer Name attribute from old to new key during ReKey
- Fix: error on self-wrap when wrapping_key_id is user-supplied
- Fix: bypass ownership check for server-configured KEK

Tested with 37 vector tests (9 symmetric + 27 keypair + 1 security)

* fix: consolidate rekey operations using trait

* feat: consolidate Recertify operation
@Manuthor Manuthor force-pushed the docs/key-autorotation-spec branch from fa12cc6 to 5f27e21 Compare May 31, 2026 06:30
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