Last modified: 2014-04-18 23:58:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60398, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58398 - AccessDeniedError: Your wiki requires a logged-in account to access the API.
AccessDeniedError: Your wiki requires a logged-in account to access the API.
Status: RESOLVED WORKSFORME
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-12 16:59 UTC by Sandra
Modified: 2014-04-18 23:58 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sandra 2013-12-12 16:59:24 UTC
For private wiki's that requires login

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;

I get this from nodejs

Stack trace: AccessDeniedError: Your wiki requires a logged-in account to access the API.

when I do

lynx  http://localhost:8000/localhost/x
Comment 1 Gabriel Wicke 2014-02-18 19:16:13 UTC
The behavior looks correct to me.

Can you be more specific about where you see a problem here?
Comment 2 Sandra 2014-02-18 22:44:46 UTC
If your wiki requires login, then the wiki api.php page, which parsoid needs, also requires login. There is no way to specify a username+password to parsoid so it can access this page. That is what you see in the error message.

To fix this, I guess a dummy account have to be made in MediaWiki, and then the username+password needs to be entered somewhere in parsoid config files.
Comment 3 Gabriel Wicke 2014-04-18 19:05:02 UTC
Parsoid forwards cookies to the API and disables caching if a cookie is set. The VisualEditor extension for example supports forwarding cookies to Parsoid for private wikis, see their settings.

Parsoid should not have access to sensitive information like passwords. In the longer term we'll probably add support for time-limited signed token forwarding once MediaWiki in general gains support for that.
Comment 4 Sandra 2014-04-18 22:24:49 UTC
Very interesting. I would like to try that.

Based on https://www.mediawiki.org/wiki/Talk:Parsoid#More_private_wiki_trouble would it be correct that all I have to do is adding

$wgVisualEditorParsoidPrefix = 'localhost'; 
$wgVisualEditorParsoidForwardCookies = true;

and then it should work?
Comment 5 Gabriel Wicke 2014-04-18 23:58:48 UTC
Yes, that should work unless things have changed in VE land in the meantime.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links