Skip to Content.
Sympa Menu

en - [sympa-users] Sympa and CAS

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Maja Wolniewicz <address@concealed>
  • To: address@concealed
  • Subject: [sympa-users] Sympa and CAS
  • Date: Fri, 11 Apr 2008 15:26:17 +0200

I have had two problems in Sympa 5.4.1 configured with CAS-based authentication.
The first was: after successful login some operations - actually POST operations - fail.
According to the log, each operation causes a CAS redirect.
I've compared Sympa with CAS and Sympa with standard authentication and
found out that after successful login the field email_session in the table session_table is set to nobody while using CAS.
After adding in wwsympa.fcg, line 913
$session->{'email'} = $param->{'user'}{'email'};
CAS login and POST operations work without any problem.
Is it a bug?

The second problem - CAS logout didn't work.
It seems that here the CGI::Cookie package is the culprit.
The cookie cas_server is set in the subroutine set_cas_server from cookielib.pm
my $cookie = new CGI::Cookie (-name => 'cas_server',
-value => $value,
-domain => $domain,
-expires => $expires,
-path => '/'
);

## Send cookie to the client
printf "Set-Cookie: %s\n", $cookie->as_string;
When auth.conf has only one CAS authentication definition, $value is 0
The result is the cookie with empty value (value zero converted to "").
During logout in the do_logout subroutine the cookie cas_served is checked:
my $cas_id = &cookielib::get_cas_server($ENV{'HTTP_COOKIE'});
and the value "" instead of 0 causes the problem.
I've modified set_cas_server and get_cas_server subroutines. In set_cas_server I've added
$value++;
before calling new CGI::Cookie.
In get_cas_server I have now
my $http_cookie = shift;
#return &generic_get_cookie($http_cookie, 'cas_server');
my $value = &generic_get_cookie($http_cookie, 'cas_server');
$value--;
return $value;

and CAS logout works.

By the way, I've implemented CAS Single Sign Out in our sympa, which can be used with CAS v. 3.1.x. Anyone interested in my modifications?

Greetings
Maja
--
--
Maja Gorecka-Wolniewicz address@concealed
http://www.umk.pl/~mgw
PGP key: http://www.umk.pl/~mgw/pgp_pub_key.asc
Uczelniane Centrum Information & Communication
Informatyczne Technology Centre
Uniwersytet Mikolaja Kopernika Nicolaus Copernicus University
Coll. Maximum, pl. Rapackiego 1, 87-100 Torun, Poland
tel.: +48 56-611-27-40 fax: +48 56-622-18-50 tel. kom.: +48-693032574



Archive powered by MHonArc 2.6.19+.

Top of Page