diff --git a/README.md b/README.md index e6c4f865..45d35015 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Functionality changes and additions * Configure domain names for which only www will be hosted Edit /etc/miabwwwdomains.conf to configure. The box will handle incoming traffic asking for these domain names. The DNS entries are entered in an external DNS provider! If you want this box to handle the DNS entries, simply add a mail alias. (existing functionality of the vanilla Mail-in-a-Box) * Add some munin plugins -* Update nextcloud to 20.0.8 +* Update nextcloud to 20.0.13 * Add nextcloud notes app * Update roundcube carddav plugin to 4.1.1 * Add roundcube context menu plugin diff --git a/api/mailinabox.yml b/api/mailinabox.yml index bd4b203b..f3290fb9 100644 --- a/api/mailinabox.yml +++ b/api/mailinabox.yml @@ -71,7 +71,7 @@ paths: x-codeSamples: - lang: curl source: | - curl -X GET "https://{host}/admin/login" \ + curl -X POST "https://{host}/admin/login" \ -u ":" responses: 200: @@ -103,13 +103,15 @@ paths: x-codeSamples: - lang: curl source: | - curl -X GET "https://{host}/admin/logout" \ + curl -X POST "https://{host}/admin/logout" \ -u ":" responses: 200: description: Successful operation content: application/json: + schema: + $ref: '#/components/schemas/LogoutResponse' /system/status: post: tags: @@ -2723,3 +2725,8 @@ components: nullable: true MfaDisableSuccessResponse: type: string + LogoutResponse: + type: object + properties: + status: + type: string diff --git a/management/daemon.py b/management/daemon.py index e8e679e4..0bbb1ad5 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -330,7 +330,7 @@ def dns_get_records(qname=None, rtype=None): r["sort-order"]["created"] = i domain_sort_order = utils.sort_domains([r["qname"] for r in records], env) for i, r in enumerate(sorted(records, key = lambda r : ( - zones.index(r["zone"]), + zones.index(r["zone"]) if r.get("zone") else 0, # record is not within a zone managed by the box domain_sort_order.index(r["qname"]), r["rtype"]))): r["sort-order"]["qname"] = i diff --git a/security.md b/security.md index 5de8c612..ac508c93 100644 --- a/security.md +++ b/security.md @@ -3,7 +3,12 @@ Mail-in-a-Box Security Guide Mail-in-a-Box turns a fresh Ubuntu 18.04 LTS 64-bit machine into a mail server appliance by installing and configuring various components. -This page documents the security features of Mail-in-a-Box. The term “box” is used below to mean a configured Mail-in-a-Box. +This page documents the security posture of Mail-in-a-Box. The term “box” is used below to mean a configured Mail-in-a-Box. + +Reporting Security Vulnerabilities +---------------------------------- + +Security vulnerabilities should be reported to the [project's maintainer](https://joshdata.me) via email. Threat Model ------------ @@ -49,9 +54,7 @@ Additionally: ### Password Storage -The passwords for mail users are stored on disk using the [SHA512-CRYPT](http://man7.org/linux/man-pages/man3/crypt.3.html) hashing scheme. ([source](management/mailconfig.py)) - -When using the web-based administrative control panel, after logging in an API key is placed in the browser's local storage (rather than, say, the user's actual password). The API key is an HMAC based on the user's email address and current password, and it is keyed by a secret known only to the control panel service. By resetting an administrator's password, any HMACs previously generated for that user will expire. +The passwords for mail users are stored on disk using the [SHA512-CRYPT](http://man7.org/linux/man-pages/man3/crypt.3.html) hashing scheme. ([source](management/mailconfig.py)) Password changes (as well as changes to control panel two-factor authentication settings) expire any control panel login sessions. ### Console access @@ -65,7 +68,7 @@ If DNSSEC is enabled at the box's domain name's registrar, the SSHFP record that `fail2ban` provides some protection from brute-force login attacks (repeated logins that guess account passwords) by blocking offending IP addresses at the network level. -The following services are protected: SSH, IMAP (dovecot), SMTP submission (postfix), webmail (roundcube), Nextcloud/CalDAV/CardDAV (over HTTP), and the Mail-in-a-Box control panel & munin (over HTTP). +The following services are protected: SSH, IMAP (dovecot), SMTP submission (postfix), webmail (roundcube), Nextcloud/CalDAV/CardDAV (over HTTP), and the Mail-in-a-Box control panel (over HTTP). Some other services running on the box may be missing fail2ban filters. diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index 12d8f9c2..c7d9622c 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -20,11 +20,11 @@ if [ -z "$TAG" ]; then # want to display in status checks. if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/20\.04\.[0-9]/20.04/' `" == "Ubuntu 20.04 LTS" ]; then # This machine is running Ubuntu 20.04. - TAG=v055 + TAG=v55 elif [ "$(lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' )" == "Ubuntu 18.04 LTS" ]; then # This machine is running Ubuntu 18.04. - TAG=v055 + TAG=v55 elif [ "$(lsb_release -d | sed 's/.*:\s*//' | sed 's/14\.04\.[0-9]/14.04/' )" == "Ubuntu 14.04 LTS" ]; then # This machine is running Ubuntu 14.04.