LDAP integration
Assistants can be published to specific departments. MUCGPT reads the organization’s department tree from the configured LDAP directory, so published assistants are scoped according to that hierarchy. Configure LDAP in assistant.config.yaml under the ldap section:
yaml
ldap:
enabled: true
host: "ldaps://ldap.example.org"
port: 636
use_ssl: true
start_tls: false
verify_ssl: true
ca_cert_file: "/path/to/ca-bundle.pem"
bind_dn: "cn=mucgpt,ou=service-accounts,dc=example,dc=org"
# Provide bind_password via MUCGPT_ASSISTANT_LDAP__BIND_PASSWORD instead of storing it here.
# bind_password: "<secret>"
search_base: "dc=example,dc=org"
search_filter: "(objectClass=organizationalUnit)"
display_attribute: "ou"
shortname_attribute: "departmentCode"
parent_attribute: "parentDepartment" # optional
additional_attributes: ["departmentName", "departmentCode"]
required_attributes: ["departmentName", "departmentCode"]
ignored_ou_prefixes: ["_"]
ignored_ou_suffixes: ["-xxx"]
ignored_ou_shortname_exceptions: ["DEPT-EXAMPLE"]
page_size: 500
connect_timeout: 5.0
read_timeout: 10.0Individual fields can be overridden via environment variables using the MUCGPT_ASSISTANT_LDAP__ prefix:
bash
export MUCGPT_ASSISTANT_LDAP__ENABLED=true
export MUCGPT_ASSISTANT_LDAP__BIND_PASSWORD='<secret>'
export MUCGPT_ASSISTANT_LDAP__IGNORED_OU_SHORTNAME_EXCEPTIONS='["DEPT-EXAMPLE"]'search_basedefines the root of the organization tree.- Toggle
use_ssl/start_tls/verify_ssldepending on your directory security requirements; setca_cert_fileif your LDAP server uses a custom CA. display_attribute(defaultou) controls the label shown for each organizational unit;shortname_attributeselects its stable identifier;parent_attributecan be set if your LDAP schema exposes a parent reference.additional_attributesfetches extra attributes for display;required_attributesare enforced during loading. Adapt all attribute names to your LDAP schema.ignored_ou_prefixes/ignored_ou_suffixeslet you skip placeholder OUs (by default everything starting with_or ending with-xxx).ignored_ou_shortname_exceptionsallows specific OUs to bypass ignore rules when their configured short-name attribute matches one of the listed values (case-insensitive).- Typical use case: keep a business-relevant OU like
_Hiddenby adding its shortname (for exampleDEPT-EXAMPLE) toignored_ou_shortname_exceptions. - Pagination and robustness:
page_size(default 500),connect_timeout(default 5s), andread_timeout(default 10s).