Sometimes we need to quickly check some behaviour with the AD/LDAP Connector. However setting the environment up with an LDAP server, data & the connector itself can be cumbersome. This repository should offer a rapid setup of the entire environment to quickly setup the connector and the corresponding LDAP environment locally. LDAP Server, LDAP Admin UI and the Connector itself all configured with sensible defaults and ready to try.
-
Auth0 developer tenant
-
On your
Auth0developer tenant, create a newActive Directory / LDAP Enterprise Connectionnamed sayldap-connection. -
Copy the
Provisionint Ticket Urlfrom theSetuptab for this connector configuration. We will need it in a subsequent step.- The URL should look like this:
https://tenant.auth0.com/p/ad/dyTLgMxLMx7qLLa0wxhuDzVw4hLwQ7HD
- The URL should look like this:
-
Clone this repository
-
cd auth0-ldap-local-env -
Edit:
ldap-connector.envand paste theProvisioning Ticket Urlagainst thePROVISIONING_TICKETproperty. -
Optional: Edit properties in
.envfiles (defaults already provided) -
Optional: Edit
ldif/seed.ldifwith initial sample data to load to the LDAP Server. -
Start the services:
docker compose up -
To Stop the services:
docker compose down.
-
Seeded with custom sample data
-
LDAP Port: 389, LDAPS: not configured
-
http://localhost:8080 (admin console)
-
HTTP Port: 8080, HTTPS: not configured
-
Login DN: cn=admin,dc=example,dc=org
-
Password: admin
-
Maintains an outbound connection with the Auth0 tenant.
-
Maintains an outbound conenction with the
ldap-servercontainer. -
http://localhost:8357 (admin console)
-
Login to the Auth0 Management Dashboard & Hit
Trybutton on theldap-connection. -
On the login box, enter credentials as
jdoeandpassw0rd(if you haven't changed the defaults fromldif/init.ldif). -
You should see a success page with the profile for user
jdoefrom theldap-server. -
Here is how the full profile (including group memberships and ldap attributes) for
jdoelooks like on my tenant.
{
"created_at": "2021-08-16T01:21:33.291Z",
"dn": "cn=jdoe,ou=users,dc=example,dc=org",
"family_name": "Doe",
"given_name": "John",
"groups": [
"gold_members"
],
"identities": [
{
"connection": "ldap-connection",
"provider": "ad",
"user_id": "ldap-connection|jdoe",
"isSocial": false
}
],
"name": "John Doe",
"nickname": "jdoe",
"organizationUnits": "cn=jdoe,ou=users,dc=example,dc=org",
"picture": "https://s.gravatar.com/avatar/a31405d272b94e5d12e9a52a665d3bfe?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fjd.png",
"updated_at": "2021-08-16T01:21:33.291Z",
"user_id": "ad|ldap-connection|jdoe",
"last_ip": "165.225.114.141",
"last_login": "2021-08-16T01:21:33.290Z",
"logins_count": 1,
"blocked_for": [],
"guardian_authenticators": []
}