Coder Social home page Coder Social logo

Comments (3)

LM1LC3N7 avatar LM1LC3N7 commented on June 28, 2024

I still don't know why this error is generated, but I have changed my LDAP configuration and it is gone.

I assume that this is related to a bad configuration on the USERDN. I have removed ou=SERVICE-ACCOUNTS.

Now, I have to understand how to configure a subtree search to find my user.

from ldap.

mweiss237 avatar mweiss237 commented on June 28, 2024

Hi,

I have the same issue and can't get past it.

Wekan version: 4.17.0
Operating System: Windows 10 professional
Node version: 12.18.2

My start-wekan.bat config:

SET LDAP_ENABLE=true

SET LDAP_PORT=389

SET LDAP_HOST=MyLdapHost

SET LDAP_BASEDN=OU=xxx,DC=xxx,DC=xxx

SET LDAP_LOGIN_FALLBACK=false

SET LDAP_RECONNECT=true

SET LDAP_TIMEOUT=10000

SET LDAP_IDLE_TIMEOUT=10000

SET LDAP_CONNECT_TIMEOUT=10000

SET LDAP_AUTHENTIFICATION=true

SET LDAP_AUTHENTIFICATION_USERDN=CN=ldapUser,CN=Users,DC=xxx,DC=xxx

SET LDAP_AUTHENTIFICATION_PASSWORD=XXXXXX

SET LDAP_LOG_ENABLED=true

SET LDAP_BACKGROUND_SYNC=true

SET LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=true

SET LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS=true

SET LDAP_ENCRYPTION=tls

SET LDAP_USER_AUTHENTICATION=false

SET LDAP_USER_AUTHENTICATION_FIELD=sAMAccountName

SET LDAP_USER_SEARCH_SCOPE=sub

SET LDAP_USER_SEARCH_FIELD=sAMAccountName

SET LDAP_SEARCH_PAGE_SIZE=0

SET LDAP_SEARCH_SIZE_LIMIT=0

SET LDAP_UTF8_NAMES_SLUGIFY=true

SET LDAP_USERNAME_FIELD=sAMAccountName

SET LDAP_FULLNAME_FIELD=displayName

SET LDAP_EMAIL_MATCH_ENABLE=false

SET LDAP_EMAIL_MATCH_REQUIRE=false

SET LDAP_EMAIL_MATCH_VERIFIED=true

SET LDAP_EMAIL_FIELD=userPrincipalName

SET LDAP_SYNC_USER_DATA=true

SET LDAP_SYNC_USER_DATA_FIELDMAP={"cn":"name", "userPrincipalName":"email"}

SET LDAP_DEFAULT_DOMAIN=xxxx.xx

SET LDAP_SYNC_ADMIN_STATUS=true

SET LDAP_SYNC_ADMIN_GROUPS='EDV'

This is my output while trying to login to wekan:

[INFO] Init LDAP login "MyUser"
[WARN] Lookup for unset variable: LDAP_REJECT_UNAUTHORIZED
[WARN] Lookup for unset variable: INTERNAL_LOG_LEVEL
[WARN] Lookup for unset variable: LDAP_USER_ATTRIBUTES
[WARN] Lookup for unset variable: LDAP_USER_SEARCH_FILTER
[WARN] Lookup for unset variable: LDAP_GROUP_FILTER_ENABLE
[WARN] Lookup for unset variable: LDAP_GROUP_FILTER_OBJECTCLASS
[WARN] Lookup for unset variable: LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE
[WARN] Lookup for unset variable: LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE
[WARN] Lookup for unset variable: LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT
[WARN] Lookup for unset variable: LDAP_GROUP_FILTER_GROUP_NAME
[INFO] Init setup
[INFO] Connecting "ldap://MyLdapHost:389"
[DEBUG] connectionOptions{
  url: 'ldap://MyLdapHost:389',
  timeout: 10000,
  connectTimeout: 10000,
  idleTimeout: 10000,
  reconnect: true,
  log: Logger {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    _level: 30,
    streams: [ [Object] ],
    serializers: null,
    src: false,
    fields: {
      name: 'ldapjs',
      component: 'client',
      hostname: 'wekanserver',
      pid: 1588
    },
    [Symbol(kCapture)]: false
  }
}
[INFO] Starting TLS
[DEBUG] tlsOptions {
  "rejectUnauthorized": false,
  "ca": [
    "-----BEGIN CERTIFICATE-----MIIGJzCCBQ+gAwIBAgITWQAAC1cr/gzK/uWY2AAKAA.....-----END CERTIFICATE-----"
  ],
  "host": "MyLdapHost"
}
[INFO] TLS connected
[INFO] Binding UserDN "CN=ldapUser,CN=Users,DC=xxx,DC=xxx"
[ERROR] TypeError: Cannot read property '0' of undefined

Thank you for your help!

Cheers!

from ldap.

mweiss237 avatar mweiss237 commented on June 28, 2024

I found the problem for this but couldn't find a fix till now.
The message [ERROR] TypeError: Cannot read property '0' of undefined is connected to the setting LDAP_USER_SEARCH_FILTER.
If you active the log level "debug" with SET INTERNAL_LOG_LEVEL=debug and set the variable SET LDAP_USER_SEARCH_FILTER="" you can see the following entry:

[DEBUG] searchOptions { 
  "filter": "(&(\"\")(\"sAMAccountName\"=login))",
  "scope": "\"sub\"",
  "sizeLimit": 0
}

But then you get this error:

[ERROR] Error: "" is invalid

from ldap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.