* The main program, command line argument parsing and logging
initialization remains in main.go
* Configuration structure and loader are in config.go
* LDAP connection and querying is in ldap.go
* Anything that has to do with Graylog, including the privilege mapping,
is in graylog.go
* Added dependency on logrus.
* Command line flags are parsed in order to obtain the name of the
configuration file, the log level and the instance identifier.
* Logging in various places : configuration loader, API, data access.
Privilege computations and subsequent actions do not write proper logs
yet.
* The `username_attribute` configuration value was added to the `ldap`
section. When this value is set, the program will not try to extract the
username from DNs; instead, it will look them up and extract the
username from the referenced record, using the specified attribute.
* The program will no longer exit in error when a group listed in the
mapping doesn't exist.
This is a Go program which can synchronize Graylog 4 roles and access
privileges to dashboards and streams from a LDAP directory, based on a
YAML configuration file that maps LDAP groups to Graylog privileges.
The code is rather ugly, some features are half-baked (LDAP TLS
support, impossible to disable HTTP TLS checks, bad error handling...)
and some documentation needs to be added but it's a start.