Apache-AuthenSecurID

 view release on metacpan or  search on metacpan

Auth/Auth.pm  view on Meta::CPAN

# $Id: Auth.pm,v 1.9 2002/07/31 16:44:14 Administrator Exp $

package Apache::AuthenSecurID::Auth;

use strict;
use Apache;
use Apache::Registry;
use Apache::Constants qw(:common);
use IO::Socket::INET;
use Crypt::CBC;
use vars qw($VERSION);

$VERSION = '0.4';


sub handler {

   my $r = shift;

   # seed the random number generator

Auth/Auth.pm  view on Meta::CPAN

	my $message;
	my $extra_input;
	my $result;
	my %info;
	my $ace;
	my $mesg;
	my $my_rand = rand();
	my $return_rand;

	my $crypt_key = $r->dir_config("AuthCryptKey");
	my $crypt = new Crypt::CBC ( $crypt_key, "Blowfish" );
	
	$mesg = $crypt->encrypt_hex ("$my_rand:$session_id:$type:$username:$passcode"); 
	$client->send($mesg);

	$client->recv($mesg, 1024);
	$mesg = $crypt->decrypt_hex ( $mesg );


	( $return_rand, $result, $info{system_pin}, $info{min_pin_len}, $info{max_pin_len}, 
	$info{alphanumeric}, $info{user_selectable} )

Auth/Auth.pm  view on Meta::CPAN


 PerlModule Apache::AuthenSecurID::Auth

=head1 PREREQUISITES

For AuthenSecurID::Auth you need to enable the appropriate call-back hook 
when making mod_perl: 

  perl Makefile.PL PERL_AUTHEN=1

AuthenSecurID::Auth requires Crypt::Blowfish and Crypt::CBC.

For AuthenSecurID::Auth to properly track users mod_usertrack must be
compiled and enabled.


=head1 SEE ALSO

L<Apache>, L<mod_perl>, L<Authen::ACE> L<Apache::AuthenSecurID::Auth>

=head1 AUTHORS

Auth/Makefile.PL  view on Meta::CPAN

sub MY::libscan {
	my($self,$path) = @_;
	return '' if $path =~ /RCS/;
	$path;
}

WriteMakefile(
	'NAME'		=> 'Apache::AuthenSecurID::Auth',
	'VERSION_FROM'	=> 'Auth.pm', 
	'PREREQ_PM'	=> { 	Authen::ACE => 0.90,
				Crypt::CBC => 1.25,
				Crypt::Blowfish => 2.06 },
	'dist'		=> { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
);

Auth/RCS/Auth.pm,v  view on Meta::CPAN

text
@# $Id: Auth.pm,v 1.8 2002/07/30 20:31:10 Administrator Exp $

package Apache::AuthenSecurID::Auth;

use strict;
use Apache;
use Apache::Registry;
use Apache::Constants qw(:common);
use IO::Socket::INET;
use Crypt::CBC;
use vars qw($VERSION);

$VERSION = '0.4';


sub handler {

   my $r = shift;

   # seed the random number generator

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	my $message;
	my $extra_input;
	my $result;
	my %info;
	my $ace;
	my $mesg;
	my $my_rand = rand();
	my $return_rand;

	my $crypt_key = $r->dir_config("AuthCryptKey");
	my $crypt = new Crypt::CBC ( $crypt_key, "Blowfish" );
	
	$mesg = $crypt->encrypt_hex ("$my_rand:$session_id:$type:$username:$passcode"); 
	$client->send($mesg);

	$client->recv($mesg, 1024);
	$mesg = $crypt->decrypt_hex ( $mesg );


	( $return_rand, $result, $info{system_pin}, $info{min_pin_len}, $info{max_pin_len}, 
	$info{alphanumeric}, $info{user_selectable} )

Auth/RCS/Auth.pm,v  view on Meta::CPAN


 PerlModule Apache::AuthenSecurID::Auth

=head1 PREREQUISITES

For AuthenSecurID::Auth you need to enable the appropriate call-back hook 
when making mod_perl: 

  perl Makefile.PL PERL_AUTHEN=1

AuthenSecurID::Auth requires Crypt::Blowfish and Crypt::CBC.

For AuthenSecurID::Auth to properly track users mod_usertrack must be
compiled and enabled.


=head1 SEE ALSO

L<Apache>, L<mod_perl>, L<Authen::ACE> L<Apache::AuthenSecurID::Auth>

=head1 AUTHORS

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	my $pin2 = $query->param('pin2');
	my $alphanumeric = $query->param('alphanumeric');
	my $min_pin_len = $query->param('min_pin_len');
	my $max_pin_len = $query->param('max_pin_len');
d181 1
d244 1
a244 1
	my ( $username, $passcode, $type, $session_id, $client ) = @@_;	
d255 2
a256 1
	my $crypt = new Crypt::CBC ( "this is the key", "Blowfish" );
d272 3
a274 2

	($message,$extra_input) = Ace_Result ( $result, \%info );
d282 4
a285 1
	my ( $result, $info ) = @@_;
d288 8
d299 5
d321 1

Auth/RCS/Makefile.PL,v  view on Meta::CPAN

sub MY::libscan {
	my($self,$path) = @@_;
	return '' if $path =~ /RCS/;
	$path;
}

WriteMakefile(
	'NAME'		=> 'Apache::AuthenSecurID::Auth',
	'VERSION_FROM'	=> 'Auth.pm', 
	'PREREQ_PM'	=> { 	Authen::ACE => 0.90,
				Crypt::CBC => 1.25,
				Crypt::Blowfish => 2.06 },
	'dist'		=> { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
);
@

Auth/RCS/Makefile.old,v  view on Meta::CPAN

# 5.45 (Revision: 1.222) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
#	ANY CHANGES MADE HERE WILL BE LOST!
#
#   MakeMaker ARGV: ()
#
#   MakeMaker Parameters:

#	NAME => q[Apache::AuthenSecurID::Auth]
#	PREREQ_PM => { Crypt::Blowfish=>q[2.06], Crypt::CBC=>q[1.25], Authen::ACE=>q[0.9] }
#	VERSION_FROM => q[Auth.pm]
#	dist => { COMPRESS=>q[gzip -9f], SUFFIX=>q[gz] }

# --- MakeMaker post_initialize section:


# --- MakeMaker const_config section:

# These definitions are from config.sh (via /usr/local/lib/perl5/5.6.0/i686-linux/Config.pm)

Auth/RCS/Makefile.old,v  view on Meta::CPAN


test_ : test_dynamic

test_static :: test_dynamic
testdb_static :: testdb_dynamic


# --- MakeMaker ppd section:
# Creates a PPD (Perl Package Description) for a binary distribution.
ppd:
	@@$(PERL) -e "print qq{<SOFTPKG NAME=\"Apache-AuthenSecurID-Auth\" VERSION=\"0,3,0,0\">\n}. qq{\t<TITLE>Apache-AuthenSecurID-Auth</TITLE>\n}. qq{\t<ABSTRACT></ABSTRACT>\n}. qq{\t<AUTHOR></AUTHOR>\n}. qq{\t<IMPLEMENTATION>\n}. qq{\t\t<DEPENDENCY NAME...

# --- MakeMaker pm_to_blib section:

pm_to_blib: $(TO_INST_PM)
	@@$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
	"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
        -e "pm_to_blib({qw{$(PM_TO_BLIB)}},'$(INST_LIB)/auto')"
	@@$(TOUCH) $@@


AuthenSecurID.pm  view on Meta::CPAN

# $Id: AuthenSecurID.pm,v 1.6 2002/07/31 16:43:44 Administrator Exp $

package Apache::AuthenSecurID;

use strict;
use Apache ();
use Apache::Registry;
use Apache::Log;
use Apache::Constants qw(OK AUTH_REQUIRED DECLINED REDIRECT SERVER_ERROR);
use Apache::Cookie;
use Crypt::CBC;
use CGI::Carp;
use vars qw($VERSION);

$VERSION = '0.4';

sub handler {
	my $r = shift;


	# get configuration directives

AuthenSecurID.pm  view on Meta::CPAN

	my ( $session_key ) = ( ($r->header_in("Cookie") || "") =~ 
		/${auth_cookie}=([^;]+)/);
	my ( $session_user ) = ( ($r->header_in("Cookie") || "") =~ 
		/${auth_user_cookie}=([^;]+)/);


	my $username;
	my $session_time;
	
	# decrypt cookie
	my $cipher = new Crypt::CBC($crypt_key,"Blowfish") || warn ( $! );
	if ( $session_key )  {
		my $plaintext_cookie = $cipher->decrypt_hex($session_key);
		( $session_time, $username ) = split /\:/, $plaintext_cookie;
	}
	
	my $time = time();
	my $timeout = $time - 60 * $cookie_timeout;
	my $uri = $r->uri;

	# check cookie

AuthenSecurID.pm  view on Meta::CPAN


 PerlModule Apache::AuthenSecurID

=head1 PREREQUISITES

For AuthenSecurID you need to enable the appropriate call-back hook 
when making mod_perl: 

  perl Makefile.PL PERL_AUTHEN=1

AuthenSecurID requires Crypt::Blowfish and Crypt::CBC.

=head1 SEE ALSO

L<Apache>, L<mod_perl>, L<Authen::ACE> L<Apache::AuthenSecurID::Auth>

=head1 AUTHORS

=item *
mod_perl by Doug MacEachern <dougm@osf.org>

Makefile.PL  view on Meta::CPAN

sub MY::libscan {
	my($self,$path) = @_;
	return '' if $path =~ /RCS/;
	$path;
}

WriteMakefile(
	'NAME'		=> 'Apache::AuthenSecurID',
	'VERSION_FROM'	=> 'AuthenSecurID.pm', 
	'PREREQ_PM'	=> { 	Authen::ACE => 0.90,
				Crypt::CBC => 1.25,
				Config::General => 1.20,
				Crypt::Blowfish => 2.06 },
	'dist'		=> { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
);

RCS/AuthenSecurID.pm,v  view on Meta::CPAN

@# $Id: AuthenSecurID.pm,v 1.5 2002/07/30 20:15:39 Administrator Exp $

package Apache::AuthenSecurID;

use strict;
use Apache ();
use Apache::Registry;
use Apache::Log;
use Apache::Constants qw(OK AUTH_REQUIRED DECLINED REDIRECT SERVER_ERROR);
use Apache::Cookie;
use Crypt::CBC;
use CGI::Carp;
use vars qw($VERSION);

$VERSION = '0.4';

sub handler {
	my $r = shift;


	# get configuration directives

RCS/AuthenSecurID.pm,v  view on Meta::CPAN

	my ( $session_key ) = ( ($r->header_in("Cookie") || "") =~ 
		/${auth_cookie}=([^;]+)/);
	my ( $session_user ) = ( ($r->header_in("Cookie") || "") =~ 
		/${auth_user_cookie}=([^;]+)/);


	my $username;
	my $session_time;
	
	# decrypt cookie
	my $cipher = new Crypt::CBC($crypt_key,"Blowfish") || warn ( $! );
	if ( $session_key )  {
		my $plaintext_cookie = $cipher->decrypt_hex($session_key);
		( $session_time, $username ) = split /\:/, $plaintext_cookie;
	}
	
	my $time = time();
	my $timeout = $time - 60 * $cookie_timeout;
	my $uri = $r->uri;

	# check cookie

RCS/AuthenSecurID.pm,v  view on Meta::CPAN


 PerlModule Apache::AuthenSecurID

=head1 PREREQUISITES

For AuthenSecurID you need to enable the appropriate call-back hook 
when making mod_perl: 

  perl Makefile.PL PERL_AUTHEN=1

AuthenSecurID requires Crypt::Blowfish and Crypt::CBC.

=head1 SEE ALSO

L<Apache>, L<mod_perl>, L<Authen::ACE> L<Apache::AuthenSecurID::Auth>

=head1 AUTHORS

=item *
mod_perl by Doug MacEachern <dougm@@osf.org>

RCS/Makefile.PL,v  view on Meta::CPAN

sub MY::libscan {
	my($self,$path) = @@_;
	return '' if $path =~ /RCS/;
	$path;
}

WriteMakefile(
	'NAME'		=> 'Apache::AuthenSecurID',
	'VERSION_FROM'	=> 'AuthenSecurID.pm', 
	'PREREQ_PM'	=> { 	Authen::ACE => 0.90,
				Crypt::CBC => 1.25,
				Config::General => 1.20,
				Crypt::Blowfish => 2.06 },
	'dist'		=> { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
);
@


1.1
log
@Initial revision

RCS/Makefile.old,v  view on Meta::CPAN

# 5.45 (Revision: 1.222) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
#	ANY CHANGES MADE HERE WILL BE LOST!
#
#   MakeMaker ARGV: ()
#
#   MakeMaker Parameters:

#	NAME => q[Apache::AuthenSecurID]
#	PREREQ_PM => { Crypt::Blowfish=>q[2.06], Crypt::CBC=>q[1.25], Authen::ACE=>q[0.9] }
#	VERSION_FROM => q[AuthenSecurID.pm]
#	dist => { COMPRESS=>q[gzip -9f], SUFFIX=>q[gz] }

# --- MakeMaker post_initialize section:


# --- MakeMaker const_config section:

# These definitions are from config.sh (via /usr/local/lib/perl5/5.6.0/i686-linux/Config.pm)

RCS/Makefile.old,v  view on Meta::CPAN


test_ : test_dynamic

test_static :: test_dynamic
testdb_static :: testdb_dynamic


# --- MakeMaker ppd section:
# Creates a PPD (Perl Package Description) for a binary distribution.
ppd:
	@@$(PERL) -e "print qq{<SOFTPKG NAME=\"Apache-AuthenSecurID\" VERSION=\"0,4,0,0\">\n}. qq{\t<TITLE>Apache-AuthenSecurID</TITLE>\n}. qq{\t<ABSTRACT></ABSTRACT>\n}. qq{\t<AUTHOR></AUTHOR>\n}. qq{\t<IMPLEMENTATION>\n}. qq{\t\t<DEPENDENCY NAME=\"Authen-...

# --- MakeMaker pm_to_blib section:

pm_to_blib: $(TO_INST_PM)
	@@$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
	"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
        -e "pm_to_blib({qw{$(PM_TO_BLIB)}},'$(INST_LIB)/auto')"
	@@$(TOUCH) $@@


RCS/README,v  view on Meta::CPAN



1.4
log
@*** empty log message ***
@
text
@# $Id: README,v 1.3 2002/07/30 20:15:39 Administrator Exp $

In order to install and use this package you will need Perl version
5.004 or better, mod_perl Crypt::CBC, Crypt::Blowfish and Authen::ACE. 
Installation as usual:

   perl Makefile.PL
   make
   make test
   make install

There are three components to Apache::AuthenSecurID.

Apache::AuthenSecurID

RCS/README,v  view on Meta::CPAN


        PerlModule Apache::AuthenSecurID


PREREQUISITES
       For AuthenSecurID you need to enable the appropriate call-
       back hook when making mod_perl:

         perl Makefile.PL PERL_AUTHEN=1

       AuthenSecurID requires Crypt::Blowfish and Crypt::CBC.

SEE ALSO
       the Apache manpage, the mod_perl manpage, the Authen::ACE
       manpage the Apache::AuthenSecurID::Auth manpage

AUTHORS
       o mod_perl by Doug MacEachern <dougm@@osf.org>

       o Authen::ACE by Dave Carrigan
       <Dave.Carrigan@@iplenergy.com>

RCS/README,v  view on Meta::CPAN

        PerlModule Apache::AuthenSecurID::Auth


PREREQUISITES
       For AuthenSecurID::Auth you need to enable the appropriate
       call-back hook when making mod_perl:

         perl Makefile.PL PERL_AUTHEN=1

       AuthenSecurID::Auth requires Crypt::Blowfish and
       Crypt::CBC.

       For AuthenSecurID::Auth to properly track users
       mod_usertrack must be compiled and enabled.

SEE ALSO
       the Apache manpage, the mod_perl manpage, the Authen::ACE
       manpage the Apache::AuthenSecurID::Auth manpage

AUTHORS
       o mod_perl by Doug MacEachern <dougm@@osf.org>

RCS/README,v  view on Meta::CPAN


CONFIGURATION
       Either run from the command line;

       prompt$ nohup ./ace_initd &

       or write the appropriate scripts in the /etc/rc
       directories.

PREREQUISITES
       ace_initd requires Crypt::Blowfish, Crypt::CBC and
       Authen::ACE.


SEE ALSO
       the Authen::ACE manpage the Apache::AuthenSecurID manpage
       the Apache::AuthenSecurID::Auth manpage

AUTHORS
       o mod_perl by Doug MacEachern <dougm@@osf.org>

RCS/ace_initd,v  view on Meta::CPAN

@docs
@
text
@#!/usr/local/bin/perl

# $Id: ace_initd,v 1.3 2001/06/19 17:15:33 root Exp root $

use Authen::ACE;
use IO::Socket::INET;
use Sys::Syslog;
use Crypt::CBC;
use Config::General;

my $conf = new Config::General("/etc/ace_initd.conf");
my %config = $conf->getall;

$ENV{'VAR_ACE'} = $config{'VAR_ACE'};

my $port = $config{'port'} || 1969;
my $syslog = $config{'syslog'} || "local2";
my $secret = $config{'AuthCryptKey'} || "secret";

my $crypt = new Crypt::CBC ( $secret, "Blowfish" );

my $server = IO::Socket::INET->new (	LocalPort	=>	$port,
                                        Proto		=>	'udp' )
    or die "Couldn't be a tcp server on port $port: $!\n";


openlog ( 'ace_initd', 'nowait', $syslog );

my %ACE;
my $mesg;

RCS/ace_initd,v  view on Meta::CPAN


Either run from the command line;

prompt$ nohup ./ace_initd &

or write the appropriate scripts in the /etc/rc directories.

=head1 PREREQUISITES


ace_initd requires Crypt::Blowfish, Crypt::CBC and Authen::ACE.


=head1 SEE ALSO

L<Authen::ACE> L<Apache::AuthenSecurID> L<Apache::AuthenSecurID::Auth>

=head1 AUTHORS

=item *
mod_perl by Doug MacEachern <dougm@@osf.org>

RCS/ace_initd,v  view on Meta::CPAN

text
@d7 1
d9 2
a10 1
$ENV{'VAR_ACE'} = "/opt/ace/data";
d12 1
a12 1
$SIG{CHLD} = 'IGNORE';
d14 3
a16 1
my $crypt = new Crypt::CBC ( "this is the key", "Blowfish" );
d18 1
d20 1
a20 1
my $server = IO::Socket::INET->new (	LocalPort	=>	1969,
d25 1
a25 1
openlog ( 'ace_initd', '', 'LOG_LOCAL_2' );
d66 1
a66 1
		$mesg = "$rand:$results:::::";

README  view on Meta::CPAN

# $Id: README,v 1.4 2002/07/31 16:43:55 Administrator Exp $

In order to install and use this package you will need Perl version
5.004 or better, mod_perl Crypt::CBC, Crypt::Blowfish and Authen::ACE. 
Installation as usual:

   perl Makefile.PL
   make
   make test
   make install

There are three components to Apache::AuthenSecurID.

Apache::AuthenSecurID

README  view on Meta::CPAN


        PerlModule Apache::AuthenSecurID


PREREQUISITES
       For AuthenSecurID you need to enable the appropriate call-
       back hook when making mod_perl:

         perl Makefile.PL PERL_AUTHEN=1

       AuthenSecurID requires Crypt::Blowfish and Crypt::CBC.

SEE ALSO
       the Apache manpage, the mod_perl manpage, the Authen::ACE
       manpage the Apache::AuthenSecurID::Auth manpage

AUTHORS
       o mod_perl by Doug MacEachern <dougm@osf.org>

       o Authen::ACE by Dave Carrigan
       <Dave.Carrigan@iplenergy.com>

README  view on Meta::CPAN

        PerlModule Apache::AuthenSecurID::Auth


PREREQUISITES
       For AuthenSecurID::Auth you need to enable the appropriate
       call-back hook when making mod_perl:

         perl Makefile.PL PERL_AUTHEN=1

       AuthenSecurID::Auth requires Crypt::Blowfish and
       Crypt::CBC.

       For AuthenSecurID::Auth to properly track users
       mod_usertrack must be compiled and enabled.

SEE ALSO
       the Apache manpage, the mod_perl manpage, the Authen::ACE
       manpage the Apache::AuthenSecurID::Auth manpage

AUTHORS
       o mod_perl by Doug MacEachern <dougm@osf.org>

README  view on Meta::CPAN


CONFIGURATION
       Either run from the command line;

       prompt$ nohup ./ace_initd &

       or write the appropriate scripts in the /etc/rc
       directories.

PREREQUISITES
       ace_initd requires Crypt::Blowfish, Crypt::CBC and
       Authen::ACE.


SEE ALSO
       the Authen::ACE manpage the Apache::AuthenSecurID manpage
       the Apache::AuthenSecurID::Auth manpage

AUTHORS
       o mod_perl by Doug MacEachern <dougm@osf.org>

ace_initd  view on Meta::CPAN

#!/usr/local/bin/perl

# $Id: ace_initd,v 1.4 2001/06/22 19:08:46 root Exp $

use Authen::ACE;
use IO::Socket::INET;
use Sys::Syslog;
use Crypt::CBC;
use Config::General;

my $conf = new Config::General("/etc/ace_initd.conf");
my %config = $conf->getall;

$ENV{'VAR_ACE'} = $config{'VAR_ACE'};

my $port = $config{'port'} || 1969;
my $syslog = $config{'syslog'} || "local2";
my $secret = $config{'AuthCryptKey'} || "secret";

my $crypt = new Crypt::CBC ( $secret, "Blowfish" );

my $server = IO::Socket::INET->new (	LocalPort	=>	$port,
                                        Proto		=>	'udp' )
    or die "Couldn't be a tcp server on port $port: $!\n";


openlog ( 'ace_initd', 'nowait', $syslog );

my %ACE;
my $mesg;

ace_initd  view on Meta::CPAN


Either run from the command line;

prompt$ nohup ./ace_initd &

or write the appropriate scripts in the /etc/rc directories.

=head1 PREREQUISITES


ace_initd requires Crypt::Blowfish, Crypt::CBC and Authen::ACE.


=head1 SEE ALSO

L<Authen::ACE> L<Apache::AuthenSecurID> L<Apache::AuthenSecurID::Auth>

=head1 AUTHORS

=item *
mod_perl by Doug MacEachern <dougm@osf.org>



( run in 0.928 second using v1.01-cache-2.11-cpan-df04353d9ac )