Skip to content

Server error: Failed to connect to the LDAP server! #227

@Elbullazul

Description

@Elbullazul

I'm setting up the Docker container, but every time I try logging in the mobile app, I get the error "Server error: Failed to connect to the LADP server!"

I can ping the LDAP container from the hauk container, so maybe there's something missing from my end?

Here's my (redacted) config for LDAP auth in config.php:

"auth_method"       => LDAP,

...

/*----------------------------------------------------------------------------*\
|  LDAP AUTHENTICATION                                                         |
\*----------------------------------------------------------------------------*/

// URI that points to the LDAP server. Use "ldap://" for unencrypted LDAP as
// well as when using StartTLS, use "ldaps://" for regular LDAP over TLS. Port
// number is typically 389 (ldap) or 636 (ldaps).
"ldap_uri"          => 'ldap://lldap:3890',

// Whether or not you wish to use StartTLS. StartTLS cannot be used in
// combination with `ldaps`.
"ldap_start_tls"    => false,

// Base DN to search for users.
"ldap_base_dn"      => 'ou=people,dc=domain,dc=com',

// DN to bind to to perform user search. This should ideally be a read-only
// account as the password is stored in plain-text in this config file.
"ldap_bind_dn"      => 'cn=user,ou=people,dc=domain,dc=com',
"ldap_bind_pass"    => 'pass',

// A filter that finds the user trying to authenticate. %s is substituted with
// the username provided by the user in the app.
//
// You can also use this to restrict access to Hauk to only authorized users if
// you do not wish to grant all LDAP users permission to use your Hauk instance.
// For example, (&(uid=%s)(memberOf=cn=HaukUsers,ou=Groups,dc=example,dc=com))
// will only let the user connect if they are part of the "HaukUsers" group in
// the "Groups" OU.
"ldap_user_filter"  => '(&(uid=%s)(memberOf=cn=ldap_hauk,ou=groups,dc=domain,dc=com))',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions