feat(secrets-ui): add/rotate/delete modal + audited gated reveal

This commit is contained in:
Joseph Doherty
2026-07-15 17:20:01 -04:00
parent d7f8ca455b
commit 21556cc1a7
15 changed files with 950 additions and 14 deletions
@@ -0,0 +1,24 @@
using System.Collections.Concurrent;
using ZB.MOM.WW.Audit;
namespace ZB.MOM.WW.Secrets.Ui.Tests.Fakes;
/// <summary>
/// An <see cref="IAuditWriter"/> test double that collects every <see cref="AuditEvent"/> written,
/// so a test can assert on the audit trail (action, outcome, target, actor) and — critically — that
/// no plaintext ever appears in any audit field.
/// </summary>
public sealed class CapturingAuditWriter : IAuditWriter
{
private readonly ConcurrentQueue<AuditEvent> _events = new();
/// <summary>The events captured so far, in write order.</summary>
public IReadOnlyList<AuditEvent> Events => _events.ToArray();
/// <inheritdoc />
public Task WriteAsync(AuditEvent evt, CancellationToken ct = default)
{
_events.Enqueue(evt);
return Task.CompletedTask;
}
}