Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Perl module: Class::User::DBI - A User class providing login authentication credentials, and role-based access control (RBAC).
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib/Class/User
scripts
t
.gitignore
Changes
MANIFEST
MANIFEST.SKIP
META.json
META.yml
Makefile.PL
README

README

Class-User-DBI

A User class: Login credentials and roles.

Through a DBIx::Connector object, this module models a "User" class, with
login credentials, and access roles.  Login credentials include a passphrase,
and optionally per user IP whitelisting.

The module is designed to simplify user logins, and basic administrative user
maintenance.  Passphrases are salted with a 512 bit random salt (unique per
user) using a cryptographically strong random number generator, and converted
to a SHA2-512 digest before being stored in the database.  All subsequent
passphrase validation checks test against the salt and passphrase SHA2 hash.

IP whitelists may be maintained per user.  If a user is set to require an IP
check, then the user validates only if his passphrase authenticates AND his
IP is found in the whitelist associated with his user id.

Users may be given a role, roles may have privileges.  Users may have multiple
"domains" (localities).  See the POD for the full documentation, and
examples/ for an example script.
scripts/  contains a helpful database configuration script.

DEPENDENCIES

This module requires List::MoreUtils, DBIx::Connector, and 
Authen::Passphrase::SaltedSHA512.

It also requires a database back-end.  The test suite will use DBD::SQLite,
but it has also been tested with DBD::mysql.  None of these dependencies could
be considered light-weight.  The dependency chain of this module is
indicative of the difficulty in assuring cryptographically strong random
salt generation, reliable SHA2-512 hashing of passphrases, fork-safe database
connectivity, and transactional commits for inserts and updates spanning
multiple tables. 

CONFIGURATION

The database needs seven tables.  They can be automatically generated by running
the configuration script provided in the scripts/ directory.

Please read the module's POD for a more thorough explanation and tips on 
configuring the database.

INSTALLATION

To install this module, run the following commands:

	perl Makefile.PL
	make
	make test
	make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Class::User::DBI

You can also look for information at:

    RT, CPAN's request tracker (report bugs here)
        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Class-User-DBI

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Class-User-DBI

    CPAN Ratings
        http://cpanratings.perl.org/d/Class-User-DBI

    Search CPAN
        http://search.cpan.org/dist/Class-User-DBI/


LICENSE AND COPYRIGHT

Copyright (C) 2012 David Oswald

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.
Something went wrong with that request. Please try again.