Secure set-up: the checklist

  • For IT
  • Bugsoft Portal 4.12.14

The points production:check checks, what to do when it shows advice or an error, and which versions are supported.

After the installation and after every update, run php bin/console production:check (on an installation with install.sh: sudo bugsoft production:check). Each row gets ✓ (good), ! (advice) or ✗ (fix this first). As long as there is a ✗, the server is not ready for production. Every row is explained on Check and monitor the server.

The checklist

CheckGood whenHow to fix it
env, debug, demoAPP_ENV=production, APP_DEBUG=false, demo mode offChange .env. With debug on, visitors see error details.
key, vaultAPP_KEY and VAULT_KEKS are setphp bin/console key:generate and vault:keygen. Keep them apart from the backups.
urlAPP_URL starts with https://Set up TLS on the web server or the reverse proxy.
installedThe installation is locked and install.token is gonephp bin/console install:lock
bug_markThe BugOS ladybird (favicon and assistant mark) is unchangedPut back the original files of the release.
php, php_eolPHP 8.2 or newer with all extensions; the version still gets security updatesSee Supported versions. A package of your distribution (such as EL8 AppStream) gets backports from the vendor.
cryptoEncryption works and CRYPTO_SUITE is fixed in .envSet CRYPTO_SUITE to the suite named, and never change it again.
opcache, uploadsOPcache on; upload_max_filesize at least 6MChange the php.ini of the website.
migrationsAll database migrations have been runphp bin/console migrate
sqlite_place, sqlite_write, sqlite_wal, sqlite_health, backupWith SQLite: the database is outside the web folder, writable, runs in WAL mode, is healthy, and there is a backup from the last 36 hoursCheck the permissions (and SELinux), run cron, or php bin/console backup:run.
db_tlsWith MySQL or MariaDB: a database on this server, or TLS with a certificate checkSet DB_SSL_CA (and if needed DB_SSL_CERT, DB_SSL_KEY). Make backups with mysqldump.
storage, diskstorage/ is writable; more than 1 GB freeChange the owner, or make space.
env_file, env_place.env is only readable by its owner, and is outside the web folderchmod 600 .env; move it at once if it is in public/.
cronThe scheduled tasks ran in the last 15 minutesAdd the crontab line (cron:run every minute) or the HTTP call with CRON_TOKEN.
signin, mailA sign-in system is set up and switched on; Bugsoft Portal can send e-mailSee Sign-in and sign-in systems and Set up e-mail.
breakglass, breakglass_totpThere is an emergency account with TOTP, and BREAKGLASS_SKIP_TOTP is offphp bin/console breakglass:create; switch off BREAKGLASS_SKIP_TOTP as soon as TOTP is linked.
license, license_vendor_key, version_ageThe licence is valid, in an official package from the vendorSee The licence. A licence in its grace period is advice; a locked portal is a fail.
audit_retentionThe audit log has a retention periodChoose a period in Settings › Statistics and retention. See The audit log.

Beyond the checklist

  • Let the web server serve only public/. The application sets the security headers itself; do not add your own Content Security Policy in the web server.
  • Is there a reverse proxy or load balancer in front? Put its addresses in TRUSTED_PROXIES. Otherwise Bugsoft Portal sees the IP address of the proxy instead of the employee's.
  • Only allow outgoing traffic you use: Outbound connections.
  • Keep .env apart from the backups, and copy storage/logs/audit-anchor.log to another system regularly.
  • Limit who can get onto the server and into the database, and log that in your own systems. See Who can decrypt.
  • Choose retention periods that match your record of processing activities: Retention periods.
  • Keep Bugsoft Portal, PHP, the database and the operating system up to date.

Supported versions

PartVersionNote
PHP8.2 or newer; 8.3 or 8.4 recommendedphp.net gives PHP 8.2 security updates until 31 December 2026, 8.3 until 31 December 2027 and 8.4 until 31 December 2028. The Bugsoft Portal Docker image uses PHP 8.4.
DatabaseSQLite 3.35 or newer (one server), or MySQL 8 / MariaDB 10.6 or newer (more servers)The tests run on SQLite and MariaDB 10.11.
Web serverApache 2.4 with mod_rewrite, or nginx 1.18 or newerTLS is required.
Bugsoft PortalThe latest version and the one before itAs in the terms (article 10). Security updates are in the release notes.

Stuck? See Questions and problems or contact Bugsoft at ugurs156@gmail.com.