twofactor_totp icon indicating copy to clipboard operation
twofactor_totp copied to clipboard

Limit to Groups still displays TOTP second-factor auth in all users' settings

Open 72Zn opened this issue 6 years ago • 7 comments

When the App is limited to specific groups, the security settings page of all users still shows the option:

TOTP second-factor auth [ ] Enable TOTP

Checking the checkbox on an account not in any enabled group results in a reload and automatic unchecking.

Steps to reproduce:

  1. as admin user goto Apps -> Security and enable 'Two Factor TOTP Provider'
  2. Goto Apps -> Enabled apps
    • find 'Two Factor TOTP Provider'
    • check 'limit to groups', choose group 'admin'
  3. Login as normal user
  4. Goto settings -> security page
    • scroll down, find 'TOTP second-factor auth' and click 'Enable TOTP'

This might not be a big problem in a private setting, however in a corporate environment that leads to irritated users calling for support.

72Zn avatar Jun 28 '18 12:06 72Zn

Does this only affect TOTP or do other apps load as well even though they are just enabled for a specific group. Could you please check? Thanks.

ChristophWurst avatar Jun 28 '18 13:06 ChristophWurst

I tested the 'Two Factor U2F' App. It seems to have the same problem. Except here I get an error: "Cannot read property 'appId' of undefined" when clicking on 'Add U2F device'. So maybe it's not an App issue, but a core problem?

72Zn avatar Jun 29 '18 06:06 72Zn

So maybe it's not an App issue, but a core problem?

Smells like one, yes. Would you mind opening a ticket in the server repo at https://github.com/nextcloud/server/issues/new? If it's indeed a server issue we should look into that.

Thanks a lot for reporting this!

ChristophWurst avatar Jun 29 '18 06:06 ChristophWurst

This actually might be an issue with the settings pages. @blizzz is it possible that we're showing settings sections for all apps, not just the ones that are enabled for a user?

ChristophWurst avatar Jun 29 '18 06:06 ChristophWurst

@ChristophWurst i expect the settings class won't be loaded when the app is not. I did not try to reproduce it yet.

blizzz avatar Jun 29 '18 08:06 blizzz

Okay, no worries. I'll try to find some time next week to give this a test run. Thanks for your input.

ChristophWurst avatar Jun 29 '18 08:06 ChristophWurst

I opened an issue in the server repo: https://github.com/nextcloud/server/issues/10051

72Zn avatar Jun 29 '18 10:06 72Zn