An open API service indexing awesome lists of open source software.

https://github.com/larsks/so-example-1109463


https://github.com/larsks/so-example-1109463

example stackoverflow

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Apache HTTPD and LDAP Authn/Authz

This repository accompanies my answer to .

If you `docker-compose up` this environment, you'll get three Apache instances:

- On port 8081, using `httpd/mod_ldap.conf.v1`

This is the original configuration and does not work.

- On port 8082, using `httpd/mod_ldap.conf.v2`

This replaces `Require ldap-user` with `Require user` and works.

- On port 8083, using `httpd/mod_ldap.conf.v3`

This does not use a provider alias and works.

To test these services, try to access the `/auth/` path with username `user1` and password `secret1`:

```
$ curl -u user1:secret http://localhost:8082/auth/


LDAP Auth Example


# LDAP Auth Example

Congratulations, you have successfully authenticated.

```

You can see the configuration for a specific server at the `/config` path:

```
$ curl http://localhost:8082/config
#
# - Using a provider alias
# - Uses "Require user" instead of "Require ldap-user"

AuthLDAPURL ldap://ldap/ou=users,dc=example,dc=com?cn
AuthLDAPBindDN uid=authreader,ou=system,dc=example,dc=com
AuthLDAPBindPassword secret

AuthName "LDAP"
AuthType Basic
AuthBasicProvider example
Require user user1

```