-
Technical task
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
To support audit functionality, TCU needs to meet the following basic requirements. There are some rough ideas on them.
Requirement 1: Record Deleter Identity in TCU Metadata
Problem
When a file is deleted and moved to the trash, TCU records the original file owner but not the identity of the user who performed the deletion. For audit purposes, we need to know who deleted the file, not just who owned it.
Proposed Changes
Extend lustre_unrm_xattr to include deleter identity fields captured at unlink time from lu_ucred:
- Deleter UID/GID — the user performing the unlink
- JobID — from lu_ucred->uc_jobid, useful for HPC workload tracing
- NID — the client network address performing the deletion
Requirement 2: Export Purged File Records During ltrash_purge
Problem
When ltrash_purge permanently removes a trash entry, all metadata about the deleted file is lost. For audit and compliance purposes, we need to export a record of each purged file before it is permanently removed.
Proposed Changes
Add an audit export hook in ltrash_purge that writes a structured record for each purged file after the final unlink()/rmdir(). The record should include the following information in some format(DB, file, ...):
- Purge timestamp
- Original file path
- FID
- File size, mode, timestamps (atime/mtime/ctime)
- Original owner (UID/GID/projid)
- Deletion timestamp
- Deleter identity (UID/GID, JobID, NID) — from Requirement 1