Files
wekan/client/features/settings.js
T
Lauri Ojansivu 6cde02380a Admin Panel / Attachments / Encrypt: attachments on disk encrypted with ATTACHMENTS_PASSPHRASE, at the same addresses.
The last item of docs/Compliance/README.md's P3 list, on the maintainer's
decision: while ATTACHMENTS_PASSPHRASE is set (at least 16 characters), a
site administrator gets Admin Panel / Attachments / Encrypt, which
encrypts or decrypts every attachment on this server's disk in the
background with progress, and turns on encryption of new attachments.

- AES-256-CTR (server/lib/attachmentEncryption.js), so a download can
  start anywhere: the counter for any byte is the IV plus its block. The
  key is stretched from the passphrase with scrypt once per salt and kept
  in memory. Each file starts with WKATT1, the salt and its own IV; a file
  without the header is plain and read as before.
- Every read goes through FileStoreStrategyFilesystem.getReadStream, which
  decrypts - byte ranges included - so every address, preview, export and
  storage move is unchanged; the board export and the WebDAV move, which
  read the file directly, use the same decrypting read.
- New uploads are encrypted after their validation and indexing, which
  need the plain file; imports, e-mail to card and the REST API by an
  hourly sweep. Each changed attachment's meta.updatedAt is set, so the
  filesystem integrity scan sees the change explained. The runs and the
  switch are in the Audit log.
- On every platform, the snap and the Helm chart (from a Secret).

Tested against a live server (tests/playwright/specs/attachment-encryption.e2e.js):
an attachment encrypted on disk downloads at the same address, whole and
as a byte range, and decrypts back to the same bytes. Seven new strings,
translated in every language. Low confidence: ace, ak, ay, bi, bm, bo, bua,
chr, csb, dz, ee, ff, fj, gn, gv, haw, iu, kl, kok, ks, kw, lg, lld, nah,
nap, nd, nso, fur, mg, tlh, tig, ti, wal, om, ve-PP, ve-CC, rup, zgh, uz-AR,
sah, vo, wuu-Hans, se, qu, to, sm, ss, ts, ve, ny, rn, tn, st, wa, sc, scn.

Thanks to xet7 !
2026-11-24 13:19:44 +02:00

85 lines
4.9 KiB
JavaScript

import '/client/components/settings/adminProblems.jade';
import '/client/components/settings/adminAuditLog.jade';
import '/client/components/settings/attachments.jade';
import '/client/components/settings/attachmentEncryption.jade';
// Backup status and history, shared by Attachments / Backup and Problems / Backup.
import '/client/components/settings/backupRunsStatus.jade';
import '/client/components/settings/connectionMethod.jade';
import '/client/components/settings/informationBody.jade';
import '/client/components/settings/invitationCode.jade';
import '/client/components/settings/migrationProgress.jade';
import '/client/components/settings/notificationSettingsPopup.jade';
import '/client/components/settings/notificationDeliverySettings.jade';
import '/client/components/settings/emailToCardSettings.jade';
import '/client/components/settings/emailBounces.jade';
import '/client/components/settings/peopleBody.jade';
import '/client/components/settings/settingBody.jade';
import '/client/components/settings/sharedLabelsSettings.jade';
import '/client/components/settings/settingHeader.jade';
import '/client/components/settings/leftMenu.jade';
import '/client/components/settings/tablePage.jade';
import '/client/components/settings/tablePage.js';
import '/client/components/settings/translationBody.jade';
import '/client/components/settings/adminProblems.js';
import '/client/components/settings/attachments.js';
import '/client/components/settings/attachmentEncryption.js';
import '/client/components/settings/backupRunsStatus.js';
import '/client/components/settings/connectionMethod.js';
import '/client/components/settings/informationBody.js';
import '/client/components/settings/invitationCode.js';
// The left menu's caret. Its .jade above only DRAWS the caret: the click that
// folds the menu and the `isLeftMenuCollapsed` helper that says whether it is
// folded live here, and package.json sets meteor.mainModule, so a file nobody
// imports is simply not in the bundle. Without this line the caret rendered and
// did nothing - an unregistered helper is undefined, so the panel never took
// the `collapsed` class either. docs/Features/All-Boards/Left-Menu.md
import '/client/components/settings/leftMenu.js';
import '/client/components/settings/lockedUsersBody.js';
import '/client/components/settings/adminAuditLog.js';
import '/client/components/settings/migrationProgress.js';
import '/client/components/settings/notificationSettingsPopup.js';
// #3695: notification delivery (content, grouping, schedule) per channel, in
// Notification Settings and in each outgoing webhook form.
import '/client/components/settings/notificationDeliverySettings.js';
// #794: email to card, in the same popup.
import '/client/components/settings/emailToCardSettings.js';
// #794: Admin Panel -> E-mail -> Bounces.
import '/client/components/settings/emailBounces.js';
import '/client/components/settings/peopleBody.js';
import '/client/components/settings/settingBody.js';
import '/client/components/settings/sharedLabelsSettings.js';
import '/client/components/settings/settingHeader.js';
import '/client/components/settings/problemsSummary.jade';
import '/client/components/settings/problemsSummary.js';
import '/client/components/settings/passwordLengthReport.jade';
import '/client/components/settings/passwordLengthReport.js';
import '/client/components/settings/complianceReport.jade';
import '/client/components/settings/complianceReport.js';
// Admin Panel / Problems / Webhooks: every webhook and who added it.
import '/client/components/settings/webhooksReport.jade';
import '/client/components/settings/webhooksReport.js';
// Admin Panel / Settings / Privacy and security / Allowed addresses.
import '/client/components/settings/adminPanelAddresses.jade';
import '/client/components/settings/adminPanelAddresses.js';
import '/client/components/settings/adminPanelAddresses.css';
import '/client/components/settings/translationBody.js';
// adminProblems.css was missing here, so NONE of the Admin Panel report styling
// was in the bundle (package.json sets meteor.mainModule, so a CSS file that is
// never imported is simply not loaded). That is why the report search box and
// the prev/next pagination buttons fell back to the global `button` rule in
// forms.css and rendered with a black/grey background instead of the theme.
import '/client/components/settings/adminProblems.css';
import '/client/components/settings/complianceReport.css';
import '/client/components/settings/attachments.css';
import '/client/components/settings/informationBody.css';
import '/client/components/settings/lockedUsersBody.css';
import '/client/components/settings/adminAuditLog.css';
import '/client/components/settings/migrationProgress.css';
import '/client/components/settings/peopleBody.css';
import '/client/components/settings/settingBody.css';
import '/client/components/settings/settingHeader.css';
import '/client/components/settings/tablePage.css';
import '/client/components/settings/translationBody.css';