felixrupp / user_cas

This app provides CAS authentication support for ownCloud and Nextcloud, using the phpCAS library of jasig/apereo.
Other
21 stars 24 forks source link

Compatibility with Owncloud V10.2.0 #59

Closed ennder closed 5 years ago

ennder commented 5 years ago

Hi,

Is there any prevision to make the plugin compatible with Owncloud V10.2.0 ? Thanks.

halender commented 5 years ago

Hi, I have the same question as @ennder. I have installed Owncloud version 10.2.0.5. Is there any plan to make the plugin compatible with that version? Thank you very much in advance @felixrupp .

felixrupp commented 5 years ago

Hi @ennder @halender I am currently working on it :) .

Regards, Felix

felixrupp commented 5 years ago

Fixed with Release 1.7.1!

Utopism commented 5 years ago

Thank you sooo much !

I'm testing it now.

halender commented 5 years ago

Thank you very much @felixrupp!!!

I'm testing it, too.

Utopism commented 5 years ago

Hi,

I have an issue with the app while logging to a local account (admin) Returned account has different backend to the requested backend for sync

The problem is that even if I disable the user_cas app, the Exception still occurs.

{ "reqId":"X9LRbGsBFs5Bri1onSac", "level":3, "time":"2019-06-18T16:27:12+02:00", "remoteAddr":"176.157.204.145", "user":"--", "app":"index", "method":"POST", "url":"/login", "message":"Exception: { "Exception":"InvalidArgumentException", "Message":"Returned account has different backend to the requested backend for sync", "Code":0, "Trace": "

0 lib/private/User/Manager.php(254): OC\User\SyncService->createOrSyncAccount('admin', Object(OC\User\Database))

      #1 lib/private/User/Session.php(520): OC\User\Manager->checkPassword(*** sensitive parameters replaced ***)
      #2 lib/private/User/Session.php(333): OC\User\Session->loginWithPassword(*** sensitive parameters replaced ***)
      #3 core/Controller/LoginController.php(203): OC\User\Session->login(*** sensitive parameters replaced ***)
      #4 lib/private/AppFramework/Http/Dispatcher.php(153): OC\Core\Controller\LoginController->tryLogin(*** sensitive parameters replaced ***)
      #5 lib/private/AppFramework/Http/Dispatcher.php(85): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Core\Controller\LoginController), 'tryLogin')
      #6 lib/private/AppFramework/App.php(100): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Core\Controller\LoginController), 'tryLogin')
      #7 lib/private/AppFramework/Routing/RouteActionHandler.php(46): OC\AppFramework\App::main('LoginController', 'tryLogin', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
      #8 lib/private/Route/Router.php(342): OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
      #9 lib/base.php(909): OC\Route\Router->match('/login')
      #10 index.php(54): OC::handleRequest()
      #11 {main}",
  "File":"lib/private/User/SyncService.php",
  "Line":372

}" }

Have you an idea of what happens ?

felixrupp commented 5 years ago

@Utopism What backend does your admin account have? Did you convert the admin account to the CAS-Backend?

Regards, Felix

Utopism commented 5 years ago

Hi, I checked the backend of the user in the database and you're right the backend, is OCA\UserCAS\User\Backend, is there an automatic process that could have set that ? because I don't remember to have changed it.

felixrupp commented 5 years ago

@Utopism The backend only get’s converted if you authenticate against a CAS server with the given account or use the CLI command to do so. If you want to keep the 'admin' account local in your oC/NC instance only, do not try to use it with the CAS authentication (even if u have an account with 'admin' username in your CAS).

You can convert it back to the local Database backend with changing the database column value to OC\User\Database.

Regards, Felix

Utopism commented 5 years ago

Felix, perhaps something happened during my tests, i possibly tried to login in the CAS with the local account. Just to understand, does the conversion is done, even if the CAS authentication fails ? Because the admin account does not exist in our CAS repository, so there is no way that the CAS authentication had succeeded. I have converted the user to a local backend thanks. Thanks for your time.

felixrupp commented 5 years ago

@utopism Backend conversion is done after you are already logged in at the CAS instance, right before the ownCloud session is started.

Regards, Felix

Utopism commented 5 years ago

Ok thanks. I need to have php-cas installed on our server in order to make the app working. Will give you feedback in a few days.

Utopism commented 5 years ago

Hello, Now that php-cas is installed, I get the following error : Call to undefined method phpCAS::isInitialized() with which version of the library user_cas is compatible ? Our version : 1.3.3 (debian squeeze)

felixrupp commented 5 years ago

Hi @Utopism

I think I don't understand what you’re trying to do. How did you install user_cas?

If you installed it via the ownCloud Marketplace or the Nextcloud Appstore, a phpCAS version (1.3.6) is shipped within the app. If you installed via composer, the phpCAS dependency is automatically downloaded by composer.

Only if you install vie git clone (without having composer), you have to provide a custom version of phpCAS. You should then at least use version 1.3.4.

Regards, Felix

felixrupp commented 5 years ago

@Utopism

Regarding your "Backend conversion problem": I actually found a bug which could have caused this. Will be fixed in the next release.

Utopism commented 5 years ago

Hi, I used git clone in fact. It explains the issue with php_cas Removed the clone version and got V1.7.1. from Market place. I face again the issue about the backend. The account is converted after the SSO login, but the Error 500 appears again (Returned account has different backend to the requested backend for sync).

Thanks for your help.

felixrupp commented 5 years ago

HI @Utopism please wait for 1.7.2 being released in a few days, the bug will be fixed there.

Regards, Felix

Utopism commented 5 years ago

@felixrupp thanks a lot for your time, I will test it as soon as it will be delivered.

felixrupp commented 5 years ago

@Utopism Should be fixed with Release 1.7.2