Skip to content
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 PostgreSQL support back #35

Closed
tcitworld opened this issue Apr 25, 2019 · 22 comments · Fixed by #306
Closed

Add PostgreSQL support back #35

tcitworld opened this issue Apr 25, 2019 · 22 comments · Fixed by #306

Comments

@tcitworld
Copy link
Member

Seems it was disabled because of #20 in 78e8250 but it should be fine now.

@ChristophWurst
Copy link
Member

Yep, good point. I hope it's compatible now. CI will tell us 😉

@DecaTec
Copy link

DecaTec commented May 16, 2019

The app can still be not installed with using PostgreSQL. Any plans for an update?

@ChristophWurst
Copy link
Member

PRs to bring back Postgres testing on CI are welcome any time :)

@c0r3dump3d
Copy link

Hi, this app it's very interesting. Any plans to integrate with Postgress DB?

@ChristophWurst
Copy link
Member

Hi, this app it's very interesting. Any plans to integrate with Postgress DB?

#35 (reference) ;)

@c0r3dump3d
Copy link

From Nextcloud 16.0.1 App installer I have the message:

App "Two-Factor Admin Support" cannot be installed because the following dependencies are not fulfilled: Following databases are supported: sqlite, mysql

@ChristophWurst
Copy link
Member

Yes, we're working on it: #71

@corincorvus
Copy link

Hey,

i need it too. I use Nextcloud in Docker with psql (Univention). 2 Users lost his Backup Codes and his phones are dead... they cant login.

how is the status? :) iam hopefully

@ChristophWurst
Copy link
Member

It still requires a few hours of work to get this properly fixed. The community PR stalled and got closed unfortunately.

This apps is a community effort, even though I work for Nextcloud GmbH. Right now I don't have the time to fix this as there are other priorities. If anyone of you is a customer and wants this fixed, please reach out to your account managers. And those who want to become a customer, please see https://nextcloud.com/enterprise/.

Hope this is understandable. Contributions are welcome any time. But it has to be a solid fix that works for all instances, no matter which state their migrations failed.

Sorry for the inconveniences caused in the meantime.

@mcwhelan
Copy link

mcwhelan commented Jan 9, 2020

I'd like to become a customer, but not if my current installed system (PostgreSQL database) isn't workable. I'm currently having to delete users and re-add them when they lose their 2FA credentials. Personally, I think if an add-on doesn't support the system requirements laid out by Nextcloud, then the app should be pulled from the app store. Nextcloud says PostgreSQL is a supported database, then the add-ons should support it also.

@ChristophWurst
Copy link
Member

I'd like to become a customer, but not if my current installed system (PostgreSQL database) isn't workable

Get in touch with us. I'm sure we can find a solution if this is a blocker for you.

Nextcloud says PostgreSQL is a supported database, then the add-ons should support it also.

This app isn't currently covered by the support contract. And as you can see on https://apps.nextcloud.com/apps/twofactor_admin it's neither labeled as featured nor supported. This can change with customer demand, though.

@esantoro
Copy link

Hello, I hate to have to complain, but I started upgrading nextcloud to 18.0 (from 17.0) after business hours and now I'm in the middle of a roll-back because I also enabled TOTP-based 2FA and now the whole system is basically nuked:

  • Postgresql is an officially supported database
  • 2FA TOTP provider is both supported and FEATURED (!)
  • once installed and enabled, admin account works ok!
  • 2FA admin panel is not compatible with postgresql, meaning that there's NO FREAKING WAY of setting 2FA for non-admin users.
  • I managed to see this because I was logged as a non-admin user too, and managed to see that I was unable to access the "security" section of my settings.

That's a mess already, but it gets better:

  • So I uninstall the TOTP provider and the admin panel, expecting all to go back to normality
  • hilarity ensues
  • admin user can login and work
  • non-admin users can login but cannot access the seurity settings, meaning they cannot reset passwords (or do anything security related)
  • admin user can log out, but on login...
  • admin user has no TOTP anymore, HOWEVER nextcloud it's still looking for a second factor, for some reason... meaning that i'm now asked for a backup code. Meaning that I now have a limited number of shots at logging in as admin, then it's game over.

H-How ?

Guys, this is really really bad.

I've seen other issues with postgresql in the past, where for example a certain version of nextcloud was not compatible with another version of postgresql, and this was known, yet the NC made no checks and installed just fine, failing spectacularly when onboarding users.

I really can't understand the reason, postgresql is a fine rdbms. It's not about mysql vs postgres. They're both fine, I'm on postgres because I am already using it for other stuff.

IMHO, however, you should either drop postgresql support or try harder at being consistent across the various rdbms that you support. Dropping postgresql support would of course be sad, but if the alternative is creating a mess at every upgrade then I guess it's worth it.

This issue has been open for 10 months now, just saying.

My only relief is that I made a snapshot of the underlying zfs dataset (containing posgres db + nextcloud data + docker-compose.yml) before beginning the upgrade.

Sorry for the long rant.

@tcitworld
Copy link
Member Author

Hi @esantoro and sorry for the trouble you encountered.

Just for information, this isn't the 2FA TOTP app which is indeed officially supported, it's a 3rd-party app allowing the admin to generate a one-time login code on behalf of users. Notice that it's not under the nextcloud group on Github.

As @ChristophWurst said above, this app is neither labeled as featured nor supported. This can change with customer demand, though, so you might want to contact them about this.

@ChristophWurst
Copy link
Member

And please read https://nextcloud.com/contribute/code-of-conduct/.

@ChristophWurst
Copy link
Member

Also, even if this were in the nc organization, there is no obligation for us to support you for free. Please read up on what open source means. It's not about getting the software and all the support for free. This is about collaboration.

@JohnWalkerx
Copy link

Does anyone know anything new?

@milux
Copy link

milux commented Oct 24, 2020

I've given up on this a long time ago. Dropped this plugin and wrote a bash script for our NC docker setup to inject N pre-defined backup codes for any number of given users into PostgreSQL.
Here's the gist, it can surely be adapted for non-docker setups as well:
https://gist.github.com/milux/30a99ea221f888a0908f603974901659

@Cris70
Copy link

Cris70 commented Jan 3, 2021

I've given up on this a long time ago. Dropped this plugin and wrote a bash script for our NC docker setup to inject N pre-defined backup codes for any number of given users into PostgreSQL.
Here's the gist, it can surely be adapted for non-docker setups as well:
https://gist.github.com/milux/30a99ea221f888a0908f603974901659

Thank you very much @milux for your script!!
It helped me get out of this bad situation.
If anybody is interested, I updated milux' script to work on a non-containarized nextcloud setup and added a few fixes and nice touches as well.
You can find it here: https://gist.github.com/Cris70/581ad19068f1710845a7e750293cc133

@tinus-github
Copy link

Hello! So the problem that was holding this back (#71) was closed. Is there still anything that needs to be done to reenable this?

@nursoda
Copy link

nursoda commented Jan 6, 2022

bump: This issue is now nearly 3 years old and for nearly a year there seems to be a solution (I only read, did not check).

@sebastiaanveld
Copy link

bump: This issue is now nearly 3 years old and for nearly a year there seems to be a solution (I only read, did not check).

I just tested this on 22.2.3 and I can confirm that PostgreSQL is not supported when I try to install the App.

@szaimen
Copy link

szaimen commented Nov 30, 2023

🎉🎉🎉

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

Successfully merging a pull request may close this issue.