Table of Contents

Class AuditCoverage

Namespace
FishMMO.ControlPanel.Services
Assembly
FishMMO-ControlPanel.dll

Checks at startup that every privileged write endpoint declares what it records.

public static class AuditCoverage
Inheritance
AuditCoverage
Inherited Members

Remarks

AuditActionFilter already guarantees that a privileged write is recorded even with no attribute on it, so nothing goes unlogged. This check is about the quality of that record, and about when the mistake is found: a derived action name changes the day somebody renames a controller method, which silently breaks every saved query and every retention rule written against it.

It runs once, over the endpoint table, at boot. Outside production it throws, so the omission is a failed first run rather than a hole discovered months later. In production it logs an error and starts anyway — refusing to serve a shard because an endpoint has a weak audit name would be a worse outage than the problem.

Methods

Verify(IServiceProvider, IWebHostEnvironment, ILogger)

Runs the check, throwing outside production when an endpoint is undeclared.

public static void Verify(IServiceProvider services, IWebHostEnvironment environment, ILogger logger)

Parameters

services IServiceProvider
environment IWebHostEnvironment
logger ILogger