docs Directory Agent: LDAP
Launch Nametag Get help

Directory Agent: LDAP

Caution: This feature is in beta. While we do not expect these interfaces to change, they might. If you have any issues, please report them to help@nametag.co.

If you have a LDAP directory that you would like to integrate with Nametag, you can use the nametag cli to run a directory agent via the following command:

nametag dir agent ldap --ldap-url LDAP_URL --base-dn BASE_DN --bind-dn BIND_DN --bind-password BIND_PASSWORD

All of these can also be configured in your nametag config which found by default in: ~/config/nametag/.config.yaml. The order of precedence for arguments is:

- Command line argument value
- Env variables
- Config value

Example section with LDAP configuration:

Version: "1"
LDAPConfig:
  ldapurl: "ldap://localhost:389"
  binddn: "cn=admin,dc=example,dc=com"
  bindpassword: "admin_password"
  pagesize: 250
  basedn: "dc=example,dc=com"

Running the aforementioned shell command will create a new custom directory which can then be used to manage your LDAP directory. The agent will then perform operations on your directory on behalf of Nametag.

You can also invoke an agent with custom logic for a more bespoke behaviour with your directory:

nametag directory agent --command "my-custom-worker"

Note that this was developed against OpenLDAP. Since directories that speak the protocol can be customized considerably, the underlying specifics such as attribute values might change from directory to directory. Adjustments might be needed to the code to tailor to your requirements. For more information on how nametag interacts with the worker, refer to this. You can contribute/fork the nametag cli repo.