Table of Contents

Namespace Tharga.Team.Service.Audit

Classes

AuditAccess

Whether a caller may read the audit log, and for which team.

AuditActor

A declared actor for work that has no authenticated HTTP caller behind it — a hosted service, a message handler, a scheduled job.

AuditContextAccessor

AsyncLocal<T>-backed implementation. Registered as a singleton — the flow, not the instance, carries the value.

AuditController

Reads the audit log over HTTP, authorized identically to the Blazor view and the MCP surface.

AuditEntry

Represents a single audit log entry. Immutable record created by the audit infrastructure.

AuditEntryEntity

MongoDB entity for audit log entries.

AuditEntryFactory

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

AuditMetadataKeys

Metadata keys the toolkit writes onto Metadata.

AuditOptions

Configuration for audit logging.

AuditQuery

Query parameters for retrieving audit entries. Supports both single-value and multi-value filters.

AuditQueryResult

Result of an audit query with items and total count for paging.

AuditReadService

Both audit read services, over CompositeAuditLogger.

AuditServiceCollectionExtensions

Extension methods for registering audit logging.

AuditingApiKeyServiceDecorator

Decorator that wraps IApiKeyAdministrationService and logs audit entries for all mutation operations via CompositeAuditLogger. Read operations are passed through without logging.

AuditingTeamServiceDecorator

Decorator that wraps Tharga.Team.ITeamService and logs audit entries for all mutation operations via CompositeAuditLogger. Read operations are passed through without logging.

AuditingUserManagementServiceDecorator

Decorator that wraps IUserManagementService and logs audit entries for user administration: per-user verification (with outcome), bulk verification (one summary entry), and deletion (with team count and directory result). The directory-only listing is a read with no side effect and is not audited, consistent with team enumeration.

AuthAuditEntries

Audit entries for the two events that happen outside any service call: an interactive sign-in, and the user record created as a side effect of a first one.

CompositeAuditLogger

Dispatches audit entries to configured loggers based on AuditOptions filters, applying any registered IAuditEnrichers first.

LoggerAuditLogger

Audit logger that writes to ILogger with structured logging. Query is not supported — returns empty results.

MongoDbAuditLogger

Audit logger that writes to MongoDB via a background channel for zero-latency impact. Resolves IAuditRepositoryCollection lazily to avoid DI issues in test environments.

NoOpAuditLogger

No-op audit logger for testing or when audit logging is disabled.

Interfaces

IAuditContextAccessor

Declares the actor for audited work that has no authenticated HTTP caller.

IAuditEnricher

Adds host-defined metadata to audit entries the toolkit writes. Register with AddThargaAuditEnricher<T>().

IAuditEntryFactory

Builds an audit entry with the caller already resolved — an HTTP principal when there is one, the declared AuditActor when there is not.

IAuditLogger

Interface for audit logging. Implementations handle storage (MongoDB, ILogger, etc.).

IAuditOversightService

Reading audit across every team. Requires a system audit:read grant.

IAuditReadService

Reading one team's audit log. The interface every surface injects — the Blazor view, the REST endpoint and the MCP resource alike.

IAuditRepositoryCollection

Enums

AuditCallerFilter
AuditCallerSource

How the call reached the application.

AuditCallerType

What kind of actor an audit entry is attributed to.

AuditEventFilter
AuditEventType
AuditScopeResult
AuditStorageMode