AllianceAuth Wiki integration

Hello everyone,

currently i’m trying to integrate dokuWiki into our AllianceAuth.

With a little help from Google I’ve found this module, which makes the Wiki availible to the authenticated users. But I’m facing some troubles:

  1. On the “Services” page of AllianceAuth the Wiki only shows up, when I’m logged in with my admin account. Normal users, even with granted Wiki access, can’t see the link to the Wiki within “Services”.

  2. I can’t figure out how to “teach” dokuWiki to only accept loggins via AllianceAuth. The module linked above referrs to this module as the corresponding one for dokuWiki, but after integration my Wiki wasn’t accessible any more.

So, is there anyone who had the same issues and found a solution or can someone maybe help me with the installation. I think an extended installation documentation would also help.

Thanks in advance,
4tt1c

Hello again,

a little update:
I’ve managed to implement both modules but the Wiki site now shows “cleanup session failed”. Nothing more.
Does anyone know how to handle or what is meant by this?

Enable debug within Dokuwiki and see what the log says. From the error i assume is something related to the SSO from AAuth via discourse SSO plugin and then to dokuwiki

Thanks for this hint Petty Thief.

After some investigation i’ve found a SQL statement that can not be executed properly.

The statement

SELECT id FROM session WHERE sessionid = :sessionid;

gives back

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:sessionid’ at line 1

but i can’t figure out what’s wrong with this statement.
I’m using MySQL 5.7.25-0ubuntu0.16.04.2, is there any restriction in the syntax between different versions of MySQL? Maybe the statement only works with older versions?

:sessionid should be a variable, but it’s passed incorrectly to the SQL statement. try to find out in which file this piece of code is and see from there if this needs escaped try adding some ’ and ’ between first.

SELECT id FROM session WHERE sessionid = ‘:sessionid’;

Hey,

sorry for the delay, i was not in town.
I’ve fixed the statement problem with choosing the correct database table in the config file.

Now AllianceAuth redirects me correctly to the wiki, but the login button doesn’t show up.
So i see the start page that tells me i would have not enough permissions, which is correct.
If i click on the wiki-login button a blank wiki page shows up and i can do nothing.

I expected to see the same login button as it is used within alliance auth

EDIT:
After a look into the Nginx error.log i found this one:

2019/03/21 22:02:06 [error] 26732#26732: *41 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Class ‘Ramsey\Uuid\Uuid’ not found in /var/www/dokuwiki/lib/plugins/discoursesso/sso_nonce.php:55
Stack trace:
#0 /var/www/dokuwiki/inc/html.php(47): gen_nonce(‘start’)
#1 /var/www/dokuwiki/inc/Action/Login.php(33): html_login()
#2 /var/www/dokuwiki/inc/template.php(98): dokuwiki\Action\Login->tplContent()
#3 /var/www/dokuwiki/inc/events.php(111): tpl_content_core(‘login’)
#4 /var/www/dokuwiki/inc/events.php(256): Doku_Event->trigger(‘tpl_content_cor…’, true)
#5 /var/www/dokuwiki/inc/template.php(83): trigger_event(‘TPL_ACT_RENDER’, ‘login’, ‘tpl_content_cor…’)
#6 /var/www/dokuwiki/lib/tpl/dokuwiki/main.php(59): tpl_content()
#7 /var/www/dokuwiki/inc/actions.php(27): include(’/var/www/dokuwi…’)
#8 /var/www/dokuwiki/doku.php(120): act_dispatch()
#9 {main}
thrown in /var/www/dokuwiki/lib/plugins/discoursesso/sso_nonce.php on line 55” while reading upstream, client: THIS.IS.MY.IP, server: , request: “GET /doku.php?id=start&do=login&sectok= HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.0-fpm.sock:”, host: “www.thisismywebsite.com”, referrer: “http://www.thisismywebsite.com/doku.php?id=start

Any hints?

Seems a dependency isn’t installed

Hey Brock,

thanks for your reply.

You’re right, there was a problem with the installation of ramsey/uuid, so i’ve installed it manually through a git download and composer install.

After that the error message still doesn’t change. I’m still getting the same error when trying to access the login page.

well I’d check to see why it didn’t install with teh dokuwiki thing, its looking for a very specific location/class that may be different if you manually install it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.