This adds optional two factor authentication based on shared
TOTP-secrets to both login variants (password and AIO token
authentication).
The 2FA can be enabled as soon as the containers are running in a
section below the backup configuration. As long as it is not enabled,
the AIO UI shows a warning at the top, and inside the Nextcloud a
notification is shown to all Nextcloud admins, strongly recommending to
enable it. The Nextcloud admin notification is sent via the
mastercontainer's `cron.sh`, thus will be renewed whenever it is
dismissed.
In order to show the notices, this PR includes a notification system for
the AIO UI, providing two variants: notices, and warnings. Notices have
a green background and border and vanish after 5 seconds. Warnings have
a orange-leaning yellow background and border and don't vanish (and
can't be dismissed manually, neither).
Another visual improvement is highlighted section headlines: If the URL
hash matches an `h2` element's ID, the `h2` is highlighted and if the
`h2` is followed by a `detail` element, that `detail` is opened. If
effect, browsing to `#two-factor-auth` jumps to the section, which is
highlighted and opened already (as shown in the second screenshot
below).
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
AI-assistant: Claude Opus 4.8
If the backup container is currently running in restore mode, the daily
backup script now exits immediately instead of waiting indefinitely for
the container to stop. This prevents the daily backup cron from
interrupting long-running restores.
Fixes: #8414
Assisted-by: GitHub Copilot:claude-sonnet-4
The error about not being allowed to execute /start.sh were due to the
file permissions mounted from the local disk
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
## Summary
- Integrates Desec into the AIO interface which simplifies the domain
registration and domain setup.
- You can either create a new account directly or use an existing
account.
- You have a button that you can open where the process will be done.
After the process is done, the whole page reloads and you can continue
with the setup.
- Caddy and dnsmasq community containers will be activated during the
process which will take over the cert generation and enable split-brain
dns.
- Community containers will work automatically for example Vaultwarden
as the subdomains of the desec domain point automatically via a wildcard
dns entry towards the main desec domain.
- Playwright tests are added to ensure that the system works as expected
in the future
- the desec api is mocked via a small node js based file.
- the qa and other docs were updated to mention desec
Add the server-side deSEC (dedyn.io) free dynamic-DNS flow so users without a
domain can obtain one from the AIO interface.
- DesecManager drives the full flow against the deSEC API, matching its real
semantics: account creation returns HTTP 202 + email verification (no token),
a token is obtained via /auth/login/ only after the email is verified, domain
registration handles 201/409, and a wildcard CNAME rrset is created for new
accounts. Existing accounts can be used by supplying a password.
- The "awaiting verification" step is derived from the stored credentials (email
+ generated password but no token and no domain yet), not a separate flag.
register() returns false for that state so the controller can re-render the
awaiting-verification UI instead of surfacing it as an error.
- DesecController exposes POST /api/desec/register; DependencyInjection wires the
manager; account credentials (email, generated password, token) are stored in
the AIO configuration and DESEC_TOKEN is exposed to the caddy container.
- The dynamic-DNS record is refreshed with the current public IP on container
start (DockerController) and via the cron path (Cron/UpdateDesecIp, cron.sh).
- Fix an undefined-variable bug in the desecToken/desecPassword config setters
that prevented credentials from being persisted.
Co-Authored-By: szaimen <42591237+szaimen@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
The session-deduplicator only touches files under /mnt/docker-aio-config/session/, which is already owned by www-data, so running it as root grants more privilege than it needs. Dropping to www-data reduces the number of root-owned processes in the mastercontainer and follows least-privilege for the supervisord program set.