LDAP - Automate Configuration

Hi guys,

I wonder if it’s possible to configure LDAP authorization without UI (e.g. via content packs or anything)?
I need this to be able to automate Graylog configuration w/o manual steps.

Thanks for any advice.

You can configure LDAP authentication using the Graylog REST API.
It’s not possible to do this with content packs.

Thx @jochen!
Found this guide immediately (for any guys with the same question)
And the following ansible task:

- uri:
    method: PUT
    user: devops
    password: devops
    body: |
        "enabled": true,
        "system_username": "uid=read_only,ou=myou,dc=mydc,dc=com",
        "system_password": "password",
        "ldap_uri": "ldap://ldap.example.com:389/",
        "use_start_tls": false,
        "trust_all_certificates": false,
        "active_directory": false,
        "search_base": "ou=myou,dc=mydc,dc=com",
        "search_pattern": "(&(objectClass=inetOrgPerson)(uid={0}))",
        "display_name_attribute": "cn",
        "default_group": "Reader",
        "group_mapping": {},
        "group_search_base": "",
        "group_id_attribute": "",
        "additional_default_groups": [
        "group_search_pattern": ""
      Content-Type: "application/json"
      Accept: "application/json"
    status_code: 204
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.