Loading...
 
Skip to main content

Limit users from CAS

Status
Closed
Subject
Limit users from CAS
Version
1.8.x
1.9.x
Category
  • Feature request
Feature
External Authentication (LDAP, AD, PAM, CAS, etc)
Resolution status
New
Submitted by
gpaterno
Lastmod by
gpaterno
Rating
(0)
Description

While CAS authentication is great, it allows multiple users to login if you have a widely common CAS server.
For example, SecurePass 1 strong authentication allow ALL securepass users to login through their CAS.
The need is to optionally limit which users or users domain can login to tikiwiki through CAS.

1 www.secure-pass.net

Solution

A quick and dirty solution is to do a regex check on the CAS username. For our purposes, on userslib.php (ver 8.2) around line 470 add the following:

469a470,477
>
> // Gippa
> // If user is authenticated, but not belong to us, fails
> elseif ( $userCAS && !preg_match("/(.*)@mycompany.com$/", $user) ) {
> return array(false, $user, $result);
> }
>
>

That is a quick and dirty patch. You can create an input box to check for regex or domains.
Thank you very much.
Best regards,
Giuseppe


Priority
25
Demonstrate Bug on Tiki 19+
Please demonstrate your bug on show2.tiki.org
Demonstrate Bug (older Tiki versions)
Ticket ID
4083
Created
Monday 19 December, 2011 14:35:21 UTC
by gpaterno
LastModif
Wednesday 26 February, 2020 16:54:40 UTC


Collapse/expand modules below
Show PHP error messages