Page MenuHomePhabricator

AccessDeniedError: Your wiki requires a logged-in account to access the API.
Closed, DeclinedPublic

Description

Author: littlesandra88

Description:
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


Version: unspecified
Severity: normal

Details

Reference
bz58398

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:16 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz58398.

The behavior looks correct to me.

Can you be more specific about where you see a problem here?

littlesandra88 wrote:

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.

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.

littlesandra88 wrote:

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?

Yes, that should work unless things have changed in VE land in the meantime.