CAS authentication for dokuwiki without LDAP but using cas attributes
clone this repository as "authplaincas" in the plugin directory
CAS authentication for dokuwiki without LDAP but using cas attributes
License: GNU General Public License v2.0
This plugin seems to make use of one or more form related action events that will be removed in the next DokuWiki release. Please have a look at https://www.patreon.com/posts/better-forms-58551930 for details.
My apologies if this has already been addressed in your code. If you have any questions on how to implement the needed changes please let me know.
Hi,
I forked this plugin a while ago, waiting for it to get some love more here… It seems current maintainers don't use it for some time now ?
Can I help maintaining it (here or there) ?
I already merged there waiting PR's here
Thank you for the work done here !
Thanks for sharing your work! I am new at git, sorry if I am not doing this correctly.
In file plaincas.settings.php function plaincas_custom_groups
the last line:
return array();
should be:
return $customGroups;
When I made this fix the plugin worked as described. Thanks again.
The problem is that phpCAS replaces the session by a new session, and this new session's ID is only 13 characters long. Dokuwiki doesn't like that (minimum length for session ID is 22), and throws away the session.
This might be an issue with phpCAS.
I created a workaround for dokuwiki (dokuwiki/dokuwiki#1904), but I'm not sure whether it should be fixed over there, or in authplaincas itself, or in phpCAS.
plainauthcas play difficulty with the plugin splitauth (which permit to separate authentication from authorization with groups)
my current setup is:
$conf['authtype'] = 'authsplit';
$conf['plugin']['authsplit']['primary_authplugin'] = 'authplaincas';
$conf['plugin']['authsplit']['secondary_authplugin'] = 'authmysql';
the authpllaincas only check the CAS ticket , the others values (name, email, ...) and groups are computed by the authmysql plugin
This setup is usefull if the CAS server return very few attributes (in my case, only the login)
the main problem is: Groups are replaced by authplaincas after there were set by the secondary plugin
auth.php:314 if ($this->_userInfo['grps'] != $this->_userInfo['tmp_grps'] ...
(and the name and the email)
a minor problem is the direct check from the plugin as auth backend which makes display the link to the cas server or not
action.php:54 if ($conf['authtype'] == 'authplaincas')
Hi,
I can't get a successful login because the "service" parameter is derived differently during the initial handoff and the later the backend ticket validation call.
In the first instance, the various configurables are used in the call to
phpCAS::setFixedServiceURL(...)
When the ticket is returned and the library makes a behind-the-scenes call to the cas server to it doesn't use include a call to phpCAS::setFixedServiceURL and derives the service differently.
In may case, dokuwiki is in a docker container behind a reverse proxy so there's a few things different (E.g. ports, paths, host) phpCAS just attempts to build it's url itself (but would use a configured $url
if set previously)
I've attempted to include a call to setFixedServiceURL(...)
before the validation process takes place, but the $login_url
parameter is derived from dokuwiki's $QUERY
global var.
Unfortunately $QUERY
isn't set (in doku.php) until after trustExternal
is called (where validation is attempted)
I've hit a roadblock in my own patching. Does anyone have any other suggestions or ways to get the same URL used in both places.?
The current version of phpCAS doesn't work with this plugin.
The initial breakage happens due to an extra constructor argument for the client.
(boolean 'proxy' is expected as arg no. 2, but in the plugin this argument is for the server host)
The link to the master release of phpCAS is possibly 1.3.5, the latest.
There are security advisories for client lib releases lower than that.
Which release should we select if we want it to work?
Do you think it might be just the constructor? or more fundamental changes?
Thanks
Using the latest plugin which has:
base authplaincas
author Fabian Bircher
email [email protected]
date 2016-07-22
name Plain CAS Auth Plugin
desc Provides user authentication against a CAS server
url http://www.dokuwiki.org/plugin:authplaincas
Hello,
I have been using your plugin for the last few months, and no matter what I set the timeout to, (e.g. 900 in my case), it always logs me out automatically after an hour or two. Extremely annoying! I verified that my timeout for our CAS service is set to 24 hours, and it works with every other SSO app that uses CAS except my wiki. Any ideas on how to fix this? Seems that no matter what number I put in for the timeout, it kicks me out after an hour or two...
-Matt
Hello,
I did follow https://www.dokuwiki.org/plugin:authplaincas installation guide
did put lib/plugins/authplaincas/phpCAS/CAS.php and cp -a /usr/share/pear/CAS to lib/plugins/authplaincas/phpCAS/
CAS SSO login work fine, but I never get my username associated with a custom group I did define in conf/plaincas.settings.php as follows
function plaincas_custom_groups(){
$customGroups = array(
'SSI' => array('jehanproc', 'userame2'),
'SI' => array('copfin', 'userame4'),
);
return array();
}
Whe I login and ask for details with do=check
doku.php?id=start&do=check
I do see my looged in as jehanproc and I am part of group user (the default group)
but not in SSI I would expect .
please, let me know what is wrong ?
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.