centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
575 stars 240 forks source link

[Knowledgebase] - error on private wiki #9062

Open joschi99 opened 4 years ago

joschi99 commented 4 years ago

Centreon 19.10, 20.04 Mediawiki: 1.31.x Mediawiki option: $wgGroupPermissions['*']['read'] = false;

If we have a private wiki where access to pages is restricted to authenticated users the KB on Centreon is not working and we got this error image

The problem is related on /usr/share/centreon/www/class/centreon-knowledge/wikiApi.class.php on function getWikiVersion() because the API needs authentication.

lpinsivy commented 3 years ago

Hi @joschi99, I'm not an mediawiki export but can you manage access to give the API user to get the siteinfo information?

joschi99 commented 3 years ago

Hi @lpinsivy, yes, if we do the user authentication before it works without problems we have done some tests about this topic. Your procedure is doing the siteinfo without authentication which not works on private wikis.

rmorandell-pgum commented 3 years ago

Hi @lpinsivy,

our "quick" workaround is to login on function getWikiVersion(), too. So after that all pages are working fine.

public function getWikiVersion() { $this->login(); $postfields = array( 'action' => 'query', 'meta' => 'siteinfo', 'format' => 'json', ) ...... }