Journaling: capture at the queue, the built-in journal, retention
Phase 2 of the journaling spec. - A copy of each message is taken in MessageWrapper::queue, after DLP and transport rules, for every enabled journal that takes it (direction and scope: everyone, or accounts, groups, domains, tenants). If the copy can't be taken the message isn't queued (temporary failure). - The journal report: the envelope one field a line (sender, To, Cc, Bcc from the envelope, list members from their ORCPT, direction, held for review), then the queued message byte for byte as message/rfc822. - The built-in journal under J in the inbuxa subspace: one chain per node whose links name each entry by SHA-256, so entries can expire out of chain order; purge leaves a marker, and verify catches an entry changed or removed early and a report that doesn't match. - Retention per journal (30 to 3650 days); an entry keeps what it was written with. The daily maintenance purges what's due, keeping entries whose people a legal hold covers (deleted accounts a hold keeps too), and records the counts in the audit log. - inbuxa:Journal get/set, audited by the request layer. Permissions 680-683: administrators see and change journals; the Compliance Officer sees, searches and exports. Whoever changes journals may grant search and export without holding them, so officers can still be appointed. - Catalog entries (inbuxa:Journal, source "journal"); spec as-built notes. tests/src/system/journal.rs: validation, internal mail with a Bcc, outgoing into two journals, incoming over LMTP, the report and its original, tamper and early removal caught, hold-aware purge, retention changes leave entries alone, disabled and removed journals take nothing.
This commit is contained in:
@@ -165,6 +165,14 @@ impl AccessToken {
|
||||
mut requested_permissions: Permissions,
|
||||
) -> Result<(), Vec<Permission>> {
|
||||
requested_permissions.difference(self.permissions_bits());
|
||||
// inbuxa: journaling, JR-18: whoever sets up journals may give
|
||||
// others (or, through a role, themselves) the reading of them,
|
||||
// which administrators don't hold by default; the role change is
|
||||
// in the audit log
|
||||
if self.has_permission(Permission::SysJournalUpdate) {
|
||||
requested_permissions.clear(Permission::SysJournalSearch as usize);
|
||||
requested_permissions.clear(Permission::SysJournalExport as usize);
|
||||
}
|
||||
if requested_permissions.is_empty() {
|
||||
Ok(())
|
||||
} else {
|
||||
@@ -307,6 +315,13 @@ impl Default for DefaultPermissions {
|
||||
| Permission::SysDlpReviewUpdate => {
|
||||
default.superuser.push(permission);
|
||||
}
|
||||
// inbuxa: journals are the server's; administrators set them
|
||||
// up but read what's journaled only if granted it
|
||||
// (journaling spec, JR-18, settled answer 5)
|
||||
Permission::SysJournalGet | Permission::SysJournalUpdate => {
|
||||
default.superuser.push(permission);
|
||||
}
|
||||
Permission::SysJournalSearch | Permission::SysJournalExport => {}
|
||||
// inbuxa: AL-12: tenant administrators lock and delegate
|
||||
// within their tenant
|
||||
Permission::SysAccountLockGet
|
||||
|
||||
@@ -69,6 +69,10 @@ const OFFICER: &[Permission] = &[
|
||||
Permission::SysDlpPolicyGet,
|
||||
Permission::SysDlpReviewGet,
|
||||
Permission::SysDlpReviewUpdate,
|
||||
// journaling spec, JR-18: see journals, search and export them
|
||||
Permission::SysJournalGet,
|
||||
Permission::SysJournalSearch,
|
||||
Permission::SysJournalExport,
|
||||
];
|
||||
|
||||
/// What a tenant's officer holds besides [`READS`].
|
||||
|
||||
@@ -52,6 +52,8 @@ const ADMIN_GRANTS: &[Permission] = &[
|
||||
Permission::SysDlpPolicyUpdate,
|
||||
Permission::SysDlpReviewGet,
|
||||
Permission::SysDlpReviewUpdate,
|
||||
Permission::SysJournalGet,
|
||||
Permission::SysJournalUpdate,
|
||||
];
|
||||
|
||||
/// Granted to the server-level Compliance Officer role once it exists:
|
||||
@@ -61,6 +63,10 @@ const OFFICER_GRANTS: &[Permission] = &[
|
||||
Permission::SysDlpPolicyGet,
|
||||
Permission::SysDlpReviewGet,
|
||||
Permission::SysDlpReviewUpdate,
|
||||
// journaling spec, JR-18: see journals, search and export them
|
||||
Permission::SysJournalGet,
|
||||
Permission::SysJournalSearch,
|
||||
Permission::SysJournalExport,
|
||||
];
|
||||
|
||||
/// Granted to the default tenant administrator roles: reading and exporting
|
||||
|
||||
Reference in New Issue
Block a user