-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for XMPP #374
Comments
My concern with this is that it's not as trivial to send an XMPP message as it is to send a text message via a REST gateway. Do you have experience with working with XMPP? |
Well that's the purpose of using an xmpp library.
It is as simple as this. I wrote a small bot once but it was in python with python-xmpp
Each user would need to enter its own JID in the TOTP settings (new category) |
Feel free to experiment with this. I have my doubts about this claimed simplicity. We have to be careful with what to put into the user settings. They are quite specific to messaging gateways. |
Any news about that? Would like to see it in Nextcloud. I can also test. |
I think there can be (at least for prosody xmpp server) a relatively simple solution, if mod_rest is enabled. See: https://modules.prosody.im/mod_rest For prosody, I can give you a working example:
User will have to provide:
That's it ... a resulting curl call should be like this (with above example) @ChristophWurst: Would that be a simplier approach to integrate xmpp as a 2FA provider? |
There is a XEP for that: https://xmpp.org/extensions/xep-0070.html A nice example implementation would be here: https://gitlab.com/jnanar/HTTPAuthentificationOverXMPP |
Sorry I did not work on that because I though my situation was not appropriate: my xmpp account and NC account use the same backend,therefore if one gets my username+password for NC, access the TOTP option, then it can also log in to my xmpp access and I think this is not secure although it would be convenient. |
@piti-diablotin Think big! You could add a xmpp user account espacially for sending you your second factor and you can also change the receipient if you consider this more secure. |
No but you can look at the closed PRs and see the other implementations as reference. |
OK, that is what I did right now. Also took the Telegram part as orientation. I successfully implemented the admin section (occ configuration). I also can successfully test the xmpp gateway via occ twofactorauth:gateway:test But where do I find the code to edit the user settings part? (where user has to enter the receiving JID, or for Telegram, the chat number)? Until now, the XMPP Gateway shows up in Security settings, but the rest is missing (as I can't find it). Any hints welcome. |
It will be nice to have... |
@Neustradamus as you can see above, my pull request has been merged so there is support for XMPP right now. |
Hi,
I was thinking, would it be convenient to add an XMPP gateway ? I'm ok to work on this if there is a need.
It would be an alternative to telegram/sms, can be totaly free if the admin has a hosted xmpp server (ejabberd/prosody/openfire)
The only question to @ChristophWurst is what XMPP library I should use. I'm afraid of conflicts like the last time with OVH 🤣
Cheers
The text was updated successfully, but these errors were encountered: