SaaS Audit Logging: Events, Evidence, and Review Checklist
Learn what SaaS audit logs should capture, which audit events matter, why logs miss tenant data leaks, and how to evaluate audit log coverage during security review.
On this page
- What is a SaaS audit log?
- What SaaS audit logs should capture
- SaaS audit events that matter for security review
- How to evaluate SaaS audit logs
- Common SaaS audit logging failures
- Role of Audit Logs in SaaS Systems
- Append Only Logging
- Tenant Scoped Audit Events
- Designing the Audit Event Model
- Example Audit Log Schema
- Capturing Audit Events in ASP.NET Core
- Enforcing Audit Log Immutability
- Restrict permissions
- Trigger enforcement
- External replication
- Failure Scenario
- Engineering Checklist
- Observability and Security Integration
- Compliance Considerations
SaaS Audit Logging: Events, Evidence, and Review Checklist
SaaS audit logs are supposed to show who did what, in which tenant, against which object, and under which authorization result.
- Many teams have logs, but not enough evidence.
- A request can return
200 OK, expose the wrong tenant’s data, and still appear normal in logs. - This article explains which SaaS audit events to capture, where coverage fails, and how to evaluate the logs before an incident.
If you need a review against your own product, start with SaaS audit log review.
What is a SaaS audit log?
A SaaS audit log records security relevant product actions.
It is different from application logging and observability. Operational logs help engineers debug requests, trace failures, and measure service behavior. Audit logs preserve evidence about security sensitive actions inside the product.
A useful audit log should capture:
- actor
- tenant
- object
- action
- timestamp
- authorization result
- request or correlation context
That evidence supports investigations, access review, compliance evidence, and incident response.
If the record cannot answer those questions, it is not strong enough for security review.
What SaaS audit logs should capture
A strong SaaS audit log should include the events reviewers expect to see when they look for tenant access, privilege changes, and data exposure paths.
Capture at least:
- authentication events
- role and permission changes
- tenant membership changes
- admin/support impersonation
- object access
- denied authorization attempts
- data exports and report generation
- API key creation and revocation
- billing/security setting changes
- sensitive configuration changes
Each event should also preserve enough context to answer who acted, which tenant was affected, and what object or action was involved.
If a team later needs SaaS audit trail requirements, these are the fields that usually make the difference between evidence and noise.
SaaS audit events that matter for security review
Security review is not just about the final successful action. It is about the event sequence that proves how the system behaved.
The most important audit event groups are:
- allowed access events
- denied access events
- role escalation events
- export events
- admin/support access events
- API token events
- tenant ownership and membership changes
- background job actions
Allowed and denied events both matter. Denied access attempts often show probing, boundary testing, and policy enforcement. Allowed events show the final state change or data access that actually occurred.
Role escalation, export generation, and admin/support access deserve separate events because those are the actions that usually matter most during a real review.
Background jobs should not disappear into a generic system bucket. If a service account exports data, touches a tenant object, or applies a role change, the audit trail should still show what happened and on whose behalf.
How to evaluate SaaS audit logs
Use this checklist to see whether the logs are good enough for security review:
- Can you answer who acted?
- Can you answer which tenant was affected?
- Can you answer which object was accessed or changed?
- Can you see whether access was allowed or denied?
- Can you trace a request across services?
- Can you detect admin/support access?
- Can you prove exports and reports were scoped?
- Can you tell if logs are immutable?
- Can you reconstruct an incident without guessing?
If any of those answers depend on stitching together current database state, the audit trail is too weak.
A multi tenant SaaS security audit should also check whether logs preserve tenant, actor, object, and action context when a boundary fails.
For request-level proof on tenant and role boundaries, see RBAC audit, support admin access audit, and export data leak audit.
Common SaaS audit logging failures
These are the failure patterns that usually break audit review:
- logs only capture successful actions
- denied authorization attempts are missing
- audit events lack tenant ID
- audit events lack object ID
- role changes lack previous and new values
- exports are not logged
- admin impersonation is not logged
- background jobs log as generic system
- logs are mutable
- audit logs are separate from authorization testing
If you see several of these at once, the log set may exist but still fail to prove what happened during an incident.
That is why preventing cross-tenant leakage and tenant isolation testing for SaaS stay relevant even when audit logs are present.
Role of Audit Logs in SaaS Systems
Audit logs are a security evidence layer, not just a debugging aid.
Application logs tell you what the service did. Audit logs tell you what the product allowed, denied, changed, or exposed in a security relevant context.
That distinction matters every time a user accesses a tenant resource, an admin changes a role, or a background job exports customer data.
The best audit logs answer the reviewer question directly: what happened, to whom, in which tenant, and under what authorization result?
Append Only Logging
The most important property of an audit logging system is immutability.
Once written, audit events should not be updated or deleted.
Append only design usually means:
- no updates to prior events
- no deletes from the audit table
- new events are appended instead of rewriting history
In relational databases, that is usually enforced with restricted permissions, database triggers, or immutable storage replication.
If attackers gain administrative access, they often try to erase history. Append only logging keeps the evidence visible.
Tenant Scoped Audit Events
Every audit event should carry tenant or organization context at write time.
That context should not be reconstructed later from mutable application data.
If a request returns the wrong tenant’s data but the log only says success, the audit trail has not captured enough evidence to explain the failure.
Core fields usually include:
- TenantId
- ActorId
- ActorType
- EventType
- ObjectType
- ObjectId
- AuthorizationResult
- TimestampUtc
- CorrelationId
- Metadata
For boundary failures, the audit event should say which tenant the actor operated in at the moment the action occurred.
Designing the Audit Event Model
The event shape determines whether the log is useful for security review.
A minimal model like this is too thin:
User updated recordIt does not show tenant scope, object identity, or authorization result.
A better model captures structured evidence:
- actor and actor type
- tenant and organization context
- object type and object ID
- action type
- authorization result
- timestamp
- request or correlation ID
- before and after values when relevant
- source context such as IP address or client type
That structure makes it much easier to review role changes, admin activity, and data exports without guessing.
Example Audit Log Schema
Example schema suitable for PostgreSQL:
CREATE TABLE AuditEvents (
Id UUID PRIMARY KEY,
TenantId UUID NOT NULL,
ActorId UUID NULL,
ActorType VARCHAR(50) NULL,
EventType VARCHAR(100) NOT NULL,
ObjectType VARCHAR(100) NULL,
ObjectId UUID NULL,
AuthorizationResult VARCHAR(50) NULL,
PreviousValue JSONB NULL,
NewValue JSONB NULL,
TimestampUtc TIMESTAMP NOT NULL DEFAULT NOW(),
CorrelationId VARCHAR(100) NULL,
IpAddress VARCHAR(50) NULL,
UserAgent TEXT NULL,
Metadata JSONB NULL
);
CREATE INDEX idx_audit_tenant_time
ON AuditEvents (TenantId, TimestampUtc DESC);This structure supports tenant scoped queries while preserving enough metadata for later review.
Capturing Audit Events in ASP.NET Core
Audit logging should be centralized infrastructure rather than scattered across application code.
Example service interface:
public interface IAuditLogger
{
Task LogAsync(AuditEvent auditEvent);
}Implementation:
public class AuditLogger : IAuditLogger
{
private readonly AppDbContext _db;
public AuditLogger(AppDbContext db)
{
_db = db;
}
public async Task LogAsync(AuditEvent auditEvent)
{
_db.AuditEvents.Add(auditEvent);
await _db.SaveChangesAsync();
}
}Usage example:
await _auditLogger.LogAsync(new AuditEvent
{
Id = Guid.NewGuid(),
TenantId = tenantId,
ActorId = userId,
ActorType = "User",
EventType = "RoleAssigned",
ObjectType = "User",
ObjectId = targetUserId,
AuthorizationResult = "Allowed",
TimestampUtc = DateTime.UtcNow
});Centralized logging makes coverage more consistent across services and request paths.
Enforcing Audit Log Immutability
Application logic alone should not guarantee immutability.
Database safeguards should also exist.
Restrict permissions
Application roles should have only INSERT privileges on audit tables.
Trigger enforcement
Example PostgreSQL trigger:
CREATE FUNCTION prevent_audit_modification()
RETURNS trigger AS $$
BEGIN
RAISE EXCEPTION 'Audit events are immutable';
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER audit_immutable
BEFORE UPDATE OR DELETE ON AuditEvents
FOR EACH ROW
EXECUTE FUNCTION prevent_audit_modification();External replication
Some teams also replicate audit logs to separate storage so the primary database cannot erase the only copy of the evidence.
For the deeper architecture behind that pattern, see tamper-resistant audit trails.
Failure Scenario
This is the kind of failure that makes SaaS audit logs look fine until they are needed.
An attacker compromises an internal admin account and assigns themselves elevated roles.
If the platform logs login events but not role assignments, engineers cannot reconstruct how privileges changed.
If it logs only successful actions, denied probing is missing too.
If it omits tenant ID or object ID, the investigation can no longer prove what was touched.
The result is a log set that exists, but cannot answer the most important questions.
Engineering Checklist
A production SaaS audit logging system should ensure:
- append only storage
- tenant scoped events
- structured metadata
- denied access events are logged
- role and permission changes are logged
- admin and support actions are logged
- exports and report generation are logged
- request or correlation IDs are preserved
- database level immutability enforcement
- long term retention strategy
- tenant optimized indexing
- authorization testing stays separate from log capture
If the checklist is incomplete, the audit log may still be useful operationally, but it may not be strong enough for security review.
Observability and Security Integration
Audit logs can feed monitoring workflows, but that is a secondary use.
The evidence model comes first. Alerting comes after the log is trustworthy.
Compliance Considerations
Audit logs also support SOC 2, ISO 27001, and similar review processes.
That is a benefit, but it should not drive the design away from tenant scope, object scope, and immutable evidence.
Need to know if your SaaS audit logs prove what happened?
We review whether your audit logs capture tenant access, role changes, admin actions, exports, authorization decisions, denied access attempts, and the evidence needed during incident investigation.
Related Articles
Continue with related security guides
Explore practical next steps for authorization, tenant isolation, audit logging, and SaaS security reviews.
SaaS security audit
Review authorization, tenant boundaries, and data exposure.
Multi tenant security audit
Test tenant boundaries across APIs, jobs, exports, and roles.
Cross tenant data leak audit
Find places where one customer can see another customer's data.
Tenant isolation audit
Validate tenant scoping in code, queries, and workflows.
Need a SaaS security review?
Check where authorization, tenant boundaries, and audit trails can fail before they turn into an incident.
