Add OctoPrint-MFA-Passkeys to registry#1428
Add OctoPrint-MFA-Passkeys to registry#1428daedalas1981 wants to merge 2 commits intoOctoPrint:gh-pagesfrom
Conversation
|
Hi @daedalas1981 and thanks for your contribution! I reviewed your plugin source and below are my initial thoughts. This plugin is highly security relevant, so expect additional in-depth reviews from me and maybe other contributors/maintainers to follow, and please understand that this PR may take significantly longer than other plugins. PackagingIn OctoPrint's modern plugin packaging system, import setuptools
# we define the license string like this to be backwards compatible to setuptools<77
setuptools.setup(license="AGPLv3")And everything else is defined in Please also note that you need to provide a valid email in XSSHere you have a basic Cross-Site Scripting vulnerability since you concatenate user-supplied input into the page's HTML without sanitization. You must sanitize the output of arbitrary data before concatenation, for example by using Path TraversalHere you have a path traversal vulnerability. Please check Use of removed functionsIn OctoPrint 2.0.0 (OctoPrint's
|
|
@jneilliii could you please assign this to me? Thanks |
Hi @jacopotediosi , thanks for your quick response! UPDATEDA few of your comments were a little harder to convert. I have tested the update in place via the plugin manager which worked as expected. I will need time to run the entire plugin again from a fresh install of Octopi in case of any unforeseen issues with the new updates. Will follow-up when completed. |
|
Hi @daedalas1981, I'm always sorry to give a negative opinion on a contribution, but I have a bad gut feeling about this plugin. In OctoPrint, it is possible to create plugins that make authentication more secure by adding a second factor on top of the password, using the However, this is not the case with your plugin, which does not use that Mixin and instead replaces the authentication method entirely. This is also why I think the “MFA” in your plugin name is misleading. My perspective, as a security consultant, is that it is too dangerous to delegate such a critical responsibility to a third-party plugin. The intended and documented way to replace authentication in OctoPrint is to configure an authentication proxy, so that the responsibility for the alternative authentication method lies with the proxy and is well separated from OctoPrint and its codebase. An example of how to set up such a configuration was recently discussed in issue OctoPrint/OctoPrint#5279. My concern is further reinforced by recurring code quality issues in your plugin (e.g., imports inside functions and other patterns that look AI-generated and that I believe are going to be difficult for a human to maintain in the long run) and by structural problems, such as the use of undocumented functionality like rewriting the user's Flask session or completely replacing the Please note that this is only my personal opinion as a reviewer and may differ from the official OctoPrint stance, which I expect will come in the next few days/weeks. I am just a contributor to this project and have no decision-making authority. |
|
Currently, I completely agree with @jacopotediosi on the quality of code that the AI has made here. The MFAPlugin mixin approach is definitely the better way to go for MFA, and using things like https://github.com/daedalas1981/Octoprint-MFA-Passkeys/blob/5526db9b9a3468435b5dc22513abf4bb91596e1c/octoprint_mfa_passkeys/__init__.py#L93-L122 are not ideal. If the plugin is otherwise not actually MFA as eluded by name and really is a replacement of the login mechanism completely, there are other better approaches as well for this utilizing octoprint-access-users-factory and UIPlugin mixin potentially. Also, due to the use of bash shell scripting, the compatibility flags for OS needs to specify linux only. |
I can't speak for the security aspects of this implementation, but I did remember an example of this that hasn't registered in the plugin repo: https://github.com/JoveToo/OctoPrint-MFA |
|
As much as it pains me to do this, I have to deny registration for this plugin. As already outlined by @jacopotediosi and @jneilliii, to reiterate myself:
You are welcome to use this plugin for yourself, share it etc. No one is keeping you from doing this. You do you! But for the sake of the security and safety of OctoPrint's user community, it will not be allowed on the official plugin repository. |
What is the name of your plugin?
OctoPrint-MFA-Passkeys
What does your plugin do?
It brings native WebAuthn/Passkey authentication to OctoPrint. It allows users to securely authenticate through the native login interface using Biometrics (Windows Hello, Face ID, Touch ID) and hardware security keys (YubiKey), effectively replacing passwords.
Where can we find the source code of your plugin?
https://github.com/daedalas1981/Octoprint-MFA-Passkeys
Was any kind of genAI (ChatGPT, Copilot etc) involved in creating this plugin?
Yes. I used Google's DeepMind AI coding assistant (Antigravity) as a pair-programming partner to help me architect the WebAuthn integrations, frontend injections, and the HAProxy automation bash scripts. I have thoroughly tested, reviewed, and deeply understand the resulting architecture and am fully maintaining it myself!
Is your plugin commercial in nature?
No.
Does your plugin rely on some cloud services?
No. Authentication and credential negotiation happen 100% locally between the user's browser, hardware, and the OctoPrint server.
Further notes
Excited to share this with the community! Thank you for the review.