What each cloud records: audit logs across providers

Unit 1 of 5 in Cloud logging, detection and response.

You will be able to explain control plane and data plane records and say what AWS, Azure and Google Cloud record by default.

Lesson

Two kinds of record: the control plane and the data plane

Every cloud lets you do two different things. You can manage resources (create a server, change who may access a bucket, turn logging on) and you can use them (read an object, call a function). The first is called the control plane and the second the data plane. Providers keep separate records for each, and the data plane record is usually bigger and costs more.

AWS CloudTrail calls these management events and data events. Its documentation lists attaching a role policy, creating a network subnet and setting up logging as management events, and reading or deleting objects in a storage bucket or invoking a function as data events. It says data events are often high volume and are not logged by default: you must add each resource type you want.

Azure draws the same line. Its activity log records management operations such as creating a virtual machine or changing a key vault access policy. Azure resource logs capture data plane operations such as getting a secret from a key vault or making a request to a database, are not collected by default and need a diagnostic setting.

AWS: CloudTrail

CloudTrail records actions taken by a user, a role or an AWS service as events, whether they came from the console, the command line or code. Its documentation gives three ways to keep them. Event history is a viewable, searchable and immutable record of the past 90 days of management events in a Region, available without setup. A trail delivers events to a storage bucket, with optional delivery to CloudWatch Logs and EventBridge, and can cover one account or a whole organization. CloudTrail Lake is a managed store you can query, with retention you choose.

Four event types exist: management, data, network activity and Insights. By default, trails log management events but not data or Insights events. Insights events flag unusual API call rates or error rates compared with the account's normal pattern. The documentation also warns that CloudTrail log files are not an ordered stack trace, so events do not appear in a fixed order: sort by time yourself.

Azure: the activity log, resource logs and Microsoft Entra logs

The Azure activity log is collected by default with no setup, and you cannot change or delete its entries. Entries are usually available for analysis and alerting within 3 to 20 minutes, and Azure keeps them for 90 days; longer retention needs a diagnostic setting that copies them elsewhere. It typically does not capture read operations.

One line in that page deserves a highlighter. The documentation says the activity log is not an authentication or authorization audit log: a request that Azure Resource Manager rejects before an operation starts produces no entry, so it will not appear in the log or trigger an activity log alert. Rejected attempts need another source.

Who signed in, and who changed the identity system itself, lives in Microsoft Entra ID. Its audit logs record the history of every task performed in the tenant and its sign-in logs capture sign-in attempts by users and applications. Microsoft's retention page says audit and sign-in data is kept 7 days on the free tier and 30 days on the P1 and P2 tiers, and that you can keep it longer by routing it to Azure storage through Azure Monitor. The same page notes that these logs are separate from the Microsoft 365 Unified Audit Log.

Google Cloud: Cloud Audit Logs

Google Cloud writes four kinds of audit log for each project, folder and organization: Admin Activity, Data Access, System Event and Policy Denied. Admin Activity logs record API calls and actions that change the configuration or metadata of resources, such as creating a virtual machine or changing permissions; they are always written and you cannot configure, exclude or disable them, even if you disable the Cloud Logging API. System Event logs are always written too.

Data Access logs record calls that create, modify or read user-provided data. Except for BigQuery, they are disabled by default because they can generate large volumes of data, and you must turn them on for each service. Policy Denied logs are written when a service denies access because of a security policy violation, and are generated by default. The documentation says log entries written by Cloud Audit Logs are immutable, and that the caller's IP address is held in the request metadata of each entry.

Three questions to ask of any provider

The three providers differ in names and defaults, so ask the same three questions of each. What is on by default, and what must I switch on? How long is it kept before it disappears? Does it show who read data, and does it show attempts that were refused?

From the documents above: AWS management events are on, data events are not. Azure's activity log is on, resource logs are not, and refused requests are not in it. Google's Admin Activity is always on, Data Access is off except for BigQuery. In all three the answer to 'how long?' by default is measured in days to a few weeks, which is why the next unit is about keeping logs on purpose.

Key points

Sources

Lecture

Cloud shared responsibility: A talk on who owns which duty in the cloud: turning on and keeping the right logs is the customer's side of the line.

Practice in the labs

Turn on the main AWS audit trail in an account you own, hunt through network flow records, then read a Google Cloud audit log offline.

Knowledge check

  1. A team turns on AWS CloudTrail with its defaults and later wants to know who read a particular object in a storage bucket. What is the problem? Answer: Object reads are data events, and data events are not logged by default. AWS documents object-level activity such as GetObject as a data event type, and says data events are not logged by default; you must add each resource type you want to record.
  2. In Azure, someone tries to change a resource and the request is rejected before the operation starts. Where would you expect to find it? Answer: Not in the activity log: Microsoft says it is not an authentication or authorization audit log. Microsoft's documentation says requests rejected during authentication or authorization before an operation starts do not generate activity log entries, so another source such as sign-in logs is needed.
  3. Which Google Cloud audit log can you not turn off? Answer: Admin Activity logs. Google documents Admin Activity audit logs as always written; you cannot configure, exclude or disable them. Data Access logs, by contrast, are off by default except for BigQuery.
  4. Why is it a bad idea to rely on default retention alone for an investigation? Answer: Defaults are measured in days to weeks, so evidence can expire before you need it. AWS Event history keeps 90 days, the Azure activity log 90 days, and Entra sign-in and audit logs 7 to 30 days by tier; each page says longer keeping needs a trail, a diagnostic setting or routing the logs elsewhere.

Back to the syllabus or see all classes.

Related