Xmpp/Jabberd Ldap Authentication

From Debuntu

Jump to: navigation, search
WorkInProgress.png
Work in Progress
This page is a work in progress and might contain errors or inconsistency. Comment are most appreciated.

Get both Jabber::Connection from CPAN and xdb_auth_cpile.

Contents

Setting jabber.xml

In /etc/jabber/jabber.xml, add:

<ns/>

to the <xdb id="xdb"> section.

Then, just below, add:

  <xdb id="xdb_auth_cpile">
    <host/>
    <ns>jabber:iq:auth</ns>
    <accept>
      <ip>127.0.0.1</ip>
      <port>5999</port>
      <secret>testing</secret>
    </accept>
  </xdb>

Mind that you might want to change the port number and secret.

Disable digest authentication so the xdb_cauth_pile get plain password passed to it. Mind that this should be only used internally, you dont want password to go on your network plain, do you?:

      <!--<mod_auth_digest>./jsm/jsm.so</mod_auth_digest>-->

xdb_auth_cpile

Setting xdb_auth_cpile

Then, create a file /etc/jabber/xdb_auth_cpile.xml containing the configuration for xdb_auth_cpile.pl:

<config>
  <script>
    <logfile>./xdb_auth.log</logfile>
    <pidfile>./xdb_auth.pid</pidfile>
    <!-- debug can be "1" or "0" (on/off) -->
    <debug>0</debug>
  </script>
  <connection>
    <!-- make sure these values match those in your jabber.xml config -->
    <id>xdb_auth_cpile</id>
    <ip>127.0.0.1</ip>
    <port>5999</port>
    <secret>testing</secret>
  </connection>
</config>

This file has to use the same host, port and secret value as define in jabber.xml.

Optionally, test your LDAP connection settings with: media:test_xdb_auth_cpile.pl.txt.
use lib qw(/etc/jabber/);
...
my $configdir = "/etc/jabber/";

Installing Jabber::Connection

Make sure that perl's LDAP and optionally SSL libraries are installed:

# apt-get install libnet-ldap-perl libio-socket-ssl-perl

then install Jabber::Connection

From CPAN

Install the CPAN module by using this command:

# perl -MCPAN -e 'install Jabber::Connection'

From source

Note.png
Jabber::Connection 0.04
I had a hard time to find it on the internet, the CPAN module was 0.03... so here you go, media:Jabber-Connection-0.04.tar.gz

If you are installing Jabber::Connection from the .tar.gz, you need to proceed as follow:

tar -xzvf Jabber-Connection-0.04.tar.gz
cd Jabber-Connection-0.04
perl Makefile.PL
make
make test
make install

Using it

Finally, to use it, start up jabber and run:

Reference

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense