Table of Contents

Interface IStoredSecretStore

Namespace
MailFathom.Infrastructure.Secrets.Database
Assembly
MailFathom.Infrastructure.dll

Writes and inventories material held behind a database secret reference.

public interface IStoredSecretStore

Remarks

Reads of material deliberately do not appear here. Every consumer resolves the reference through ISecretReferenceResolver, so no application service gains general secret-reading access. Writes join the caller's persistence session so a future document writer can commit the reference and its material together or roll both back.

Fields

MaximumKeyReferenceCount

The largest key-retirement inventory one read returns.

MaximumMaterialByteCount

The largest material one database-backed secret write accepts.

Properties

CanStore

Gets whether the deployment configures the key ring required to seal material.

Methods

ReadReferencesSealedByKeyAsync(string, int, CancellationToken)

Reads a bounded inventory of stored secrets still sealed under one key.

RemoveAsync(IPersistenceSession, DatabaseSecretReference, UserId, CancellationToken)

Stages removal of one stored secret only when it belongs to the stated user.

StoreAsync(IPersistenceSession, DatabaseSecretReference, UserId, SecretName, ResolvedSecret, CancellationToken)

Seals and stages one stored secret, creating its user-and-name identity or replacing its material.