Audit Trail¶
Part 11 and Annex 11 expect secure, computer generated, time stamped audit trails that record who did what and when, retained as long as the underlying records.12 Each Posit product produces part of that trail.
What each product records¶
| Product | Source | Contents | Where |
|---|---|---|---|
| Workbench | audit-r-sessions=1 (on by default with named user licenses) |
Logins and logouts for every IDE; session start, suspend, and exit for RStudio Pro sessions only | /var/lib/rstudio-server/audit/r-sessions3 |
| Workbench | audit-r-console=input or all |
Console input (and output with all) per user |
/var/lib/rstudio-server/audit/r-console3 |
| Workbench | Server logs | Auth events, admin actions | /var/log/rstudio/rstudio-server/4 |
| Connect | Audit log (always on) | User, group, content, permission, and deployment changes | Database; optional file via Logging.AuditLog5 |
| Connect | Job logs | Each render, schedule run, and deployment with output | Data directory, viewable per content item6 |
| Package Manager | Audit log (off by default; [AuditLog] Enabled = true) |
Repository, source, subscription, and token changes, and access to authenticated repositories; Posit documents this as "not comprehensive" | /var/log/rstudio/rstudio-pm/rstudio-pm-audit.log10 |
| Package Manager | Activity log | Package version changes per repository (add, update, archive, delete) | Web UI, database11 |
| Package Manager | Access log | Every HTTP request, including package downloads | /var/log/rstudio/rstudio-pm/rstudio-pm.access.log10 |
| Package Manager | Prometheus metrics | Package download counts (ppm_pkg_downloads_total) |
Metrics endpoint, default port 211212 |
Configuration¶
Workbench:
Console auditing of output (all) can generate a lot of data; size storage accordingly. In Positron sessions, only input mode is supported, for both R and Python consoles.3
Connect's audit trail always writes to its database and cannot be disabled; Logging.AuditLog only adds an optional second destination such as a file.5 A JSON copy of the audit log for a SIEM:7
Dump the Connect audit log on demand (the older --csv flag is deprecated in favor of --csvlog):8
Shipping logs¶
Local log files are not an audit trail on their own: an administrator can edit them, and they disappear with the VM. Forward them to a central, access controlled store (Splunk, Elastic, Microsoft Sentinel, a write once bucket):
- Forward the Workbench audit directories and Connect JSON audit log with your log agent (rsyslog, Fluent Bit, Splunk Universal Forwarder, Azure Monitor Agent)
- Restrict who can delete or modify the central copies
- Keep server clocks synchronized (chrony/NTP); timestamps are only meaningful if the clocks agree, and Connect HA requires it anyway9
Retention and review¶
| Item | Typical requirement (confirm with QA) |
|---|---|
| Audit trail retention | As long as the associated records (often years past study close) |
| Periodic review | Sampling of audit records and access lists on a fixed cadence |
| Access review | Confirm each user with GxP access still needs it |
| Admin activity | Separate review of privileged actions |
What is not captured¶
Be explicit with QA about gaps, and cover them with procedure:
- File edits in a Workbench session are not audited by Workbench; version control (Git) is the record of code changes
- Session auditing (
audit-r-sessions) only covers RStudio Pro sessions. Console auditing (audit-r-console) only covers RStudio Pro and Positron. Neither covers Jupyter or VS Code sessions.3 - Data access from inside R or Python (database queries, file reads) is audited by the data source, not by Posit
- Changes made by root on the server (config edits, package installs into the system library) appear only in OS level audit (
auditd) and your change records