Class PropsSigningKeyStore

Assembly: redb.Identity.Core.dll

PROPS-backed implementation of . Singleton; resolves
and through a fresh DI
scope () per operation to avoid captive-scoped-into-
singleton traps (identical lifetime pattern to RedbXmlRepository, A1).

Private keys are stored as DataProtection-encrypted base64 PEM bytes with the purpose
string redb.identity.signing-keys.v1. The DataProtection key ring is itself
bootstrapped from PROPS (RedbXmlRepository), therefore RedbXmlRepositoryInitListener
MUST execute before SigningKeyInitListener in InitRoute.main.

public sealed class PropsSigningKeyStore : ISigningKeyStore

Inheritance

Object→PropsSigningKeyStore

Implements

Methods

EnsureBootstrappedAsync(string, CancellationToken)

Generates an initial active key for the given kind if the store contains no active key.

public Task EnsureBootstrappedAsync(string keyKind, CancellationToken ct = default)

GetAllAsync(CancellationToken)

Returns all keys currently in the store with NotAfter still in the future (active + still-valid rotated-out).

public Task<ImmutableArray<SigningKeyMaterial>> GetAllAsync(CancellationToken ct = default)

ListAllIncludingRetiredAsync(CancellationToken)

Returns every key row in the store, regardless of whether

public Task<ImmutableArray<SigningKeyMaterial>> ListAllIncludingRetiredAsync(CancellationToken ct = default)

RetireAsync(string, CancellationToken)

Immediately ends the validity window of kid by setting NotAfter to "now".

public Task<bool> RetireAsync(string kid, CancellationToken ct = default)

RotateAsync(string, CancellationToken)

Generates a fresh key of the given kind and marks every currently-active key of the same kind

public Task<SigningKeyMaterial> RotateAsync(string keyKind, CancellationToken ct = default)

Constructors