DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:authmantis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:authmantis [2015-03-23 18:01] Aleksandrplugin:authmantis [2024-04-19 13:55] (current) – [FAQ] 82.135.123.115
Line 1: Line 1:
-====== Mantis Authentication Integration Plugin ======+====== MantisBT Authentication Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: Mantis authentication integration +description: Enables single sign-on to DokuWiki using MantisBT as authentication back-end. 
-author     : Ventzy Kunev +author     : Damien Regad, Victor Boctor and other contributors 
-email      : v.kunev@gmail.com+email      : mantis-dev@lists.sourceforge.com
 type       : Auth type       : Auth
-lastupdate : 2013-08-10 +lastupdate : 2020-06-14 
-compatible : Weatherwax, Hrun+compatible : Weatherwax, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos+
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : mantis+tags       : mantis, authentication, integration
  
-downloadurl: https://github.com/Ventzy/AuthMantis/zipball/master +downloadurl: https://github.com/mantisbt/dokuwiki-plugin-authmantis/zipball/master 
-bugtracker : https://github.com/Ventzy/AuthMantis/issues +bugtracker : https://github.com/mantisbt/dokuwiki-plugin-authmantis/issues 
-sourcerepo : https://github.com/Ventzy/AuthMantis+sourcerepo : https://github.com/mantisbt/dokuwiki-plugin-authmantis 
 +donationurl: https://github.com/sponsors/dregad
 ---- ----
  
 ===== Description ===== ===== Description =====
  
-Uses [[http://www.mantisbt.org/|Mantis]] login with DokuWiki.+This authentication plugin enables single sign-on to DokuWiki, using an external trust mechanism to 
 +authenticate users against [[https://mantisbt.org/|MantisBT]].
  
-There is published description [[http://www.mantisbt.org/wiki/doku.php/mantisbt:issue:7075:integration_with_dokuwiki|Integrating DokuWiki with Mantis]] which works before 2013-05-10 "Weatherwax" release of DocuwikiIn "Weatherwax" authentication plugins are used instead of authentication backends. This plugin is conversion of backend code to the plugin.+It is based upon the original authentication back-end written by Victor Boctor back in 2006. 
 + 
 +More information about integrating MantisBT with DokuWiki can be found on the [[https://mantisbt.org/wiki/doku.php/mantisbt:issue:7075:integration_with_dokuwiki|MantisBT Wiki]]
 + 
 +===== License ===== 
 + 
 +This program is free software: you can redistribute it and/or modify 
 +it under the terms of the  
 +[[https://www.gnu.org/licenses/gpl-3.0.html|GNU General Public License]] 
 +as published by the Free Software Foundation, either version 3 of the 
 +License, or (at your option) any later version. 
 + 
 +This program is distributed in the hope that it will be useful, 
 +but WITHOUT ANY WARRANTY; without even the implied warranty of 
 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 +GNU General Public License for more details.
  
  
 ===== Installation ===== ===== Installation =====
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+==== Prerequisites ====
  
 +This plugin requires access to a MantisBT instance located on the same server as DokuWiki.
  
-===== Usage ===== +=== DokuWiki compatibility === 
-==== New setup ==== + 
-  Follow sections "Mantis Configuration", "DokuWiki Steps Core Configuration" and "Authorisation Configuration Core Configurationfrom [[http://www.mantisbt.org/wiki/doku.php/mantisbt:issue:7075:integration_with_dokuwiki|Integrating DokuWiki with Mantis]]. In ''/config/local.php'' replace <code> +The plugin is compatible with DokuWiki release 2013-05-10 "Weatherwaxand later. 
-     $conf['authtype'] = 'mantis'; + 
-     with +Older releases used [[:auth#releases_2012-10-13_adora_belle_and_older|authentication back-ends]] instead of plugins. This code is no longer supportedbut [[https://github.com/mantisbt/dokuwiki-plugin-authmantis/releases/tag/release_2012-12-01a|still available]] in for use with DokuWiki releases before 2013-05-10 "Weatherwax"
-     $conf['authtype'] = 'authmantis';+ 
 +=== MantisBT compatibility === 
 + 
 +MantisBT releases 1.2.x or later and 2.x are fully supported.  
 +The plugin may work with earlier releases as well, but this has not been tested. 
 + 
 +The [[https://mantisbt.org/wiki|MantisBT wiki]] relies on this plugin since 2013 
 + 
 +==== Setup ==== 
 + 
 +Install the plugin following the [[:plugin_installation_instructions|standard process]], then proceed with the next 3 sections. 
 + 
 +=== Access Control List Configuration === 
 + 
 +Setup ACL rules for groups as appropriate for your environment, by defining entries in ''acl.auth.php'' for each access level defined in your MantisBT instance. 
 + 
 +For example, with default MantisBT access levels your setup could be: 
 +<code - acl.auth.php
 +# MantisBT access levels 
 +*  @VIEWER         1 
 +*  @REPORTER       2 
 +*  @UPDATER        4 
 +*  @DEVELOPER      8 
 +*  @MANAGER        16 
 +*  @ADMINISTRATOR  16
 </code> </code>
-  - Install this plugin 
  
-==== Convert working backend setup ==== +In addition to the above, if you want anonymous, read-only access to your wiki for everyone (i.e. including non logged-in users), you could add 
-  Install this plugin +<code> 
-  - In /config/local.php replace<code> +*  @ALL            1
-    $conf['authtype'] = 'mantis'; +
-    with +
-    $conf['authtype'] = 'authmantis';+
 </code> </code>
 +
 +Please refer to [[:acl|Access Control Lists (ACL)s]] documentation for further information.
 +
 +=== MantisBT Core Initialization ===
 +
 +Add the following lines to your ''local.protected.php'' file, adjusting the path to the MantisBT root as appropriate:
 +
 +<code php local.protected.php>
 +# Path to the MantisBT root directory on the server
 +define( 'MANTIS_ROOT', '/path/to/mantisbt/' );
 +require_once( MANTIS_ROOT . 'core.php' );
 +</code>
 +
 +//
 +Note that this can't be done in the plugin (i.e. with a configuration option), due to conflicts with the declaration of utf8 compatibility functions between MantisBT core and DokuWiki, so the only option for now is to initialize the MantisBT core from the DokuWiki config file.
 +//
 +
 +=== Set the Authentication Back-End ===
 +
 +Now the //authmantis// back-end can be enabled in the DokuWiki configuration:
 +
 +  - Open the DokuWiki //Configuration Manager//
 +  - In the //Authentication// section:
 +    * **Check** //Use access control lists//
 +    * Select **authmantis** as //Authentication backend//
 +    * Add **@ADMINISTRATOR** in the //Superuser// field
 +  - **Save** the changes.
 +
 +Alternatively, you can manually edit the ''local.php'' (or ''local.protected.php'') file:
 +<code php>
 +$conf['useacl'     = 1;
 +$conf['authtype'   = 'authmantis';
 +$conf['superuser'  = '@ADMINISTRATOR';
 +$conf['plugin']['authmantis']['mantis_root'] = '/path/to/mantisbt/';
 +</code>
 +
 +==== Content Security Policy ====
 +
 +MantisBT enables [[WP>Content_Security_Policy|Content Security Policy]] by default. 
 +This can cause issues and prevent DokuWiki from functioning properly((https://github.com/mantisbt/dokuwiki-plugin-authmantis/issues/2)) when this plugin is installed.
 +
 +To fix the problem, please **install the [[cspheader]] plugin**, and configure it as follows:
 +
 +^ Directive ^ Value ^
 +| script-src | '''self' 'unsafe-inline''' |
 +| style-src | '''self' 'unsafe-inline''' |
 +| img-src | '''self' www.dokuwiki.org data:'' |
 +
 +Other settings are left as default (specifically, //default-src// and //base-uri// set to '''self''', all other directives empty).
 +
 +The above settings have been confirmed working with DokuWiki's default template, but may need to be adapted if using a different template or to your sites' specifics.
 +
 +===== Development =====
 +
 +=== Revision history (Github releases) ===
 +
 +{{rss>https://github.com/mantisbt/dokuwiki-plugin-authmantis/releases.atom 5}}
 +
 +The complete [[https://github.com/mantisbt/dokuwiki-plugin-authmantis/releases|list of releases and change log]] is available on Github.
 +
 +
 +=== Recent commits ===
 +
 +{{rss>https://github.com/mantisbt/dokuwiki-plugin-authmantis/commits/master.atom 5 author date}}
 +
 +Full [[https://github.com/mantisbt/dokuwiki-plugin-authmantis/commits/master|Git log]].
 +
 +=== Known Bugs and Issues ===
 +
 +Please refer to the plugin's [[https://github.com/mantisbt/dokuwiki-plugin-authmantis/issues|Issue tracker on Github]].
 +
 +
 +===== Credits =====
 +
 +This plugin is based on the Authentication back-end written by Victor Boctor,
 +published in the [[https://mantisbt.org/wiki/doku.php/mantisbt:issue:7075:integration_with_dokuwiki|MantisBT Wiki]] back in 2006. 
 +
 +In August 2013, Ventzy Kunev [[plugin:authmantis?do=revisions&rev=1376142909|first published]] another version of this plugin here. His variant was based on the same original source code from the MantisBT Wiki, but considering that it was unmaintained since 2013 (with just a version bump in 2015), the MantisBT team decided to replace [[https://github.com/Ventzy/AuthMantis|Ventzy's original plugin]] with the one used for the official MantisBT wiki, which differs slightly. At this occasion, this page was almost entirely rewritten.
 +
 +
 +===== FAQ =====
 +
 +===== I locked myself out, what do I do now? =====
 +
 +  - Edit your local configuration file ''./conf/local.php''
 +  - Reset authentication to **authplain** <code>
 +$conf['authtype'] = 'authplain';
 +</code>
 +  - Save the file
 +
plugin/authmantis.1427130107.txt.gz · Last modified: 2015-03-23 18:01 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki