luci-plugin-2fa: init checkin#8280
Conversation
This comment has been minimized.
This comment has been minimized.
|
@Tokisaki-Galaxy: Nice, good job! Do not forget to solve: |
|
Looks very polished @Tokisaki-Galaxy! Does this use TOTP? If the OpenWrt device doesn't have RTC and is offline or generally doesn't have correct time, does SSH become the only option to login? Is there a README/instructions (ideally a hint on failed attempt) on how to disable 2FA from SSH/CLI for people who may be locked out of WebUI and can't read code ahead of time? |
|
Please refer to the newly added video at the top of the description section for details. The plugin can choose either TOTP or HOTP, but TOTP is recommended. Regarding the documentation for SSH/CLI, I'm not quite sure where it should be placed. Should it be directly included in the web UI? But if users don't read it carefully, they might not be able to log in and it would be impossible to see the result. Do you have any suggestions? Previously, it was planned to add backup code, but this was abandoned because it would cause the bitward auto-fill function to become unusable and the complexity would be too high. |
d55e8c5 to
0e97b5b
Compare
This comment has been minimized.
This comment has been minimized.
fe02937 to
bed757a
Compare
|
@Tokisaki-Galaxy let's see whether the plugin structure needs some modifications to handle 2FA stuff. |
bed757a to
325529e
Compare
|
@systemcrash |
325529e to
6561e45
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6561e45 to
ef1dfdd
Compare
e3d2761 to
f91d3eb
Compare
|
Refactored |
...-plugin-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Show resolved
Hide resolved
...uci-app-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Outdated
Show resolved
Hide resolved
...uci-app-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Outdated
Show resolved
Hide resolved
...uci-app-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Outdated
Show resolved
Hide resolved
...uci-app-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Outdated
Show resolved
Hide resolved
...-plugin-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
...uci-app-2fa/root/usr/share/ucode/luci/plugins/auth/login/bb4ea47fcffb44ec9bb3d3673c9b4ed2.uc
Outdated
Show resolved
Hide resolved
|
OK - thanks for your patience. This is looking good now. LGTM. |
|
Thank you so much for your patience and thorough review! As a non-CS university student with no professional work experience yet, I’ve learned a lot through this process. This project has given me my first real taste of large-scale team collaboration, and your guidance has been invaluable in helping me improve. |
1d9eaf6 to
a54c74d
Compare
This comment has been minimized.
This comment has been minimized.
|
To highlight that this is a plugin, how about naming it |
c1a9e39 to
28bcab6
Compare
|
great! I have rename and rebase commit |
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Han Yiming <moebest@outlook.jp> luci-app-2fa: add priority option and QR code display This update adds a priority option and enables QR code display for 2FA. luci-app-2fa: native ubus IPvalid fsLOCK and log use native ubus IP validation instead of custom regex and parsing, use native fs lock instead of popen-call and add log for logging auth events. now, will clean stale rate limit entries on each check and log when entries are removed due to staleness. This prevents the rate limit file from growing indefinitely with old entries. luci-app-2fa: move dir and sync sysfixtime move to the new location. update the default time calibration threshold to sync sysfixtime. luci-app-2fa: native hex and more readable use native hex and base32 decoding functions Signed-off-by: Han Yiming <moebest@outlook.jp>
28bcab6 to
1833462
Compare
|
sorry, I forget edit Makefile, have rename and update URL
***@***.***
…------------------ Original ------------------
From: "openwrt/luci" ***@***.***>;
Date: Tue, Apr 7, 2026 09:18 PM
***@***.***>;
***@***.******@***.***>;
Subject: Re: [openwrt/luci] luci-app-2fa: init checkin (PR #8280)
@systemcrash commented on this pull request.
In plugins/luci-plugin-2fa/Makefile:
> @@ -0,0 +1,23 @@ +# +# Copyright (C) 2026 tokisaki galaxy ***@***.***> +# Copyright (C) 2024 Christian Marangi ***@***.***> +# +# This is free software, licensed under the Apache License, Version 2.0. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luci-app-2fa
Here also :)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
OK - let's see how it works :) |
|
Thank you very much! |
|
@Tokisaki-Galaxy: Thanks for your good work and thanks to @systemcrash for merging! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Failed checksIssues marked with an ❌ are failing checks. Commit 1833462
For more details, see the full job log. Something broken? Consider providing feedback. |
Signed-off-by: <my@email.address>row (viagit commit --signoff)<package name>: titlefirst line subject for packagesPKG_VERSIONin the Makefile[POC,WIP] Implement 2-Factor Authentication with TOTP or HOTP #7069
Feature request: Support for Passkey (WebAuthn) authentication in LuCI #8273
2026-02-04.180055.mp4
the app must changed LuCI core file because:
Security Measures
Constant-time string comparison to prevent timing attacks
Username sanitization to prevent command injection
Array-based popen to prevent shell injection
OTP format validation (exactly 6 digits)
Session destroyed if 2FA verification fails
Uses authenticated session username to prevent bypass attacks
origin repo https://github.com/Tokisaki-Galaxy/luci-app-2fa