1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<!-- metadata -->
<meta name="generator" content="Offline" />
<meta name="version" content="Offline 0.1" />
<!-- style sheet links -->
<link rel="stylesheet" media="all" type="text/css" href="../../../css/all.css" />
<link rel="stylesheet" media="screen" type="text/css" href="../../../css/screen.css" />
<link rel="stylesheet" media="print" type="text/css" href="../../../css/print.css" />
</head>
<body>
<div class="dokuwiki export">
<h1><a name="databases" id="databases">Databases</a></h1>
<div class="level1">
<table class="inline">
<tr class="row0 roweven">
<th class="col0">Authentication </th><th class="col1"> Users </th><th class="col2"> Password </th>
</tr>
<tr class="row1 rowodd">
<td class="col0 centeralign"> ✔ </td><td class="col1 centeralign"> ✔ </td><td class="col2 centeralign"> ✔ </td>
</tr>
</table>
</div>
<!-- SECTION "Databases" [1-89] -->
<h2><a name="presentation" id="presentation">Presentation</a></h2>
<div class="level2">
</div>
<!-- SECTION "Presentation" [90-115] -->
<h3><a name="drivers" id="drivers">Drivers</a></h3>
<div class="level3">
<p>
<acronym title="LemonLDAP::NG">LL::NG</acronym> can use a lot of databases as authentication, users and password backend:
</p>
<ul>
<li class="level1"><div class="li"> MySQL</div>
</li>
<li class="level1"><div class="li"> PostGreSQL</div>
</li>
<li class="level1"><div class="li"> Oracle</div>
</li>
<li class="level1"><div class="li"> …</div>
</li>
</ul>
<p>
Indeed, any <a href="http://search.cpan.org/search?query=DBD%3A%3A&mode=module" class="urlextern" title="http://search.cpan.org/search?query=DBD%3A%3A&mode=module" rel="nofollow">Perl DBD driver</a> can be used.
</p>
</div>
<!-- SECTION "Drivers" [116-364] -->
<h3><a name="schema" id="schema">Schema</a></h3>
<div class="level3">
<p>
<acronym title="LemonLDAP::NG">LL::NG</acronym> can use two tables:
</p>
<ul>
<li class="level1"><div class="li"> Authentication table: where login and password are stored</div>
</li>
<li class="level1"><div class="li"> User table: where user data are stored (mail, name, etc.)</div>
</li>
</ul>
<p>
<p><div class="notetip">Authentication table and user table can be the same.
</div></p>
</p>
<p>
The password can be in plain text, or encoded with a standard <acronym title="Structured Query Language">SQL</acronym> method:
</p>
<ul>
<li class="level1"><div class="li"> SHA</div>
</li>
<li class="level1"><div class="li"> SHA1</div>
</li>
<li class="level1"><div class="li"> MD5</div>
</li>
</ul>
</div>
<h4><a name="example_1two_tables" id="example_1two_tables">Example 1: two tables</a></h4>
<div class="level4">
</div>
<h5><a name="authentication_table" id="authentication_table">Authentication table</a></h5>
<div class="level5">
<table class="inline">
<tr class="row0 roweven">
<th class="col0"> id </th><th class="col1"> login </th><th class="col2"> password </th>
</tr>
<tr class="row1 rowodd">
<td class="col0"> 0 </td><td class="col1"> coudot </td><td class="col2"> 1f777a6581e478499f4284e54fe2d4a4e513dfff </td>
</tr>
<tr class="row2 roweven">
<td class="col0"> 1 </td><td class="col1"> xguimard </td><td class="col2"> a15a18c8bb17e6f67886a9af1898c018b9f5a072 </td>
</tr>
<tr class="row3 rowodd">
<td class="col0"> 2 </td><td class="col1"> tchemineau </td><td class="col2"> 1f777a6581e478499f4284e54fe2d4a4e513dfff </td>
</tr>
</table>
</div>
<h5><a name="user_table" id="user_table">User table</a></h5>
<div class="level5">
<table class="inline">
<tr class="row0 roweven">
<th class="col0"> id </th><th class="col1"> user </th><th class="col2"> name </th><th class="col3"> mail </th>
</tr>
<tr class="row1 rowodd">
<td class="col0"> 0 </td><td class="col1"> coudot </td><td class="col2"> Clément OUDOT </td><td class="col3"> coudot@example.com </td>
</tr>
<tr class="row2 roweven">
<td class="col0"> 1 </td><td class="col1"> tchemineau </td><td class="col2"> Thomas CHEMINEAU </td><td class="col3"> tchemineau@example.com </td>
</tr>
<tr class="row3 rowodd">
<td class="col0"> 2 </td><td class="col1"> xguimard </td><td class="col2"> Xavier GUIMARD </td><td class="col3"> xguimard@example.com </td>
</tr>
</table>
</div>
<h4><a name="example_2single_table" id="example_2single_table">Example 2: single table</a></h4>
<div class="level4">
<table class="inline">
<tr class="row0 roweven">
<th class="col0"> id </th><th class="col1"> user </th><th class="col2"> password </th><th class="col3"> name </th><th class="col4"> mail </th>
</tr>
<tr class="row1 rowodd">
<td class="col0"> 0 </td><td class="col1"> coudot </td><td class="col2"> 1f777a6581e478499f4284e54fe2d4a4e513dfff </td><td class="col3"> Clément OUDOT </td><td class="col4"> coudot@example.com </td>
</tr>
<tr class="row2 roweven">
<td class="col0"> 1 </td><td class="col1"> tchemineau </td><td class="col2"> 1f777a6581e478499f4284e54fe2d4a4e513dfff </td><td class="col3"> Thomas CHEMINEAU </td><td class="col4"> tchemineau@example.com </td>
</tr>
<tr class="row3 rowodd">
<td class="col0"> 2 </td><td class="col1"> xguimard </td><td class="col2"> a15a18c8bb17e6f67886a9af1898c018b9f5a072 </td><td class="col3"> Xavier GUIMARD </td><td class="col4"> xguimard@example.com </td>
</tr>
</table>
</div>
<!-- SECTION "Schema" [365-1566] -->
<h3><a name="sql" id="sql">SQL</a></h3>
<div class="level3">
<p>
<acronym title="LemonLDAP::NG">LL::NG</acronym> will operate some <acronym title="Structured Query Language">SQL</acronym> queries:
</p>
<ul>
<li class="level1"><div class="li"> Authentication: select row in authentication table matching user and password</div>
</li>
<li class="level1"><div class="li"> Search user: select row in user table matching user</div>
</li>
<li class="level1"><div class="li"> Change password: update password column in authentication table matching user</div>
</li>
</ul>
</div>
<!-- SECTION "SQL" [1567-1840] -->
<h2><a name="configuration" id="configuration">Configuration</a></h2>
<div class="level2">
<p>
In Manager, go in <code>General Parameters</code> > <code>Authentication modules</code> and choose Database (<acronym title="Database Interface">DBI</acronym>) for authentication, users and/or password modules.
</p>
</div>
<!-- SECTION "Configuration" [1841-2015] -->
<h3><a name="authentication_level" id="authentication_level">Authentication level</a></h3>
<div class="level3">
<p>
The authentication level given to users authenticated with this module.
</p>
<p>
<p><div class="noteimportant">
As <acronym title="Database Interface">DBI</acronym> is a login/password based module, the authentication level can be:
</p>
<ul>
<li class="level1"><div class="li"> increased (+1) if portal is protected by <acronym title="Secure Sockets Layer">SSL</acronym> (HTTPS)</div>
</li>
<li class="level1"><div class="li"> decreased (-1) if the portal autocompletion is allowed (see <a href="../../documentation/1.3/portalcustom.html" class="wikilink1" title="documentation:1.3:portalcustom">portal customization</a>)</div>
</li>
</ul>
<p>
</div></p>
</p>
</div>
<!-- SECTION "Authentication level" [2016-2380] -->
<h3><a name="connection" id="connection">Connection</a></h3>
<div class="level3">
<p>
<p><div class="notetip">Connection settings can be configured differently for authentication process and user process. This allows to use different databases for these process. By default, if user process connection settings are empty, authentication process connection settings will be used.
</div></p>
</p>
<ul>
<li class="level1"><div class="li"> <strong>Chain</strong>: <acronym title="Database Interface">DBI</acronym> chain, including database driver name and database name (for example: dbi:mysql:database=lemonldapng;host=localhost).</div>
</li>
<li class="level1"><div class="li"> <strong>User</strong>: Connection user</div>
</li>
<li class="level1"><div class="li"> <strong>Password</strong>: Connection password</div>
</li>
</ul>
</div>
<!-- SECTION "Connection" [2381-2895] -->
<h3><a name="schema1" id="schema1">Schema</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> <strong>Authentication table</strong>: authentication table name</div>
</li>
<li class="level1"><div class="li"> <strong>User table</strong>: user table name</div>
</li>
<li class="level1"><div class="li"> <strong>Login field name</strong>: name of authentication table column hosting login</div>
</li>
<li class="level1"><div class="li"> <strong>Password field name</strong>: name of authentication table column hosting password</div>
</li>
<li class="level1"><div class="li"> <strong>Mail field name</strong>: name of authentication table column hosting mail (for password reset)</div>
</li>
<li class="level1"><div class="li"> <strong>Login field name in user table</strong>: name of user table column hosting login</div>
</li>
</ul>
</div>
<!-- SECTION "Schema" [2896-3339] -->
<h3><a name="password" id="password">Password</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> <strong>Hash schema</strong>: <acronym title="Structured Query Language">SQL</acronym> method for hashing password. Can be left blank for plain text passwords.</div>
</li>
</ul>
</div>
<!-- SECTION "Password" [3340-] --></div><!-- closes <div class="dokuwiki export">-->
|