rcdevs / nextcloud_openotp_auth

OpenOTP plugin enables Multi-Factor Authentication to login to Nextcloud Admin/User Pane
GNU Affero General Public License v3.0
6 stars 1 forks source link

OpenOTP issue with nextcloud 28.0.1 #13

Closed nicovd737 closed 4 months ago

nicovd737 commented 8 months ago

Hello,

Since upgrade of Nextcloud 28.0.1, openotp est working but causing issue with other nextcloud menu.

As an example, we openotp is activated, we can't access anymore on nextcloud settings and generate below isseu:

image

Then when checking the logs of nextcloud we can find lot and lot of openotp errors:

"reqId":"aENjuzuzmbNBb70cnOyz","level":4,"time":"2024-01-18T16:19:32+02:00","remoteAddr":"10.203.2.158","user":"Nicolas.Bour","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Could not boot openotp_auth: Undefined constant OCP\AppFramework\Http\TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0","version":"28.0.1.1","exception":{"Exception":"Error","Message":"Undefined constant OCP\AppFramework\Http\TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS","Code":0,"Trace":[{"file":"/var/www/html/lib/private/ServerContainer.php","line":107,"function":"__construct","class":"OCA\TwoFactor_RCDevsOpenOTP\AppInfo\Application","type":"->"},{"file":"/var/www/html/lib/private/ServerContainer.php","line":188,"function":"getAppContainer","class":"OC\ServerContainer","type":"->"},{"file":"/var/www/html/lib/private/ServerContainer.php","line":153,"function":"getAppContainerForService","class":"OC\ServerContainer","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":196,"function":"query","class":"OC\ServerContainer","type":"->"},{"file":"/var/www/html/lib/private/App/AppManager.php","line":434,"function":"bootApp","class":"OC\AppFramework\Bootstrap\Coordinator","type":"->"},{"file":"/var/www/html/lib/private/App/AppManager.php","line":213,"function":"loadApp","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":125,"function":"loadApps","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/html/lib/private/legacy/OC_User.php","line":128,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/html/lib/base.php","line":770,"function":"setupBackends","class":"OC_User","type":"::"},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::"},{"file":"/var/www/html/ocs/v1.php","line":31,"args":["/var/www/html/lib/base.php"],"function":"require_once"},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/apps/openotp_auth/lib/AppInfo/Application.php","Line":62,"message":"Could not boot openotp_auth: Undefined constant OCP\AppFramework\Http\TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS","exception":{},"CustomMessage":"Could not boot openotp_auth: Undefined constant OCP\AppFramework\Http\TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS"}}

Coud you please update your app for nextcloud 28 ?

Thanks Nico

pbuergi commented 5 months ago

same here

rcdevs commented 5 months ago

Hello,

Nextcloud 28 is not yet supported by RCDevs, but we are actively working on adding support for it. We apologize for any delays.

Regards

nicovd737 commented 4 months ago

Hello,

The last release compatible with nextcloud 28.1 solves the issue to access to admin menu but no users can't connect anymore when openotp 1.28 is activated with below error:

image

pbuergi commented 4 months ago

Hello,

Nextcloud 28 is not yet supported by RCDevs, but we are actively working on adding support for it. We apologize for any delays.

Regards

@rcdevs Any news on this?

nicovd737 commented 4 months ago

There is the version 1.28 for nextcloud 28 :

https://apps.nextcloud.com/apps/openotp_auth/releases?platform=28#28

But it causes me issue as you can see :-)

rcdevs commented 4 months ago

Hello,

Do you have any logs on OpenOTP server related to this error? It seems to be an error returned by OpenOTP. Check logs in /opt/webadm/logs/webadm.log

Regards

nicovd737 commented 4 months ago

In logs:

{"reqId":"OkTtfXMop1ILwYXzbrKK","level":3,"time":"2024-05-08T10:36:12+02:00","remoteAddr":"10.203.0.55","user":"xxx.xxx","app":"core","method":"GET","url":"/login/selectchallenge?redirect_url=/apps/theming/image/background?v%3D22","message":"two-factor auth provider 'rcdevsopenotp' failed to load","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0","version":"28.0.4.1","data":{"app":"core"}} {"reqId":"OkTtfXMop1ILwYXzbrKK","level":3,"time":"2024-05-08T10:36:12+02:00","remoteAddr":"10.203.0.55","user":"xxx.xxx","app":"core","method":"GET","url":"/login/selectchallenge?redirect_url=/apps/theming/image/background?v%3D22","message":"1 two-factor auth providers failed to load","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0","version":"28.0.4.1","data":{"app":"core"}}

rcdevs commented 4 months ago

Hello,

What about OpenOTP server logs?

Regards

pbuergi commented 4 months ago

It works fine for us. Thanks @rcdevs

nicovd737 commented 4 months ago

Hello,

Issue solved.

We have found in OTP logs:

Log openotp :

[2024-05-08 10:56:12] [192.168.250.101:45340] [OpenOTP:M1GIJU1B] New openotpSimpleLogin SOAP request [2024-05-08 10:56:12] [192.168.250.101:45340] [OpenOTP:M1GIJU1B] > Username: Nicolas.Bour [2024-05-08 10:56:12] [192.168.250.101:45340] [OpenOTP:M1GIJU1B] > Domain: Default [2024-05-08 10:56:12] [192.168.250.101:45340] [OpenOTP:M1GIJU1B] > Client ID: Nextcloud Payerne This domain "default".

We have added it in openOTP user domain configuration and it's all good now.

rcdevs commented 4 months ago

Ok, thank you for your feedback. We are going to publish a new version which remove the 'Default' domain value sent to OpenOTP. It must configured by WebADM Client policy.

Regards

rcdevs commented 4 months ago

New version available which drop the "Default" domain value sent to OpenOTP.