Ranger records each access decision as an audit event, sent to Solr for searching in the Ranger Admin UI and to HDFS for long-term storage. Cloudera documents a 90-day default for Solr audit retention and no automatic purge for HDFS, so you set the long-term retention yourself. This guide covers what is logged, retention, the reports that answer examiner questions and how to package the evidence. It supports our Cloudera SDX, Ranger and Atlas consulting page.
What is logged
Each Ranger plugin (HDFS, Hive, Impala, HBase and others) checks access against policy and writes an event. The Apache Ranger wiki publishes an audit schema; Cloudera's audit overview describes destinations and settings. An access event typically records who, what, when and the result:
| Question an examiner asks | Where it shows in the event |
|---|---|
| Who accessed it? | The user, and the groups used for the decision |
| What did they access? | The resource: database, table, column or path |
| What did they do? | The access type, such as select, read or write |
| Was it allowed? | The result, and the policy that decided it |
| When and from where? | Event time and client address |
| Through which system? | The agent or plugin and service name |
Field names and content vary by plugin and release. Also check what is not captured: data values read, and activity on systems with no Ranger plugin.
Ranger also writes admin audit for policy changes: who changed which policy and when. Keep that too. It answers "who gave this access".
Retention
| Destination | Cloudera default | What you decide |
|---|---|---|
| Solr (searchable in Ranger Admin) | 90 days per Cloudera's 7.3.1 documentation, set by the Solr audit TTL | Keep as is for investigation; do not rely on it for multi-year retention |
| HDFS (long term) | No default retention or purge; you manage storage, retention and archive | The period set by your regulator and legal hold rules |
Cloudera recommends writing audits to both. Solr serves search; HDFS keeps the archive.
Decide the HDFS retention period with compliance, then write the purge job and test it. Audit data grows quickly on a busy cluster, so size storage and partition by date. If HDFS is your only long-term store, protect it: restrict who can read or delete audit files and log changes to them.
Reports
The Ranger Admin audit pages let you filter access events by user, resource, result and time. For examinations, prepare reports ahead of the request:
- Who accessed a sensitive table in the review period, and how often.
- All denied attempts on sensitive resources.
- Access by privileged and service accounts.
- Policy changes in the period, with the user who made them.
- Access to data classified through Atlas tags, if you use tag-based policies. See Atlas to Ranger tags.
For recurring reports, query the HDFS archive or load it into a table so you are not limited to the Solr window.
Evidence pack
An examiner wants a small, consistent pack, not a data dump. Build it once and refresh it each quarter:
- A one-page description of how Ranger and audit are set up: plugins, destinations, retention.
- The policy list for in-scope data and its owners. See Ranger policy design.
- A sample access report for the period, with one worked example from request to result.
- The policy change history for the same period.
- The retention evidence: configuration and a restore test.
- The exceptions list: systems with no Ranger plugin and what covers them.
The worked example audit evidence from Ranger for an examination shows the shape. It is an illustrative scenario, not a client.
Sizing and cost
Audit volume depends on how many queries and file reads your cluster runs, so measure before you promise a retention period. Sample a week of audit data, note the size per day and multiply by the retention you intend. Include the HDFS replication or erasure-coding overhead. A short test now avoids a full disk later, and gives you a number to show finance when the retention period is long.
Questions we hear
How long should we keep Ranger audit logs? As long as your regulator and your own policy require; the platform default is not an answer.
Do audit logs prove data was not misused? No. They show decisions at the access point, not what a user did with data afterwards.
Can we mask values in audit? Check your release and plugin settings for what is stored.
Questions examiners ask and the report that answers them
| Question | Report | Where it comes from |
|---|---|---|
| Who can read customer account data, and who did? | Access by user on the customer tables for the period | Ranger audit, Solr for recent, HDFS archive for older |
| Did anyone try to reach restricted data and fail? | Denied events on restricted resources | Ranger audit, filtered by result |
| Who changed the rules? | Policy change history | Ranger admin audit |
| Do service accounts have more access than people? | Access by service account, with the policy that allowed it | Ranger audit joined to the policy list |
| How do you know the audit is complete? | Plugin status and a gap list of systems without plugins | Ranger Admin plugin status; your exceptions list |
Prepare these once, save the filters or queries and run them each quarter. A report built under time pressure is the one most likely to contain mistakes.
Pitfalls
- Relying on the Solr window for evidence older than its retention.
- Letting HDFS audit files grow unmanaged until a disk fills.
- Not auditing a service that has no Ranger plugin.
- Forgetting that group membership at the time of access may differ from today's.
- Keeping audit but not the policy version in force at the time.
A first engagement
Duczer East reviews your Ranger audit set-up and builds the evidence pack above. Scope is agreed in writing first.



