Skip to content

Commit

Permalink
DIST VERSION 0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
russoz committed Oct 31, 2010
1 parent b03b9b9 commit 496d3f6
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 12 deletions.
16 changes: 16 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
Revision history for Net-LDAP-SimpleServer

0.0.7 31.10.2010 Net::LDAP::SimpleServer DIST VERSION 0.0.7
======= ======================================================================
b03b9b9 tidying all *.pm and *.t files
6823852 Docs and glitches in SimpleServer.pm
48e3cd5 supressed unitialized values warning
70fa566 Added the ProtocolHandler class and its first test
d3405b2 Improved legibility and rewrote _open_ldif()
f427cc9 Added the ProtocolHandler class and its first test
ae3a4ad Proper documentation for ProtocolHandler
284d4d0 Merge branch 'master' of https://github.com/russoz/Net-LDAP-SimpleServer
9489d1a Started working on the Net::Server functions
ef87fb3 Removed dependency on the Net::LDAP::Server 1-param constructor
47ab728 updated dependency list
143c304 improved perlcritic.t
e6033ed added dependencies documentation

0.0.6 14.10.2010 Net::LDAP::SimpleServer DIST VERSION 0.0.6
======= ======================================================================
b9c1872 Requires Net::LDAP, duh
Expand Down
73 changes: 62 additions & 11 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ NAME
Net::LDAP::SimpleServer - Minimal-configuration, read-only LDAP server

VERSION
This document describes Net::LDAP::SimpleServer version 0.0.6
This document describes Net::LDAP::SimpleServer version 0.0.7

SYNOPSIS
WORK IN PROGRESS!! NOT READY TO USE YET!!

package MyServer;

use Net::LDAP::SimpleServer;

# Or, specifying a Net::Server personality
use Net::LDAP::SimpleServer 'PreFork';

# using default configuration file
my $server = Net::LDAP::SimpleServer->new();

# passing a specific configuration file
my $server = Net::LDAP::SimpleServer->new( 'ldapconfig.conf' );
my $server = Net::LDAP::SimpleServer->new({
conf_file => '/etc/ldapconfig.conf'
});

# passing configurations in a hash
my $server = Net::LDAP::SimpleServer->new({
Expand All @@ -27,35 +36,69 @@ SYNOPSIS
${HOME}/.ldapsimpleserver.conf

DESCRIPTION
WORK IN PROGRESS!! NOT READY TO USE YET!!

As the name suggests, this module aims to implement a simple LDAP
server, using many components already available in CPAN. It can be used
for prototyping and/or development purposes. This is NOT intended to be
a production-grade server, altough some brave souls in small offices
might use it as such.

As of October 2010, the server will simply load a LDIF file and serve
As of November 2010, the server will simply load a LDIF file and serve
its contents through the LDAP protocol. Many operations are NOT
available yet, notably writing into the directory tree, but we would
like to implement that in a near future.

CONSTRUCTOR
The constructors will follow the rules defined by Net::Server, but most
notably we have the two forms below:

new()
Attempts to create a server by using the default configuration file,
"${HOME}/.ldapsimpleserver.conf".

new( FILE )
Attempts to create a server using the specified configuration file.

new( HASHREF )
Attempts to create a server by using the options specified in a hash
reference rather than reading them from a configuration file.

METHODS
refresh_config()
If the server was constructed using a configuration file, this
method will attempt to reload the options from that file.
options()
As specified in Net::Server, this method creates new options for
the, server, namely:

data - the LDIF data file used by LDIFStore

root_dn - the administrator DN of the repository

root_pw - the password for root_dn

default_values()
As specified in Net::Server, this method provides default values for
a number of options. In Net::LDAP::SimpleServer, this method is
defined as:

sub default_values {
return {
host => '*',
port => 389,
proto => 'tcp',
root_id => 'cn=root',
root_pw => 'ldappw',
syslog_ident => 'Net::LDAP::SimpleServer-'
. $Net::LDAP::SimpleServer::VERSION,
conf_file => DEFAULT_CONFIG_FILE,
};
}

Notice that we do set a default password for the "cn=root" DN. This
allows for out-of-the-box testing, but make sure you change the
password when putting this to production use.

post_configure_hook()
Method specified by Net::Server to validate the passed options

process_request()
Method specified by Net::Server to actually handle one connection.
In this module it basically delegates the processing to
Net::LDAP::SimpleServer::ProtocolHandler.

DIAGNOSTICS
"Error message here, perhaps with %s placeholders"
Expand All @@ -82,6 +125,14 @@ CONFIGURATION AND ENVIRONMENT
#user_pw_attr password

DEPENDENCIES
Net::LDAP

Net::LDAP::Server

Net::Server

UNIVERSAL::isa

Carp

File::HomeDir
Expand Down
2 changes: 1 addition & 1 deletion lib/Net/LDAP/SimpleServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Method specified by L<Net::Server> to validate the passed options
=item process_request()
Method specified by L<Net::Server> to actually handle one connection. In this
module it basically delegates the processing to
module it basically delegates the processing to
L<Net::LDAP::SimpleServer::ProtocolHandler>.
=back
Expand Down

0 comments on commit 496d3f6

Please sign in to comment.