Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Support change of domain #728

Open
mashedkeyboard opened this issue Aug 19, 2020 · 3 comments
Open

Support change of domain #728

mashedkeyboard opened this issue Aug 19, 2020 · 3 comments

Comments

@mashedkeyboard
Copy link

Feature Request

Summary

As discussed in #630, the appId is currently built exclusively from the URL (https://github.com/nextcloud/twofactor_u2f/blob/master/lib/Service/U2FManager.php#L63). This means that, if the Nextcloud instance ever changes domain, all logins with u2f enabled will fail, and backup keys will not work either.

This seems like something that should probably be addressed, but I'll freely admit to not having enough experience with this codebase or u2f server implementation as to be able to come up with a solution myself. Any suggestions would be appreciated!

@ChristophWurst
Copy link
Member

I think changing domain is generally a problematic operation with Nextcloud, there are federated cloud IDs and other things that would have to be updated in the database. The u2f registrations are not the only party that are prone to errors with this.

@mashedkeyboard
Copy link
Author

Sure, but to the extent to which those are held on the nextcloud server, they can be updated by doing a sed (or equivalent) on the database dump file and just reimporting, in theory (if I understand correctly). u2f does not have that ability, and it's also the only thing which prevents people even logging in if the domain has been changed. In any case, fixing it in as many places as possible would I'm sure be a good idea 😅

@coelner
Copy link

coelner commented Apr 20, 2022

Additional to that: if you run nextcloud with multiple domains than the U2F needs to be registered multiple times. It would be useful, if the related domain is shown in the overview.
Maybe it should be obvious to the user, that he needs to register the device for multiple domains.

  1. check if multiple domains are in the config.php
  2. warn the user for the missing u2f domain registration
  3. extend an u2f overview for the admin to show whether the u2f tokens are correctly registered for each domain
  4. allow after checking point 3 allow to deactivate a specific domain without locking out the users

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants