Harden installer dependencies and prepare the 0.11 release candidate
This commit is contained in:
1 parent
2f686b6499
commit
f5e8e84e3c
6 files changed
+165
-19
No files matched your search
@@ -20,6 +20,8 @@ work items in [Gitea issues][issues]. Published versions and their release
|
|||||||
notes are available on [Gitea Releases][releases].
|
notes are available on [Gitea Releases][releases].
|
||||||
|
|
||||||
See [Contributing](CONTRIBUTING.md) for the project workflow.
|
See [Contributing](CONTRIBUTING.md) for the project workflow.
|
||||||
|
See [Security](docs/security.md) for deployment hardening and private
|
||||||
|
vulnerability reporting.
|
||||||
|
|
||||||
[milestones]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/milestones
|
[milestones]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/milestones
|
||||||
[issues]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/issues
|
[issues]: https://code.hosting.hippogrief.nl/hippogrief/coulobre/issues
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ if [ ! -x "$venv/bin/python" ]; then
|
|||||||
python3 -m venv "$venv"
|
python3 -m venv "$venv"
|
||||||
fi
|
fi
|
||||||
if [ -z "$installed" ]; then
|
if [ -z "$installed" ]; then
|
||||||
"$venv/bin/pip" install .
|
"$venv/bin/python" -m pip install --only-binary=:all: 'pip>=26.2'
|
||||||
|
"$venv/bin/python" -m pip install .
|
||||||
fi
|
fi
|
||||||
exec "$venv/bin/coulobre-node-setup" install-receiver "$@"
|
exec "$venv/bin/coulobre-node-setup" install-receiver "$@"
|
||||||
@@ -282,6 +282,18 @@ def install_release(release, *, step=nullcontext):
|
|||||||
if key in os.environ
|
if key in os.environ
|
||||||
}
|
}
|
||||||
with step("Installing Coulobre and its Python dependencies"):
|
with step("Installing Coulobre and its Python dependencies"):
|
||||||
|
run(
|
||||||
|
BINDIR / "python",
|
||||||
|
"-m",
|
||||||
|
"pip",
|
||||||
|
"install",
|
||||||
|
"--disable-pip-version-check",
|
||||||
|
"--only-binary=:all:",
|
||||||
|
"pip>=26.2",
|
||||||
|
label="Update the virtual environment installer",
|
||||||
|
env=pip_env,
|
||||||
|
timeout=1200,
|
||||||
|
)
|
||||||
run(
|
run(
|
||||||
BINDIR / "pip",
|
BINDIR / "pip",
|
||||||
"install",
|
"install",
|
||||||
@@ -860,12 +872,9 @@ class Installer:
|
|||||||
HEALTH_TIMER,
|
HEALTH_TIMER,
|
||||||
):
|
):
|
||||||
install_unit(unit)
|
install_unit(unit)
|
||||||
if not REMOTE_MODES.intersection(
|
install_unit("coulobre-update.socket")
|
||||||
(self.plan.dns.mode, self.plan.mail.mode)
|
install_unit("coulobre-update@.service")
|
||||||
):
|
workers.append("coulobre-update.socket")
|
||||||
install_unit("coulobre-update.socket")
|
|
||||||
install_unit("coulobre-update@.service")
|
|
||||||
workers.append("coulobre-update.socket")
|
|
||||||
systemctl("daemon-reload")
|
systemctl("daemon-reload")
|
||||||
systemctl(
|
systemctl(
|
||||||
"enable", "--now", *PANEL_UNITS, *workers, "apache2.service"
|
"enable", "--now", *PANEL_UNITS, *workers, "apache2.service"
|
||||||
|
|||||||
+81
-7
@@ -542,7 +542,8 @@ From the unpacked source release, upgrade the existing virtual environment
|
|||||||
and use the [management command helper](#prepare-the-panel).
|
and use the [management command helper](#prepare-the-panel).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo /opt/coulobre/bin/pip install --upgrade '.[server,mariadb]'
|
sudo /opt/coulobre/bin/python -m pip install --only-binary=:all: 'pip>=26.2'
|
||||||
|
sudo /opt/coulobre/bin/python -m pip install --upgrade '.[server,mariadb]'
|
||||||
panel_manage migrate --noinput
|
panel_manage migrate --noinput
|
||||||
panel_manage collectstatic --noinput
|
panel_manage collectstatic --noinput
|
||||||
```
|
```
|
||||||
@@ -587,9 +588,9 @@ without service checks, follow [the collector setup](#monitor-local-and-remote-s
|
|||||||
|
|
||||||
### Install a compatible release from the panel
|
### Install a compatible release from the panel
|
||||||
|
|
||||||
The installer enables **Updates** for single-server deployments. On an
|
The installer enables **Updates** for installer-managed panels. On an
|
||||||
existing installer-managed single server, install the updater units from the
|
existing panel, install the updater units from the source release matching
|
||||||
v0.10.1 source release after upgrading the package:
|
the installed package:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo install -m 0644 deploy/systemd/coulobre-update.socket \
|
sudo install -m 0644 deploy/systemd/coulobre-update.socket \
|
||||||
@@ -602,9 +603,10 @@ A superuser with a verified second factor can choose a compatible release
|
|||||||
from **Server and services → Updates**. The updater uses the official Gitea
|
from **Server and services → Updates**. The updater uses the official Gitea
|
||||||
release over HTTPS and checks the wheel against its published SHA-256 hash.
|
release over HTTPS and checks the wheel against its published SHA-256 hash.
|
||||||
It supports the installer-managed local MariaDB database and installer
|
It supports the installer-managed local MariaDB database and installer
|
||||||
layout. Use the in-place procedure for linked mail or DNS receivers, custom
|
layout. The update manifest lists the tested starting versions. Use the
|
||||||
service unit changes, and releases requiring new dependencies. The update
|
in-place procedure for custom service unit changes and for environments
|
||||||
manifest lists the tested starting versions.
|
missing a dependency required by the target version. From 0.11 onward, the
|
||||||
|
updater checks installed dependencies before stopping panel services.
|
||||||
|
|
||||||
The panel and its workers pause during the upgrade. Refresh **Updates** after
|
The panel and its workers pause during the upgrade. Refresh **Updates** after
|
||||||
the panel returns. The latest update status names the recovery directory in
|
the panel returns. The latest update status names the recovery directory in
|
||||||
@@ -623,6 +625,78 @@ verify sign-in and service health. Archive `status.json` as root after
|
|||||||
recovery to allow a later update. Check that `panel.sql` and `venv` exist
|
recovery to allow a later update. Check that `panel.sql` and `venv` exist
|
||||||
before restoring from a directory created by an interrupted update.
|
before restoring from a directory created by an interrupted update.
|
||||||
|
|
||||||
|
### Coordinate a release across linked mail and DNS receivers
|
||||||
|
|
||||||
|
Use the in-place procedure for the first upgrade from 0.10 to 0.11 in a
|
||||||
|
linked deployment. The older web updater supports single-server upgrades.
|
||||||
|
Bring the receiver and all attached panels to the same release before
|
||||||
|
resuming provisioning. For manually configured relays, including separate
|
||||||
|
mail credential and archive relays, use the in-place procedure for the
|
||||||
|
whole fleet.
|
||||||
|
|
||||||
|
The **Updates** page in 0.11 reports the release, host, and status probe
|
||||||
|
protocol of each installer-enrolled receiver. Protocol 1 reports readiness
|
||||||
|
and release. Protocol 2 also reports a staged maintenance target. This is
|
||||||
|
a read-only addition to the probe. The mail and DNS apply request formats
|
||||||
|
keep their existing per-operation versions. Active provisioning requires
|
||||||
|
matching package releases. During a coordinated upgrade, the receiver
|
||||||
|
keeps provisioning requests paused while panels are on different releases.
|
||||||
|
Normal mail delivery, IMAP, and existing DNS answers can continue while
|
||||||
|
the provisioning socket is stopped or paused.
|
||||||
|
|
||||||
|
1. At each receiver, list the authorized panel keys. Match each fingerprint
|
||||||
|
to a panel and confirm its installed version on that host. Include every
|
||||||
|
key, including panels operated by another team. Back up the panels, the
|
||||||
|
receiver packages, and the managed mail or DNS configuration. Pause
|
||||||
|
new provisioning requests and let current jobs finish.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo /opt/coulobre/bin/coulobre-node-setup list-panels dns
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Save a root-owned JSON inventory with mode 0600, the target package version and a
|
||||||
|
fingerprint-to-version map. Replace the fingerprints and versions with
|
||||||
|
your actual values. Make a separate inventory for each role on a host.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"target": "0.11.1rc1",
|
||||||
|
"panels": {
|
||||||
|
"SHA256:panel-one-fingerprint": "0.11.0rc1",
|
||||||
|
"SHA256:panel-two-fingerprint": "0.11.0rc1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Stop the receiver socket and let instances of the corresponding apply
|
||||||
|
service finish. Stage the inventory, update the receiver to the target,
|
||||||
|
then start its socket again. Replace `dns` with `mail` for a mail receiver.
|
||||||
|
The staged receiver answers status probes and rejects apply requests.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo systemctl stop coulobre-dns-apply.socket
|
||||||
|
sudo /opt/coulobre/bin/coulobre-node-setup begin-maintenance dns /root/dns-upgrade.json
|
||||||
|
# Install the reviewed target package using its release instructions.
|
||||||
|
sudo systemctl start coulobre-dns-apply.socket
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Refresh **Updates** on each panel. Install the target when all its
|
||||||
|
receivers report that release in maintenance mode and the compatible
|
||||||
|
release is offered. Use the in-place procedure if its update requires
|
||||||
|
additional dependencies or unit changes. Keep the receivers staged if
|
||||||
|
any panel upgrade is interrupted. Check the recovery files and repair or
|
||||||
|
roll back before reopening provisioning.
|
||||||
|
5. Once every panel is running and verified at the target, update each
|
||||||
|
inventory with the observed installed versions. Finish maintenance on each
|
||||||
|
receiver, then resume provisioning and retry any affected operations.
|
||||||
|
The command checks the receiver release and the inventory against the
|
||||||
|
current authorized keys. The receiver administrator is responsible for
|
||||||
|
checking the installed version reported by every panel operator.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo /opt/coulobre/bin/coulobre-node-setup finish-maintenance dns /root/dns-upgrade.json
|
||||||
|
```
|
||||||
|
|
||||||
### Upgrade from v0.9 to v0.10
|
### Upgrade from v0.9 to v0.10
|
||||||
|
|
||||||
Use the in-place procedure above with the v0.10 source release. Keep a copy
|
Use the in-place procedure above with the v0.10 source release. Keep a copy
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
# Security
|
||||||
|
|
||||||
|
## Report vulnerabilities privately
|
||||||
|
|
||||||
|
Contact a project maintainer privately with the affected release, the
|
||||||
|
deployment layout, the affected roles, and a description of the impact.
|
||||||
|
Share minimal evidence using test data. Remove credentials, tokens,
|
||||||
|
customer data, private keys, and identifiable account information. If you
|
||||||
|
cannot find a private channel, open a Gitea issue requesting private
|
||||||
|
contact and leave the technical details out of the issue.
|
||||||
|
|
||||||
|
Maintainers confirm scope, coordinate remediation with the reporter, and
|
||||||
|
publish an advisory with the fixed releases and any operational mitigations
|
||||||
|
after users have a way to update.
|
||||||
|
|
||||||
|
## Panel and account access
|
||||||
|
|
||||||
|
- Serve the panel over HTTPS. If you use a reverse proxy, restrict the
|
||||||
|
private origin to that proxy and let the managed Apache configuration set
|
||||||
|
the forwarding headers. Keep debug mode off on shared or public hosts.
|
||||||
|
- Require two-factor authentication for staff and customer managers. Use an
|
||||||
|
authenticator app for administrative accounts and keep recovery codes in a
|
||||||
|
protected location. The **My account** page lets users verify a new email
|
||||||
|
address, replace their authenticator, renew recovery codes, and revoke
|
||||||
|
other panel sessions. Revoking panel sessions also clears unused service
|
||||||
|
login tickets. Webmail, database, and SSH sessions established separately
|
||||||
|
have their own lifetimes.
|
||||||
|
- During customer impersonation, use only the approved support
|
||||||
|
actions. Review impersonation and credential access events. Account
|
||||||
|
security actions are recorded separately and visible to the account owner.
|
||||||
|
- Verify that the panel can deliver account messages and email factors.
|
||||||
|
Treat an address used for password recovery or an email factor as a
|
||||||
|
credential and check it after changing it.
|
||||||
|
|
||||||
|
## Service boundaries and recovery
|
||||||
|
|
||||||
|
- Restrict the panel database and RabbitMQ to local access. Expose only
|
||||||
|
the client-facing ports for the functions you run. Keep Unix sockets and
|
||||||
|
environment files restricted to the identities listed in the deployment
|
||||||
|
guide. Keep each site's PHP-FPM pool and SFTP keys scoped to that site.
|
||||||
|
- Pin SSH host keys for linked nodes and off-site backups. Use dedicated
|
||||||
|
receiver keys and accounts. The panel receiver protocol is authenticated
|
||||||
|
by the enrolled panel key. Share a receiver only among cooperating
|
||||||
|
administrators who agree on service ownership and coordinate releases.
|
||||||
|
The linked-node upgrade runbook accounts for every authorized panel key.
|
||||||
|
- Review DNS delegation, mail routing permissions, and allowed forwarding.
|
||||||
|
Keep private DKIM material on the mail receiver and publish the matching
|
||||||
|
public records. Verify the mail configuration after changing packages.
|
||||||
|
- Store backup destinations and their keys separately from hosted content.
|
||||||
|
Protect recovery copies of the virtual environment and database. Test
|
||||||
|
website, database, and mailbox restores with isolated accounts and check
|
||||||
|
ownership and access afterwards.
|
||||||
|
- Keep Ubuntu or Debian packages and the panel's Python environment on
|
||||||
|
security-supported versions. Check installed dependencies against a
|
||||||
|
vulnerability advisory source such as OSV before a release. Verify both
|
||||||
|
distribution files against the reviewed Git revision and check the
|
||||||
|
wheel digest before enabling a web update.
|
||||||
|
|
||||||
|
Use the [deployment guide](deployment.md) for operating-system support,
|
||||||
|
configuration and recovery steps.
|
||||||
+5
-5
@@ -4,18 +4,18 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "coulobre-panel"
|
name = "coulobre-panel"
|
||||||
version = "0.10.2rc1"
|
version = "0.11.0rc1"
|
||||||
description = "A web hosting control panel for hosting providers and resellers."
|
description = "A web hosting control panel for hosting providers and resellers."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Django>=5.2.8,<5.3",
|
"Django>=5.2.17,<5.3",
|
||||||
"django-otp>=1.7.5,<2",
|
"django-otp>=1.7.5,<2",
|
||||||
"celery>=5.6,<6",
|
"celery>=5.6,<6",
|
||||||
"cryptography>=45",
|
"cryptography>=50",
|
||||||
"dnspython>=2.7,<3",
|
"dnspython>=2.9.2,<3",
|
||||||
"idna>=3,<4",
|
"idna>=3.15,<4",
|
||||||
"qrcode>=8.2,<9",
|
"qrcode>=8.2,<9",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user