Conversation
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
Member
Author
|
The "Docker lint" check is unrelated to the changes of this PR (will be improved or fixed in #8598) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
h2element's ID, theh2is highlighted and if theh2is followed by adetailelement, thatdetailis opened. If effect, browsing to#two-factor-authjumps to the section, which is highlighted and opened already (as shown in the second screenshot below).The libraries are the same as used in https://github.com/nextcloud/twofactor_totp, to stay consistent with Nextcloud.
Screenshots are below.
Summary
3. to review, feature component)AI (if applicable)
Screenshots
After the containers are up and running:
After the link in the warning was clicked:
The same section if the link wasn't clicked but the page was scrolled down:
After 2FA was enabled successfully:
The section's
detailhas a different summary and changed content now:Logging in with the password (after stopping the containers) requires a 2FA code now:
If logging in via Nextcloud's admin link (AIO token), the 2FA code is required, too:
Inside Nextcloud a nagging notification is shown to all admins: