Access logs are the silent witnesses of your role-based access system. They record every permission check, every role assignment, every access attempt. But without a systematic way to read them—to see the story they tell over time—you're flying blind. Authorization drift happens gradually: a developer gets temporary admin rights that never expire, a role gains an extra permission in a routine update, a terminated employee's account lingers with active privileges. Each change seems small, but together they erode your security posture. This guide gives you a practical five-step process to spot drift in your audit logs, using the tools and data you already have.
1. Why Authorization Drift Is Your Access Model's Quiet Enemy
Authorization drift is the slow, often unnoticed divergence between your intended access policies and what's actually enforced. It's not a single event—it's the accumulation of small deviations that, over weeks or months, can create a permission model that looks nothing like what you designed. For teams managing role-based access controls, drift is especially dangerous because roles are meant to be stable; when they silently expand, you lose control.
Think about a typical scenario: your company uses a role called "DatabaseReadOnly" that grants SELECT-only access. During an incident, a senior engineer asks for temporary write access to fix a corrupted row. You grant it via a custom role override. The incident gets resolved, but the override stays. Next quarter, that engineer's role is used as a template for a new hire, and suddenly you have two people with unintended write access. That's drift.
The consequences can be severe. Industry surveys suggest that a significant percentage of data breaches involve compromised or misused credentials, many of which trace back to overly permissive access. Regulators like SOC 2 and GDPR require periodic access reviews, and undetected drift can lead to compliance failures, fines, and loss of customer trust. But drift isn't just a security problem—it's an operational one. It complicates onboarding, offboarding, and incident response because you can't trust that your role definitions reflect reality.
What Drift Looks Like in Audit Logs
In your access logs, drift manifests as patterns: a user exercising a permission that doesn't match their assigned role, a role assignment that was never formally approved, or a policy change that wasn't propagated to all enforcement points. The logs might show "access granted" events for actions that should be denied, or they might be silent—meaning the access was allowed without an audit trail. The key is to know what to look for.
Who Should Care About This
This guide is for anyone responsible for access control in their organization: security engineers, compliance officers, IT managers, and system administrators. If you've ever wondered whether your roles are still accurate, or if you're preparing for an audit and want to proactively clean up permissions, the steps here will give you a repeatable process. You don't need a dedicated security team or expensive tools—just access to your audit logs and a willingness to ask hard questions.
2. What You Need Before You Start Tracing the Trail
Before you dive into log analysis, you need a few things in place. First, you need reliable audit logs. That means your systems are configured to log every authorization decision—not just failures, but successful grants as well. Many organizations only log denied access, which creates a blind spot for drift because the dangerous drift is the access that was allowed when it shouldn't have been.
Second, you need a baseline—a snapshot of your intended access model. This could be a role matrix, a policy document, or a set of IAM role definitions. Without a baseline, you can't tell if a log entry represents drift or a legitimate change. Your baseline should include: each role's name, its permissions, who is assigned to it, and the approval process for changes. If you don't have this documented, start by exporting your current role definitions and assignments—that's your de facto baseline, but note it may already contain drift.
Tools and Data Sources
You'll need access to your audit log storage. This could be a SIEM like Splunk or Elastic, a cloud-native logging service (AWS CloudTrail, Azure Monitor, Google Cloud Audit Logs), or a simple log file. For role-based systems, look for events like: RoleAssigned, RoleModified, PermissionAdded, AccessGranted (especially for sensitive operations), and PolicyChanged. You'll also need a way to query these logs—SQL or a query language like KQL or SPL.
Permissions to Review Logs
Make sure your account has read access to the audit logs and the IAM system. You don't need superadmin rights, but you need to be able to see all log entries, not just those for your own user. If your organization restricts log access, you may need to request a temporary review role. This step itself can be a test of your access controls—if it's hard to get read access to logs, that's a red flag.
Time Frame and Context
Decide on a review window. A good starting point is the last 90 days—enough time to see patterns but recent enough that changes are still relevant. If you're preparing for an audit, you might need to go back 12 months. Also, gather context about recent changes: were there any organizational restructures, system migrations, or staff changes? These events often introduce drift because permissions are changed under time pressure.
3. Five Steps to Spot Authorization Drift in Your Logs
Here's the core workflow. Each step builds on the previous one, so follow them in order. Depending on the size of your environment, this process might take a few hours or a few days.
Step 1: Baseline Your Current State
Start by extracting a current snapshot of all roles, their permissions, and user assignments. Export this from your IAM system. Compare it to your documented baseline (if you have one) or to the previous snapshot from your last review. Look for roles that have changed—any permission added, removed, or modified. Also look for users in roles they shouldn't be in, or roles that have no users (orphaned roles). This gives you a high-level view of drift before you dive into logs.
Step 2: Query for Role and Permission Changes
Now go to your audit logs. Query for events that modify roles or permissions: event_type = 'RoleModified' OR event_type = 'PermissionAdded'. Group by role and time. Look for changes that happened outside of normal change windows, or that were made by users who typically don't make IAM changes. Flag any changes that don't have an associated approval ticket or comment. This is where drift often starts—unapproved modifications.
Step 3: Analyze Access Patterns for Anomalous Grants
Drift isn't just about role changes—it's also about access that shouldn't be happening. Query for successful access to sensitive resources (e.g., production databases, admin panels) grouped by user and role. Then compare the user's role to the permission required for that access. For example, if a user in the "Viewer" role successfully performed a DELETE operation, that's a clear sign of drift—either the role is misconfigured, or there's an override somewhere. List all such mismatches.
Step 4: Track Role Assignments and Deprovisioning Gaps
Look at role assignment events over time. Are there users who were assigned a temporary role that was never revoked? Are there terminated users still assigned roles? Query for assignment events where there's no corresponding revocation event within a reasonable period (e.g., 30 days for temporary roles). Also check for users who have multiple roles that together grant excessive privileges—role accumulation is a common drift pattern.
Step 5: Correlate with Change Management Records
Finally, cross-reference your findings with change management or ticketing system logs. Every role modification should have a ticket. Every temporary access grant should have an expiry date. For each drift finding in steps 2-4, check if there's a corresponding approval. If not, flag it as unauthorized drift. This step separates the signal from the noise—some changes are legitimate even if they deviate from baseline, as long as they were approved.
4. Tools and Setup for Effective Log Analysis
You don't need a massive budget to detect drift, but you do need the right setup. Most organizations already have the raw data; the challenge is making it accessible and actionable. Here's what to consider.
SIEM and Log Management Platforms
If you have a SIEM (like Splunk, Elastic, or Sumo Logic), you can build dashboards that automatically flag drift indicators. For example, a Splunk query that shows all role changes in the last 7 days, sorted by user, with a link to the change ticket. Cloud-native tools like AWS Config or Azure Policy can also track IAM changes in near real-time. The key is to set up alerts for specific drift signals: a new role created outside of business hours, a permission added to a highly privileged role, or a user assigned to a role they've never held before.
Automated Drift Detection Scripts
If you don't have a SIEM, you can write simple scripts using your IAM provider's CLI or API. For example, a Python script that pulls all IAM roles from AWS, compares them to a known-good JSON file, and emails you any differences. Schedule it to run daily. This is low-cost and effective for small to medium environments. Just be careful with permissions—the script itself needs read access to IAM and logs.
Manual Review: Spreadsheets and SQL
For one-off audits, you can export logs to CSV and use pivot tables in Excel or Google Sheets. Or if your logs are in a database, write SQL queries to find anomalies. For example: SELECT user, role, action FROM access_logs WHERE action IN ('delete','update') AND role NOT LIKE '%admin%'. This works but is time-consuming; use it as a starting point until you automate.
Common Setup Mistakes
One common mistake is not logging successful access events—only denied events. Without success logs, you can't see what was actually granted. Another is not including enough detail in logs: you need the user, role, action, resource, timestamp, and source IP at minimum. Also, ensure logs are immutable—if an attacker can modify logs, they can hide drift. Finally, don't forget to log role assignments and policy changes, not just resource access.
5. Variations for Different Environments and Constraints
Not every team has the same resources or risk profile. Here are ways to adapt the five-step process when you're working with limited tools, time, or scope.
For Small Teams with No SIEM
Focus on the highest-risk areas: roles that grant administrative access, financial system access, or access to sensitive data. Run steps 2 and 3 manually once a month using your IAM provider's console. Export role definitions and compare them to a printed baseline. Use cloud provider built-in tools like AWS IAM Access Analyzer or Azure Privileged Identity Management—they can automatically flag unused or excessive permissions.
For Large Enterprises with Complex RBAC
Automate as much as possible. Use a SIEM to continuously monitor for drift signals and create alerts. Implement a change approval workflow that requires a ticket number for every role modification—then use that to automatically suppress approved changes from your drift reports. Consider using a governance tool like SailPoint or Okera that provides drift detection out of the box. For compliance, schedule quarterly deep dives using the full five-step process.
For Cloud-Native Environments (AWS, Azure, GCP)
Each cloud provider offers specific tools. In AWS, use IAM Access Analyzer to identify roles that are accessible from outside your account, and AWS Config to track IAM policy changes. In Azure, use Azure Monitor and Azure Policy to detect role assignment changes. In GCP, use Cloud Audit Logs and Access Transparency. The five steps translate directly: your logs are in CloudTrail/Activity Logs/Audit Logs, and your roles are IAM roles.
When You're Under Time Pressure (Quick Audit)
If you have only a few hours, skip steps 1 and 5. Start with step 2: query for role changes in the last 30 days. Then step 3: look for sensitive access by non-admin users. This will catch the most dangerous drift. Document any findings and schedule a full review later. This is not ideal, but it's better than nothing.
6. Pitfalls, Debugging, and What to Check When the Trail Goes Cold
Even with a solid process, things can go wrong. Here are common pitfalls and how to handle them.
False Positives: When Legitimate Changes Look Like Drift
Not all deviations from baseline are drift. A role might be intentionally updated as part of a project. The key is to distinguish between approved and unapproved changes. If you don't have a change management system, you'll need to manually investigate each finding—ask the role owner or check recent project documentation. To reduce false positives, maintain a list of known-good changes (e.g., a scheduled role update) and exclude them from your alerts.
Log Overload: Too Much Data, Too Little Signal
In large environments, audit logs can generate millions of events per day. Trying to read them all is impossible. Instead, focus on high-value events: role changes, permission modifications, and access to critical resources. Use filtering and aggregation queries. For example, instead of looking at every access grant, look only for grants to sensitive resources that don't match the user's primary role. Also, set up alerts for rare events—like a role being modified outside of normal hours.
Missing Logs: Gaps in the Trail
If you find a drift indicator but the corresponding log entry is missing, you have a bigger problem: your logging is incomplete. Check that all authorization points are logging to the same system. Sometimes drift happens because a new service was deployed without logging enabled. Or logs might be rotated or deleted before you review them. Ensure your log retention policy matches your audit window (at least 90 days, preferably 12 months).
When the Baseline Itself Is Drifted
If you're starting from a dirty baseline—your current state already contains drift—the first review will produce many false positives. In that case, treat the first review as a cleanup exercise: identify all current roles and permissions, remove or correct the ones that are clearly wrong, and then use the cleaned version as your new baseline. This might require a separate project with stakeholder approval.
What to Do When You Find Drift
Document each finding with the evidence (log entries, timestamps, user). Assess the risk: is it a critical system? Could it lead to data exposure? Then take action: revoke the excessive permissions, remove the user from the role, or revert the role to its intended state. If the change was accidental, implement a process to prevent recurrence—like requiring approval for all role modifications. Finally, update your baseline to reflect the corrected state.
Now that you've completed the five steps, you have a clear picture of your authorization health. Make this process a regular habit—monthly for high-risk environments, quarterly for others. The time you invest in reading the trail now will save you from much bigger problems later.
Comments (0)
Please sign in to post a comment.
Don't have an account? Create one
No comments yet. Be the first to comment!