
Hi list,
one may find Kernel::System::Auth::Radius useful. Here we go:
# --
# Kernel/System/Auth/Radius.pm - provides the radius authentification
# based on Martin Edenhofer's Kernel::System::Auth::DB
# Copyright (C) 2004 Andreas Jobs

Hi Andreas, good work! :) Is it free to put it into the OTRS framework? Thanks for feedback! -Martin On Mon, Aug 09, 2004 at 02:29:13PM +0200, Andreas Jobs wrote:
Hi list,
one may find Kernel::System::Auth::Radius useful. Here we go:
# -- # Kernel/System/Auth/Radius.pm - provides the radius authentification # based on Martin Edenhofer's Kernel::System::Auth::DB # Copyright (C) 2004 Andreas Jobs
# -- # $Id: Radius.pm,v 1.0 2004/08/07 00:50:36 jobsanzl Exp $ # -- # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (GPL). If you # did not receive this file, see http://www.gnu.org/licenses/gpl.txt. # -- # Note: # available objects are: ConfigObject, LogObject and DBObject # -- package Kernel::System::Auth::Radius;
use strict; use Authen::Radius;
use vars qw($VERSION); $VERSION = '$Revision: 1.0 $'; $VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
# -- sub new { my $Type = shift; my %Param = @_;
# allocate new hash for object my $Self = {}; bless ($Self, $Type);
# check needed objects foreach (qw(LogObject ConfigObject DBObject)) { $Self->{$_} = $Param{$_} || die "No $_!"; }
# Debug 0=off 1=on $Self->{Debug} = 0;
# get user table $Self->{RadiusHost} = $Self->{ConfigObject}->Get('RadiusHost') || 'radiushost'; $Self->{RadiusSecret} = $Self->{ConfigObject}->Get('RadiusSecret') || 'radiussecret';
return $Self; } # -- sub GetOption { my $Self = shift; my %Param = @_; # check needed stuff if (!$Param{What}) { $Self->{LogObject}->Log(Priority => 'error', Message => "Need What!"); return; } # module options my %Option = ( PreAuth => 0, ); # return option return $Option{$Param{What}}; } # -- sub Auth { my $Self = shift; my %Param = @_; # check needed stuff if (!$Param{User}) { $Self->{LogObject}->Log(Priority => 'error', Message => "Need User!"); return; } # get params my $User = $Param{User} || ''; my $Pw = $Param{Pw} || ''; my $RemoteAddr = $ENV{REMOTE_ADDR} || 'Got no REMOTE_ADDR env!'; my $UserID = ''; my $GetPw = '';
# just in case for debug! if ($Self->{Debug} > 0) { $Self->{LogObject}->Log( Priority => 'notice', Message => "User: '$User' tried to login with Pw: '$Pw' ($RemoteAddr)", ); } # just a note if (!$User) { $Self->{LogObject}->Log( Priority => 'notice', Message => "No User given!!! (REMOTE_ADDR: $RemoteAddr)", ); return; } # just a note if (!$Pw) { $Self->{LogObject}->Log( Priority => 'notice', Message => "User: $User without Pw!!! (REMOTE_ADDR: $RemoteAddr)", ); return; }
# Create a radius object my $Radius = new Authen::Radius (Host => $Self->{RadiusHost}, Secret => $Self->{RadiusSecret}); my $AuthResult = $Radius->check_pwd ($User, $Pw);
# login note if (defined($AuthResult) && $AuthResult == 1) { $Self->{LogObject}->Log( Priority => 'notice', Message => "User: $User logged in (REMOTE_ADDR: $RemoteAddr).", ); return $User; } # just a note else { $Self->{LogObject}->Log( Priority => 'notice', Message => "User: $User with wrong Pw!!! (REMOTE_ADDR: $RemoteAddr)" ); return; } } # --
1;

Martin Edenhofer said the following on 08/10/2004 11:25 AM:
Hi Andreas,
good work! :)
Thanks
Is it free to put it into the OTRS framework?
Yes, of course it it. BTW: Currently I'm working on an "incident-report" module for OTRS. Normally a customer creates the ticket. In our case we must create a ticket for a customer. It's like the Phone-View but for the following scenario: We detect a virus infection (for example). Now we want to notify the customer and create a ticket to track this case. This may be interesting for your customers, too. Andreas -- ! Andreas Jobs Network Operating Center ! ! Ruhr-Universitaet Bochum ! ! Cats can work out mathematically the exact place to sit that ! ! will cause most inconvenience. Pam Brown !

Hi Andreas, On Tue, Aug 10, 2004 at 11:41:52AM +0200, Andreas Jobs wrote:
Is it free to put it into the OTRS framework?
Yes, of course it it.
Thanks!
BTW:
Currently I'm working on an "incident-report" module for OTRS. Normally a customer creates the ticket. In our case we must create a ticket for a customer. It's like the Phone-View but for the following scenario:
We detect a virus infection (for example). Now we want to notify the customer and create a ticket to track this case.
This may be interesting for your customers, too.
How about the Email-Ticket (Compose-Ticket)? In this case (if a virus infection is detect) send an email/new ticket (maybe based on an tempate) to the customer and you can trace this ticket in your system.
Andreas
-- ! Andreas Jobs Network Operating Center ! ! Ruhr-Universitaet Bochum !
Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

Martin Edenhofer said the following on 08/10/2004 11:56 AM:
How about the Email-Ticket (Compose-Ticket)? In this case (if a virus infection is detect) send an email/new ticket (maybe based on an tempate) to the customer and you can trace this ticket in your system.
Thanks for the tip. (I should keep my eyes open ;-)) Andreas -- ! Andreas Jobs Network Operating Center ! ! Ruhr-Universitaet Bochum ! ! Cats can work out mathematically the exact place to sit that ! ! will cause most inconvenience. Pam Brown !
participants (2)
-
Andreas Jobs
-
Martin Edenhofer