Page MenuHomePhabricator

Pluggable auth not authenticating user when blobfuse2 azure storage is enabled
Closed, InvalidPublicBUG REPORT

Assigned To
None
Authored By
Pooja2425
Jul 28 2023, 9:20 PM
Referenced Files
F37159743: image.png
Aug 2 2023, 8:32 AM
F37158165: image.png
Aug 1 2023, 8:25 AM
F37158158: image.png
Aug 1 2023, 8:25 AM
Restricted File
Jul 31 2023, 8:42 AM
F37156724: image.png
Jul 31 2023, 8:14 AM
F37153946: image.png
Jul 28 2023, 9:41 PM
F37153937: image.png
Jul 28 2023, 9:20 PM

Description

Steps to replicate the issue (include links if applicable):

  • using PluggableAuth 7.0.0 (8a48b65) 05:58, 20 June 2023
  • SimpleSAMLphp 7.0-dev (cbbed22) 14:10, 4 June 2023

in logs getting below
ERROR: return to URL is null or empty
In execute()

 Getting PluggableAuth instance
Plugin name: SimpleSAMLphp
Authenticated existing user: Posha
: No groupsync set.
User is authorized.

What happens?:

  1. When Seting $wgPluggableAuth_EnableAutoLogin = true;

When trying to access app, Taking so much time in loading , its stuck on
https://abc.com/index.php?title=Special:UserLogin&returnto=Main+Page&returntoquery= & throwing 504 error.
If loading again.
then sometime its loading app but authentication is not happening.

image.png (1×1 px, 157 KB)

  1. When setting $wgPluggableAuth_EnableAutoLogin = false;

then without authenticating user directly loads main page , & when clicking on login then loading... & 504.

image.png (736×1 px, 217 KB)

  1. Since ERROR: return to URL is null or empty, so when I am directly putting link of mainpage
if ( $returnToUrl === null || strlen( $returnToUrl ) === 0 ) {
			$this->logger->debug( 'ERROR: return to URL is null or empty' );
			//$this->getOutput()->wrapWikiMsg( "<div class='error'>\n$1\n</div>", 'pluggableauth-fatal-error' );
                       ** header( 'Location:https://abc.com/index.php/Main_Page'  );**
                       }

then its going to main page after loading but not showing logged in user name on main page & showing error

($name) must be of type string, null given, called in /var/www/html/extensions/PluggableAuth/includes/PrimaryAuthenticationProvider.php on line 161**

But in logs I can see I am authenticated & my user id too, but not in frontend.

2023-07-28 21:02:39 app-5b7999454-52tht wikipoc: Authenticated existing user: Posha
2023-07-28 21:02:39 app-5b7999454-52tht wikipoc: No groupsync set.
2023-07-28 21:02:56 app-5b7999454-52tht wikipoc: User is authorized.
2023-07-28 21:05:48 app-5b7999454-52tht wikipoc: In execute()
2023-07-28 21:05:49 app-5b7999454-52tht wikipoc: Getting PluggableAuth instance
2023-07-28 21:05:49 app-5b7999454-52tht wikipoc: Plugin name: SimpleSAMLphp
2023-07-28 21:05:52 app-5b7999454-52tht wikipoc: Authenticated existing user: Posha
2023-07-28 21:05:52 app-5b7999454-52tht wikipoc: No groupsync set.
2023-07-28 21:06:12 app-5b7999454-52tht wikipoc: User is authorized.

What should have happened instead?:

Earlier version its working properly, its taking time to load but at least working.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Hi, this ticket lacks clear and complete steps to reproduce in the steps to reproduce section, plus software version information.

HI @Aklapper ,@Cindy.cicalese
we are using

  • MediaWiki 1.39.4

PHP 8.1.21 (apache2handler)
MySQL 8.0.31
ICU 72.1
Elasticsearch 7.10.2**

PluggableAuth 7.0.0 (8a48b65) 05:58, 20 June 2023
SimpleSAMLphp 7.0-dev (cbbed22) 14:10, 4 June 2023

But still facing same issue , unable to see logged in user details on app main page or in any page,
earlier version its working properly,.

when set $wgPluggableAuth_EnableAutoLogin = false;

Logs we are getting 2023-07-31 08:00:02 app-867899fc78-kncpt wikipoc: In execute()
2023-07-31 08:00:03 app-867899fc78-kncpt wikipoc: Getting PluggableAuth instance
2023-07-31 08:00:03 app-867899fc78-kncpt wikipoc: Plugin name: SimpleSAMLphp
2023-07-31 08:00:32 app-867899fc78-kncpt wikipoc: In execute()
2023-07-31 08:00:32 app-867899fc78-kncpt wikipoc: Getting PluggableAuth instance
2023-07-31 08:00:33 app-867899fc78-kncpt wikipoc: Plugin name: SimpleSAMLphp
2023-07-31 08:00:36 app-867899fc78-kncpt wikipoc: Authenticated existing user: Posha
2023-07-31 08:00:37 app-867899fc78-kncpt wikipoc: No groupsync set.
2023-07-31 08:01:06 app-867899fc78-kncpt wikipoc: User is authorized.
2023-07-31 08:01:39 app-867899fc78-kncpt wikipoc: In execute()
2023-07-31 08:01:40 app-867899fc78-kncpt wikipoc: Getting PluggableAuth instance
2023-07-31 08:01:40 app-867899fc78-kncpt wikipoc: Plugin name: SimpleSAMLphp
2023-07-31 08:01:43 app-867899fc78-kncpt wikipoc: Authenticated existing user: Posha
2023-07-31 08:01:44 app-867899fc78-kncpt wikipoc: No groupsync set.
2023-07-31 08:02:07 app-867899fc78-kncpt wikipoc: User is authorized.

but in main page

image.png (319×1 px, 62 KB)
same for another pages too.

& when $wgPluggableAuth_EnableAutoLogin = true;

{F37156769} page loading.... loading
**https://abc.com/index.php?titile-Special:UserLogin&returnto=Main_Page&returntoquery**

And 504. error came

(Please use the Preview function and use Markup, to keep comments readable. Thanks.)

cicalese edited subscribers, added: cicalese; removed: CCicalese_WMF.

This error (return to URL is null or empty) typically occurs when there is an issue with configuring the authentication plugin or any of its dependencies, causing AuthManager to clear session data. With the information provided, there is not sufficient detail to determine what the problem might be. It does seem to be authenticating and authorizing the user correctly, but at some point the session is lost. Please confirm that you are not using PHP sessions in SimpleSAMLphp (see known issues). Also check the debug log for any error information related to AuthManager.

HI @cicalese Thanks for understanding my issue, you r right it might be session issue,so its redirecting me to again same link /loops, which never ends.

image.png (472×1 px, 83 KB)

image.png (438×1 px, 101 KB)

Iam using 'store.type' => 'sql', not using php sessions.

Session Logs:===========================================

2023-07-31 11:12:25 app-75b7497dfd-bn7mn wikipoc: Session "p4silek1sheqf2t46s762mpv465g68lv" requested without UserID cookie
2023-07-31 11:12:34 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:12:42 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:12:47 app-75b7497dfd-bn7mn wikipoc: Session "p4silek1sheqf2t46s762mpv465g68lv" requested without UserID cookie
2023-07-31 11:13:08 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:16:38 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:16:41 app-75b7497dfd-bn7mn wikipoc: SessionBackend "68gvipd9r4ib5looonbmnvoulbpp5b6c" is unsaved, marking dirty in constructor
2023-07-31 11:16:44 app-75b7497dfd-bn7mn wikipoc: SessionBackend "68gvipd9r4ib5looonbmnvoulbpp5b6c" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:16:50 app-75b7497dfd-bn7mn wikipoc: SessionBackend "68gvipd9r4ib5looonbmnvoulbpp5b6c" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:16:52 app-75b7497dfd-bn7mn wikipoc: SessionBackend "68gvipd9r4ib5looonbmnvoulbpp5b6c" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:16:59 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:17:01 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:17:03 app-75b7497dfd-bn7mn wikipoc: SessionBackend "ach5b9hn3i6rtuqrmtgk7md6995hepnm" is unsaved, marking dirty in constructor
2023-07-31 11:17:05 app-75b7497dfd-bn7mn wikipoc: SessionBackend "ach5b9hn3i6rtuqrmtgk7md6995hepnm" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:17:14 app-75b7497dfd-bn7mn wikipoc: SessionBackend "ach5b9hn3i6rtuqrmtgk7md6995hepnm" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:17:18 app-75b7497dfd-bn7mn wikipoc: SessionBackend "ach5b9hn3i6rtuqrmtgk7md6995hepnm" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:17:24 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:17:30 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:17:36 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e2f8bnbcj0p3spbe5boqtsl62ltclt90" is unsaved, marking dirty in constructor
2023-07-31 11:17:42 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e2f8bnbcj0p3spbe5boqtsl62ltclt90" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:18:03 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e2f8bnbcj0p3spbe5boqtsl62ltclt90" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:18:10 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e2f8bnbcj0p3spbe5boqtsl62ltclt90" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:18:16 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:18:24 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:18:29 app-75b7497dfd-bn7mn wikipoc: SessionBackend "kfpmsfmsappsd4bvtobqcuvj14h5lrrk" is unsaved, marking dirty in constructor
2023-07-31 11:18:33 app-75b7497dfd-bn7mn wikipoc: SessionBackend "kfpmsfmsappsd4bvtobqcuvj14h5lrrk" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:18:43 app-75b7497dfd-bn7mn wikipoc: SessionBackend "kfpmsfmsappsd4bvtobqcuvj14h5lrrk" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:18:45 app-75b7497dfd-bn7mn wikipoc: SessionBackend "kfpmsfmsappsd4bvtobqcuvj14h5lrrk" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:18:49 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:19:05 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:19:08 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e0d0q3p80bff4qtc5p5aspdrmc4b8auq" is unsaved, marking dirty in constructor
2023-07-31 11:19:10 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e0d0q3p80bff4qtc5p5aspdrmc4b8auq" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:19:18 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e0d0q3p80bff4qtc5p5aspdrmc4b8auq" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:19:20 app-75b7497dfd-bn7mn wikipoc: SessionBackend "e0d0q3p80bff4qtc5p5aspdrmc4b8auq" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:19:24 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:19:56 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:19:59 app-75b7497dfd-bn7mn wikipoc: SessionBackend "a57rc2373r22s98k1jvtcmf6a103push" is unsaved, marking dirty in constructor
2023-07-31 11:20:02 app-75b7497dfd-bn7mn wikipoc: SessionBackend "a57rc2373r22s98k1jvtcmf6a103push" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:20:11 app-75b7497dfd-bn7mn wikipoc: SessionBackend "a57rc2373r22s98k1jvtcmf6a103push" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:20:13 app-75b7497dfd-bn7mn wikipoc: SessionBackend "a57rc2373r22s98k1jvtcmf6a103push" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:20:16 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:20:17 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:20:18 app-75b7497dfd-bn7mn wikipoc: SessionBackend "qfdsqi7s8ermr5tq7ubophgrmet90kql" is unsaved, marking dirty in constructor
2023-07-31 11:20:20 app-75b7497dfd-bn7mn wikipoc: SessionBackend "qfdsqi7s8ermr5tq7ubophgrmet90kql" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:20:30 app-75b7497dfd-bn7mn wikipoc: SessionBackend "qfdsqi7s8ermr5tq7ubophgrmet90kql" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:20:33 app-75b7497dfd-bn7mn wikipoc: SessionBackend "qfdsqi7s8ermr5tq7ubophgrmet90kql" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:20:38 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:20:41 app-75b7497dfd-bn7mn wikipoc: SessionBackend "16bhr5d1kdt1e85k5tcedg9hkje2loac" is unsaved, marking dirty in constructor
2023-07-31 11:20:44 app-75b7497dfd-bn7mn wikipoc: SessionBackend "16bhr5d1kdt1e85k5tcedg9hkje2loac" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:20:54 app-75b7497dfd-bn7mn wikipoc: SessionBackend "16bhr5d1kdt1e85k5tcedg9hkje2loac" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:20:57 app-75b7497dfd-bn7mn wikipoc: SessionBackend "16bhr5d1kdt1e85k5tcedg9hkje2loac" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:21:17 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:21:21 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:21:24 app-75b7497dfd-bn7mn wikipoc: SessionBackend "cd98vfhqedif78k3egf21o1ua2dsv00v" is unsaved, marking dirty in constructor
2023-07-31 11:21:27 app-75b7497dfd-bn7mn wikipoc: SessionBackend "cd98vfhqedif78k3egf21o1ua2dsv00v" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:21:43 app-75b7497dfd-bn7mn wikipoc: SessionBackend "cd98vfhqedif78k3egf21o1ua2dsv00v" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:21:46 app-75b7497dfd-bn7mn wikipoc: SessionBackend "cd98vfhqedif78k3egf21o1ua2dsv00v" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:21:51 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:28:37 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:28:40 app-75b7497dfd-bn7mn wikipoc: SessionBackend "leq1i1qeaoa27nin6gpq3r3eo9kj8loa" is unsaved, marking dirty in constructor
2023-07-31 11:28:43 app-75b7497dfd-bn7mn wikipoc: SessionBackend "leq1i1qeaoa27nin6gpq3r3eo9kj8loa" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:28:49 app-75b7497dfd-bn7mn wikipoc: SessionBackend "leq1i1qeaoa27nin6gpq3r3eo9kj8loa" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:28:51 app-75b7497dfd-bn7mn wikipoc: SessionBackend "leq1i1qeaoa27nin6gpq3r3eo9kj8loa" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:29:07 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:29:09 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:29:11 app-75b7497dfd-bn7mn wikipoc: SessionBackend "f6dqqvujhd7j36o6b477bqeum4sujjnq" is unsaved, marking dirty in constructor
2023-07-31 11:29:14 app-75b7497dfd-bn7mn wikipoc: SessionBackend "f6dqqvujhd7j36o6b477bqeum4sujjnq" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:29:21 app-75b7497dfd-bn7mn wikipoc: SessionBackend "f6dqqvujhd7j36o6b477bqeum4sujjnq" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:29:24 app-75b7497dfd-bn7mn wikipoc: SessionBackend "f6dqqvujhd7j36o6b477bqeum4sujjnq" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:29:44 app-75b7497dfd-bn7mn wikipoc: Saving all sessions on shutdown
2023-07-31 11:34:28 app-75b7497dfd-bn7mn wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:34:31 app-75b7497dfd-bn7mn wikipoc: SessionBackend "r48e4eebimcumle1ngri4ijlfe7p33d1" is unsaved, marking dirty in constructor
2023-07-31 11:34:33 app-75b7497dfd-bn7mn wikipoc: SessionBackend "r48e4eebimcumle1ngri4ijlfe7p33d1" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:34:40 app-75b7497dfd-bn7mn wikipoc: SessionBackend "r48e4eebimcumle1ngri4ijlfe7p33d1" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:34:42 app-75b7497dfd-bn7mn wikipoc: SessionBackend "r48e4eebimcumle1ngri4ijlfe7p33d1" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:37:47 app-6884987487-tqk2c wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:37:50 app-6884987487-tqk2c wikipoc: SessionBackend "nttmjjt8pr4g7gndfsgu75u5s7fgq414" is unsaved, marking dirty in constructor
2023-07-31 11:37:52 app-6884987487-tqk2c wikipoc: SessionBackend "nttmjjt8pr4g7gndfsgu75u5s7fgq414" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:37:54 app-6884987487-tqk2c wikipoc: SessionManager using store SqlBagOStuff

2023-07-31 11:37:57 app-6884987487-tqk2c wikipoc: SessionBackend "40ecct9co6clhrr5ns3np595726djnjm" is unsaved, marking dirty in constructor
2023-07-31 11:37:58 app-6884987487-tqk2c wikipoc: SessionBackend "nttmjjt8pr4g7gndfsgu75u5s7fgq414" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:38:02 app-6884987487-tqk2c wikipoc: SessionBackend "nttmjjt8pr4g7gndfsgu75u5s7fgq414" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:38:02 app-6884987487-tqk2c wikipoc: SessionBackend "40ecct9co6clhrr5ns3np595726djnjm" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:38:14 app-6884987487-tqk2c wikipoc: SessionBackend "40ecct9co6clhrr5ns3np595726djnjm" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:38:17 app-6884987487-tqk2c wikipoc: SessionBackend "40ecct9co6clhrr5ns3np595726djnjm" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:38:22 app-6884987487-tqk2c wikipoc: SessionManager using store SqlBagOStuff
2023-07-31 11:38:26 app-6884987487-tqk2c wikipoc: SessionBackend "mhepeip868t53nhcma7dv0e0qqth1v1d" is unsaved, marking dirty in constructor
2023-07-31 11:38:30 app-6884987487-tqk2c wikipoc: SessionBackend "mhepeip868t53nhcma7dv0e0qqth1v1d" save: dataDirty=1 metaDirty=1 forcePersist=0
2023-07-31 11:38:41 app-6884987487-tqk2c wikipoc: SessionBackend "mhepeip868t53nhcma7dv0e0qqth1v1d" data dirty due to dirty(): MediaWiki\Session\SessionManager->getSessionForRequest/MediaWiki\Session\SessionManager->getInitialSession/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
2023-07-31 11:38:45 app-6884987487-tqk2c wikipoc: SessionBackend "mhepeip868t53nhcma7dv0e0qqth1v1d" save: dataDirty=1 metaDirty=0 forcePersist=0
2023-07-31 11:38:50 app-6884987487-tqk2c wikipoc: Saving all sessions on shutdown
2023-07-31 11:39:06 app-6884987487-tqk2c wikipoc: Saving all sessions on shutdown

Simplesaml Logs-----------------------------------------------------------------------------------

2023-08-01 08:06:50 app-79bcd4c6c8-s982j wikipoc: Using 'myusername' (class 'MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\GenericCallback') for 'username' UserInfoProvider
2023-08-01 08:06:50 app-79bcd4c6c8-s982j wikipoc: Using 'realname' (class 'MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\Realname') for 'realname' UserInfoProvider
2023-08-01 08:06:51 app-79bcd4c6c8-s982j wikipoc: Using 'email' (class 'MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\Email') for 'email' UserInfoProvider
2023-08-01 08:07:40 app-79bcd4c6c8-s982j wikipoc: Received attributes: {"http:\/\/schemas.microsoft.com\/identity\/claims\/tenantid":["3aa4a235-b6e2-48d5-9195-7fcf05b459b0"],"http:\/\/schemas.microsoft.com\/identity\/claims\/objectidentifier":["52c0da16-3690-4f8b-bd71-e7af0d8a2eb5"],"http:\/\/schemas.microsoft.com\/identity\/claims\/displayname":["Baris Kamis (Capgemini Norge AS,Oslo)"],"http:\/\/schemas.microsoft.com\/identity\/claims\/identityprovider":["https:\/\/sts.windows.net\/3aa4a235-b6e2-48d5-9195-7fcf05b459b0\/"],"http:\/\/schemas.microsoft.com\/claims\/authnmethodsreferences":["http:\/\/schemas.microsoft.com\/ws\/2008\/06\/identity\/authenticationmethod\/password","http:\/\/schemas.microsoft.com\/ws\/2008\/06\/identity\/authenticationmethod\/x509","http:\/\/schemas.microsoft.com\/claims\/multipleauthn"],"http:\/\/schemas.xmlsoap.org\/ws\/2005\/05\/identity\/claims\/givenname":["Baris"],"http:\/\/schemas.xmlsoap.org\/ws\/2005\/05\/identity\/claims\/surname":["Kamis"],"http:\/\/schemas.xmlsoap.org\/ws\/2005\/05\/identity\/claims\/emailaddress":["BKAMI@equinor.com"],"http:\/\/schemas.xmlsoap.org\/ws\/2005\/05\/identity\/claims\/name":["BKAMI@equinor.com"]}
2023-08-01 08:07:41 app-79bcd4c6c8-s982j wikipoc: Using 'myusername' (class 'MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\GenericCallback') for 'username' UserInfoProvider
2023-08-01 08:07:42 app-79bcd4c6c8-s982j wikipoc: Using 'realname' (class 'MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\Realname') for 'realname' UserInfoProvider
2023-08-01 08:07:42 app-79bcd4c6c8-s982j wikipoc: Using 'email' (class 'MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\Email') for 'email' UserInfoProvider

Cookies===============================================================================

2023-08-01 08:06:30 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "2a8km3qdge39eop8t728j21g2meie393", "0", "/", "", "1", "1", ""
2023-08-01 08:06:31 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341191", "/", "", "1", "1", ""
2023-08-01 08:06:32 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341192", "/", "", "1", "1", ""
2023-08-01 08:06:35 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "2a8km3qdge39eop8t728j21g2meie393", "0", "/", "", "1", "1", ""
2023-08-01 08:06:35 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "2@1690877195#ebfb8bd2f1835fae76866a57fbd69ef8", "1690877205", "/", "", "1", "1", ""
2023-08-01 08:06:35 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "1@1690877195#48edd3fd79ebcdf782cdbd6b8c1fa68c", "1690877205", "/", "", "1", "1", ""
2023-08-01 08:06:37 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341197", "/", "", "1", "1", ""
2023-08-01 08:06:38 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341198", "/", "", "1", "1", ""
2023-08-01 08:06:44 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "2a8km3qdge39eop8t728j21g2meie393", "0", "/", "", "1", "1", ""
2023-08-01 08:06:50 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341210", "/", "", "1", "1", ""
2023-08-01 08:06:56 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341216", "/", "", "1", "1", ""
2023-08-01 08:07:45 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "p0lk77jjh0l7ag782g2r1gn5i5hro32i", "0", "/", "", "1", "1", ""
2023-08-01 08:07:49 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341269", "/", "", "1", "1", ""
2023-08-01 08:07:54 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341274", "/", "", "1", "1", ""
2023-08-01 08:07:58 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "1@1690877278#499e74ef035bfb5e5c04b8fad6643a8b", "1690877288", "/", "", "1", "1", ""
2023-08-01 08:08:09 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "p0lk77jjh0l7ag782g2r1gn5i5hro32i", "0", "/", "", "1", "1", ""
2023-08-01 08:08:14 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341294", "/", "", "1", "1", ""
2023-08-01 08:08:18 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341298", "/", "", "1", "1", ""
2023-08-01 08:08:21 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "p0lk77jjh0l7ag782g2r1gn5i5hro32i", "0", "/", "", "1", "1", ""
2023-08-01 08:08:25 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341305", "/", "", "1", "1", ""
2023-08-01 08:08:28 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341308", "/", "", "1", "1", ""
2023-08-01 08:09:09 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "1@1690877349#ebfb8bd2f1835fae76866a57fbd69ef8", "1690877359", "/", "", "1", "1", ""
2023-08-01 08:09:37 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "2@1690877377#ebfb8bd2f1835fae76866a57fbd69ef8", "1690877387", "/", "", "1", "1", ""
2023-08-01 08:09:45 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "t2ciumt9178i99spfvmn59lvk251j2he", "0", "/", "", "1", "1", ""
2023-08-01 08:09:49 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipocUserID", "38665", "1693469389", "/", "", "1", "1", ""
2023-08-01 08:09:50 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "78mstkl7qian8i93qrenjeqptiispmin", "0", "/", "", "1", "1", ""
2023-08-01 08:09:51 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341391", "/", "", "1", "1", ""
2023-08-01 08:09:52 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipocUserName", "Bkami", "1693469392", "/", "", "1", "1", ""
2023-08-01 08:09:53 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341393", "/", "", "1", "1", ""
2023-08-01 08:09:54 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341394", "/", "", "1", "1", ""
2023-08-01 08:10:00 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "78mstkl7qian8i93qrenjeqptiispmin", "0", "/", "", "1", "1", ""
2023-08-01 08:10:04 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341404", "/", "", "1", "1", ""
2023-08-01 08:10:08 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341408", "/", "", "1", "1", ""
2023-08-01 08:10:12 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "78mstkl7qian8i93qrenjeqptiispmin", "0", "/", "", "1", "1", ""
2023-08-01 08:10:14 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "t2ciumt9178i99spfvmn59lvk251j2he", "0", "/", "", "1", "1", ""
2023-08-01 08:10:16 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341416", "/", "", "1", "1", ""
2023-08-01 08:10:17 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipocUserID", "38665", "1693469417", "/", "", "1", "1", ""
2023-08-01 08:10:19 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341419", "/", "", "1", "1", ""
2023-08-01 08:10:19 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipocUserName", "Bkami", "1693469419", "/", "", "1", "1", ""
2023-08-01 08:10:22 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341422", "/", "", "1", "1", ""
2023-08-01 08:10:27 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "t2ciumt9178i99spfvmn59lvk251j2he", "0", "/", "", "1", "1", ""
2023-08-01 08:10:31 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipocUserID", "38665", "1693469431", "/", "", "1", "1", ""
2023-08-01 08:10:34 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipocUserName", "Bkami", "1693469434", "/", "", "1", "1", ""
2023-08-01 08:10:38 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341438", "/", "", "1", "1", ""
2023-08-01 08:10:46 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "ue92krici1l41k6f66go2rlvehk50cv1", "0", "/", "", "1", "1", ""
2023-08-01 08:10:49 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341449", "/", "", "1", "1", ""
2023-08-01 08:10:51 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341451", "/", "", "1", "1", ""
2023-08-01 08:10:56 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "ue92krici1l41k6f66go2rlvehk50cv1", "0", "/", "", "1", "1", ""
2023-08-01 08:10:59 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341459", "/", "", "1", "1", ""
2023-08-01 08:11:01 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341461", "/", "", "1", "1", ""
2023-08-01 08:11:04 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "ue92krici1l41k6f66go2rlvehk50cv1", "0", "/", "", "1", "1", ""
2023-08-01 08:11:06 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659341466", "/", "", "1", "1", ""
2023-08-01 08:11:08 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659341468", "/", "", "1", "1", ""
2023-08-01 08:11:21 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "1@1690877481#90e87bb3fab2f03267699b61befda37e", "1690877491", "/", "", "1", "1", ""
2023-08-01 08:11:58 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "2@1690877518#90e87bb3fab2f03267699b61befda37e", "1690877528", "/", "", "1", "1", ""
2023-08-01 08:12:00 app-79bcd4c6c8-s982j wikipoc: setcookie: "cpPosIndex", "3@1690877520#90e87bb3fab2f03267699b61befda37e", "1690877530", "/", "", "1", "1", ""
2023-08-01 08:20:02 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "8hhen30hopathma6499cepbrq457b0cm", "0", "/", "", "1", "1", ""
2023-08-01 08:20:03 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659342003", "/", "", "1", "1", ""
2023-08-01 08:20:05 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659342005", "/", "", "1", "1", ""
2023-08-01 08:20:09 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "8hhen30hopathma6499cepbrq457b0cm", "0", "/", "", "1", "1", ""
2023-08-01 08:20:10 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659342010", "/", "", "1", "1", ""
2023-08-01 08:20:12 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659342012", "/", "", "1", "1", ""
2023-08-01 08:20:13 app-79bcd4c6c8-s982j wikipoc: already set setcookie: "wikipoc_session", "8hhen30hopathma6499cepbrq457b0cm", "0", "/", "", "1", "1", ""
2023-08-01 08:20:15 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659342015", "/", "", "1", "1", ""
2023-08-01 08:20:16 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659342016", "/", "", "1", "1", ""
2023-08-01 08:21:02 app-79bcd4c6c8-s982j wikipoc: setcookie: "wikipoc_session", "alpc88984mjolqagc45h9d3mcurqs3r8", "0", "/", "", "1", "1", ""
2023-08-01 08:21:04 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocUserID", "", "1659342064", "/", "", "1", "1", ""
2023-08-01 08:21:06 app-79bcd4c6c8-s982j wikipoc: already deleted setcookie: "wikipocToken", "", "1659342066", "/", "", "1", "1", ""

Earlier version its working properly, its taking time to load but at least working.

Does this mean earlier versions of PluggableAuth+SimpleSAMLphp on the _same_ MediaWiki (1.39) or on a _previous_ version of MediaWiki (1.35?).

One of the screenshots shows lots of PHP notices/warnings written into the webserver output. Be aware that this may affect the SAML authn process. Try to set display_errors = Off in your php.ini.

The logs tell that the SAML authentication completely succeeds (Authenticated existing user: Posha). SimpleSAMLphp hands over the username to PluggableAuth, which

  1. creates the UserIdentity (https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/blob/7.0.0/includes/PluggableAuthLogin.php#L118)
  2. runs group sync (https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/blob/7.0.0/includes/PluggableAuthLogin.php#L119)
  3. runs authorization hookhandlers (https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/blob/7.0.0/includes/PluggableAuthLogin.php#L122)

One could comment out #2 and #3 to see if the session loss happens there. But to be honest, this seems to be very unlikely.

The session loss probably already happens in #4 of this list:

  1. MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider::beginPrimaryAuthentication sets RETURNTOURL_SESSION_KEY session value
  2. MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider::beginPrimaryAuthentication redirects to Special:PluggableAuthLogin
  3. MediaWiki\Extension\PluggableAuth\PluggableAuthLogin::execute invokes SimpleSAMLphp
  4. MediaWiki\Extension\SimpleSAMLphp\SimpleSAMLphp::authenticate initiates the SAML authentication process, thus starting a redirect sequence between SP and IdP
  5. MediaWiki\Extension\PluggableAuth\PluggableAuthLogin::execute reads RETURNTOURL_SESSION_KEY session value

So by the time SAML finishes successfully, MediaWiki already has lost the RETURNTOURL_SESSION_KEY. I suspect some configuration in the SimpleSAMLphp ServiceProvider. Maybe an issue with HTTPS and Cookies.

Can you please share more details about your setup? Like version of SimpleSAMLphp ServiceProvider and if the update you did was only the MediaWiki extensions or also the MediaWiki core and the Service Provider.

Btw. I see a myusername custom UserInfoProvider in the logs. I guess it is just the one from the extension description page, isn't it? If not, could you maybe share it here?

HI @Osnard , Thanks for understanding my issue & reverting me continuously & giving me details where i missing session key.
Earlier version i mean Pluggable auth & simaplesamlphp earlier patch.
SimpleSAMLphp extension 5.0.1,
Simplesamlphp library 2.0.3
PluggableAuth-REL1_39-dc30743.tar.gz and SimpleSAMLphp-REL1_39-9ffe0de.tar.gz

earlier task its working

when i took latest veriosn of these extensions iam facing issue.

Currently, iam facing

image.png (1×1 px, 452 KB)
,

Configuration

$wgSimpleSAMLphp_InstallDir = '/var/simplesamlphp/';

wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'SimpleSAMLphp' );

$wgPluggableAuth_EnableAutoLogin = true;
$wgPluggableAuth_EnableLocalLogin = false;
$wgPluggableAuth_EnableLocalProperties = false;
$wgPluggableAuth_ButtonLabelMessage = 'Login';

$wgPluggableAuth_Class = 'SimpleSAMLphp';

$wgDebugLogGroups['cookie'] = '/var/www/html/logs/Cookie.log';
$wgDebugLogGroups['session'] = '/var/www/html/logs/Session.log';
$wgDebugLogGroups['PluggableAuth'] = '/var/www/html/logs/PluggableAuth.log';
$wgDebugLogGroups['SimpleSAMLphp'] = '/var/www/html/logs/SimpleSAMLphp.log';

iam using these rom the extension description page.
$wgSimpleSAMLphp_MandatoryUserInfoProviders['myusername'] = [
'factory' => function() {

		return new \MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\GenericCallback( function( $attributes ) {
			if ( !isset( $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'] ) ) {
				throw new Exception( 'missing email address' );
			}
			$parts = explode( '@', $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'][0]);
						return strtolower( $parts[0] );
		} );

}
];
$wgPluggableAuth_Config['Log in using my SAML'] = [
'plugin' => 'SimpleSAMLphp',
'data' => [

		'userinfoProviders' => ['username' => 'myusername'],
		'authSourceId' => 'default-sp',
		'usernameAttribute' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',
		'realNameAttribute' => ['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname','http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'],
		'emailAttribute' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'
	 ]

];

@Pooja2425: Please use markup to keep code comments readable - thanks.

HI @Osnard ,@cicalese, @Aklapper
thanks for helping me out, I am able to know now why sessions is creating problem.
I have enabled blobfuse2 azure storage , now i have disbaled it so sso started working now.

Thanks for your guidance & time.

Aklapper renamed this task from Pluggable auth not authenticating user. to Pluggable auth not authenticating user when blobfuse2 azure storage is enabled.Aug 3 2023, 8:18 AM

I believe we can close this, can't we? Doesn't look like anything we can influence from within the extensions implementation.