| 1 |
phpLDAPadmin |
| 2 |
============ |
| 3 |
|
| 4 |
|image0| |
| 5 |
|
| 6 |
Presentation |
| 7 |
------------ |
| 8 |
|
| 9 |
`phpLDAPadmin <http://phpldapadmin.sourceforge.net>`__ is an LDAP |
| 10 |
administration tool written in PHP. |
| 11 |
|
| 12 |
phpLDAPadmin will connect to the directory with a static DN and |
| 13 |
password, and so will not request authentication anymore. The access to |
| 14 |
phpLDAPadmin will be protected by LemonLDAP::NG with specific access |
| 15 |
rules. |
| 16 |
|
| 17 |
|
| 18 |
.. danger:: |
| 19 |
|
| 20 |
phpLDAPadmin will have no idea of the user connected to |
| 21 |
the WebSSO. So a simple user can have admin rights on the LDAP directory |
| 22 |
if your access rules are too lazy. |
| 23 |
|
| 24 |
Configuration |
| 25 |
------------- |
| 26 |
|
| 27 |
phpLDAPadmin local configuration |
| 28 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 29 |
|
| 30 |
Just set the authentication type to ``config`` and indicate DN and |
| 31 |
password inside the file ``config.php``: |
| 32 |
|
| 33 |
.. code-block:: php |
| 34 |
|
| 35 |
$servers->SetValue('login','auth_type','config'); |
| 36 |
$servers->SetValue('login','bind_id','cn=Manager,dc=example,dc=com'); |
| 37 |
$servers->SetValue('login','bind_pass','secret'); |
| 38 |
|
| 39 |
phpLDAPadmin virtual host |
| 40 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 41 |
|
| 42 |
Configure phpLDAPadmin virtual host like other |
| 43 |
:doc:`protected virtual host<../configvhost>`. |
| 44 |
|
| 45 |
- For Apache: |
| 46 |
|
| 47 |
.. code-block:: apache |
| 48 |
|
| 49 |
<VirtualHost *:80> |
| 50 |
ServerName phpldapadmin.example.com |
| 51 |
|
| 52 |
PerlHeaderParserHandler Lemonldap::NG::Handler |
| 53 |
|
| 54 |
... |
| 55 |
|
| 56 |
</VirtualHost> |
| 57 |
|
| 58 |
- For Nginx: |
| 59 |
|
| 60 |
.. code-block:: nginx |
| 61 |
|
| 62 |
server { |
| 63 |
listen 80; |
| 64 |
server_name phpldapadmin.example.com; |
| 65 |
root /path/to/application; |
| 66 |
# Internal authentication request |
| 67 |
location = /lmauth { |
| 68 |
internal; |
| 69 |
include /etc/nginx/fastcgi_params; |
| 70 |
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock; |
| 71 |
# Drop post data |
| 72 |
fastcgi_pass_request_body off; |
| 73 |
fastcgi_param CONTENT_LENGTH ""; |
| 74 |
# Prevent attacks on older Nginx versions (<1.29.5) |
| 75 |
fastcgi_param HTTP_HOST $host; |
| 76 |
# Keep original request (LL::NG server will receive /lmauth) |
| 77 |
fastcgi_param X_ORIGINAL_URI $original_uri; |
| 78 |
} |
| 79 |
|
| 80 |
# Client requests |
| 81 |
location / { |
| 82 |
auth_request /lmauth; |
| 83 |
set $original_uri $uri$is_args$args; |
| 84 |
auth_request_set $lmremote_user $upstream_http_lm_remote_user; |
| 85 |
auth_request_set $lmlocation $upstream_http_location; |
| 86 |
error_page 401 $lmlocation; |
| 87 |
try_files $uri $uri/ =404; |
| 88 |
|
| 89 |
... |
| 90 |
|
| 91 |
include /etc/lemonldap-ng/nginx-lua-headers.conf; |
| 92 |
} |
| 93 |
location / { |
| 94 |
try_files $uri $uri/ =404; |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
phpLDAPadmin virtual host in Manager |
| 99 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 100 |
|
| 101 |
Go to the Manager and :doc:`create a new virtual host<../configvhost>` |
| 102 |
for phpLDAPadmin. |
| 103 |
|
| 104 |
Just configure the :ref:`access rules<rules>`. |
| 105 |
|
| 106 |
No :ref:`headers<headers>` are required. |
| 107 |
|
| 108 |
.. |image0| image:: /applications/phpldapadmin_logo.png |
| 109 |
:class: align-center |
| 110 |
|