[SR-Dev] git:janakj/ldap: - a set of minimalistic config files for testing purposes

Jan Janak jan at iptel.org
Fri Feb 13 00:57:04 CET 2009


Module: sip-router
Branch: janakj/ldap
Commit: f34750c8a38eaa9418e96a335db756d811aee7a1
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f34750c8a38eaa9418e96a335db756d811aee7a1

Author: Jan Janak <jan at iptel.org>
Committer: Jan Janak <jan at iptel.org>
Date:   Thu Jun 26 15:43:26 2008 +0000

- a set of minimalistic config files for testing purposes

---

 modules/db_ldap/ser-ldap.cfg |   51 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/modules/db_ldap/ser-ldap.cfg b/modules/db_ldap/ser-ldap.cfg
new file mode 100644
index 0000000..d09c101
--- /dev/null
+++ b/modules/db_ldap/ser-ldap.cfg
@@ -0,0 +1,51 @@
+#
+# A minimalistic configuration file for SER which can be
+# used to test the ldap module.
+#
+debug=4         # debug level (cmd line: -dddddddddd)
+fork=no
+log_stderror=yes
+
+children=1
+
+loadpath   "./modules"
+
+loadmodule "ldap"
+loadmodule "auth"
+loadmodule "sl"
+loadmodule "textops"
+loadmodule "auth_db"
+loadmodule "xlog"
+loadmodule "domain"
+
+modparam("auth_db|domain", "db_url", "ldap://127.0.0.1")
+
+modparam("ldap", "config", "ldap.cfg")
+
+# -- auth params --
+modparam("auth_db", "calculate_ha1", yes)
+modparam("auth_db", "plain_password_column", "password")
+
+
+modparam("domain", "db_mode", 1)
+
+route {
+
+       # we want only authenticated users to be registered
+        if (!www_authenticate("iptel.org", "credentials")) {
+            if ($? == -2) {
+                sl_reply("500", "Internal Server Error");
+            } else if ($? == -3) {
+                sl_reply("400", "Bad Request");
+            } else {
+                if ($digest_challenge) {
+                    append_to_reply("%$digest_challenge");
+                }
+                sl_reply("401", "Unauthorized");
+            }
+            drop;
+        }
+	sl_reply("200", "OK");
+	break;
+}
+




More information about the sr-dev mailing list