user_saml icon indicating copy to clipboard operation
user_saml copied to clipboard

allow to set an optional logout url when using the environment variable authentication

Open ArnY opened this issue 8 years ago • 10 comments

In some case, when using the environment variable (ie. with CAS), a specific logout url is required to actually logout of nextcloud.

Allowing the admin to optionally set a custom logout url would actually allow a complete implementation of some SSO like CAS. Indeed, until this is possible, users won't be able to logout not until their CAS session actually expires (or until the user closes the browser) which is dangerous.

ArnY avatar May 24 '17 13:05 ArnY

Ok. Good point :-)

LukasReschke avatar May 24 '17 14:05 LukasReschke

+1 for this feature

Emi94 avatar Aug 04 '17 08:08 Emi94

+1

putt1ck avatar Aug 04 '17 08:08 putt1ck

+1

ogr-apc avatar Sep 26 '17 13:09 ogr-apc

+1

ipm-uma avatar Nov 06 '17 10:11 ipm-uma

Please use the GitHub +1 feature instead of posting updates which sends notifications to everyone having posted in here. Thanks.

LukasReschke avatar Nov 08 '17 10:11 LukasReschke

Any progress?

psy avatar Oct 31 '20 12:10 psy

Any answere to the question ☝️ ?

seraphyn avatar Jun 30 '21 08:06 seraphyn

No. But we appreciate pull requests.

LukasReschke avatar Jun 30 '21 09:06 LukasReschke

So, adding

 * @NoCSRFRequired

to logout function here: https://github.com/nextcloud/server/blob/master/core/Controller/LoginController.php#L95

makes the url your.nextcloud.doman/logout log you out. This is of course then susceptible to CSRF attacks. Setting a custom url like your.nextcloud.doman/my_custom_url_logout would be security by obscurity so not much better. Personally for our (small uninmportant) site, I would be ok with disabling CSRF protection from logout (discussion of its merits is here: https://security.stackexchange.com/questions/62769/should-login-and-logout-action-have-csrf-protection ). Would a PR implementing this as a setting be accepted or something more complicated needs to be prepared (that would be far beyond my ability)?

Our use case is using https://github.com/soudis/discoursesso to sign in to our Discourse instance from Nextcloud. We would like to make sure users log out from Nextcloud when they log out from Discourse. Discourse allows in its settings to direct a user to a specific URL after logout - which Nextcloud does not allow.

Probably a better (but still hackish) solution is here: https://help.nextcloud.com/t/how-can-i-write-my-own-logout-page/14676

felagund avatar Apr 13 '24 15:04 felagund