OS Name/Version: Ubuntu 22.04
Product Name/Version: Cubecoders AMP Network Edition 2.4.6.6 (Decadeus), built 05/10/2023 11:56
Problem Description:
I have been attempting to setup LDAP for auth using authentik ldap outpost as a backend. I set up ldap-swak as a proxy to help debug. I managed to get it to make a succesful bind and search but now I am getting an ArgumentNullException
. Any help would be appreciated.
- New install of AMP on Ubuntu 22.04
- Configured as Controller
- Followed Network and Enterprise edition setup guide
- Configured LDAP
- Restarted ADS
- Attempted to login
AMPConfig.conf login section
################################
# Login
################################
Login.UseAuthServer=False
# Login.AuthServerURL - The URL for the ADS instance providing authentication when using UseAuthServer
Login.AuthServerURL=
Login.MetricsServerPort=12820
Login.UseLDAPLogins=True
Login.LDAPAuthDomain=ldap.l.example.com/ou=users,dc=ldap,dc=l,dc=example,dc=com
Login.LDAPGroupPrefix=AMP_
Login.LDAPUserDomain=authentik.example.com
Login.LDAPADPre2000=False
Login.LDAPStripDomainFromFilter=True
Login.LDAPQueryUsername=cn=<usernam>,ou=users,dc=ldap,dc=l,dc=example,dc=com
Login.LDAPQueryPassword=<password>
ldap-swak intercept
ldap-swak 17:34:52.536 DEBUG CredentialsOperationInterceptor - Simple bind cn=<username>,ou=users,dc=ldap,dc=l,dc=example,dc=com pw '<password>'
ldap-swak 17:34:52.537 INFO CredentialsOperationInterceptor - Intercepted credentials cn=<username>,ou=users,dc=ldap,dc=l,dc=example,dc=com:<password>
ldap-swak [21/Nov/2023:17:34:52 +0000] BIND REQUEST conn=9 op=0 msgID=1 version=3 dn="cn=<username>,ou=users,dc=ldap,dc=l,dc=example,dc=com" authType="SIMPLE"
ldap-swak [21/Nov/2023:17:34:57 +0000] BIND RESULT conn=9 op=0 msgID=1 resultCode=0 etime=4942.544
ldap-swak [21/Nov/2023:17:34:57 +0000] SEARCH REQUEST conn=9 op=1 msgID=2 base="ou=users,dc=ldap,dc=l,dc=example,dc=com" scope=2 filter="(&(objectClass=user)(sAMAccountName=<username>))" attrs="SAMAccountName,memberOf,distinguishedName"
ldap-swak Search result: dn: cn=<username>,ou=users,dc=ldap,dc=l,dc=example,dc=com
ldap-swak sAMAccountName: <username>
ldap-swak memberOf: cn=AMP,ou=groups,dc=ldap,dc=l,dc=example,dc=com
ldap-swak memberOf: cn=AMP_GROUP1,ou=groups,dc=ldap,dc=l,dc=example,dc=com
ldap-swak memberOf: cn=AMP_Admins,ou=groups,dc=ldap,dc=l,dc=example,dc=com
ldap-swak memberOf: cn=AMP_GROUP2,ou=groups,dc=ldap,dc=l,dc=example,dc=com
ldap-swak memberOf: cn=AMP_GROUP3,ou=groups,dc=ldap,dc=l,dc=example,dc=com
ldap-swak
ldap-swak [21/Nov/2023:17:34:57 +0000] SEARCH RESULT conn=9 op=1 msgID=2 resultCode=0 etime=411.647 entriesReturned=1
ADS logs
[17:34:52] [Logger Debug] : Login request from 192.168.1.24 for <username>
[17:34:57] [Logger Warning] : LDAP authentication failure: Value cannot be null.
Parameter name: source
[17:34:57] [Core Error] : ArgumentNullException
[17:34:57] [Logger Error] : [0] (ArgumentNullException) : Value cannot be null.
Parameter name: source
[17:34:57] [Core Error] : at Linq.Enumerable.Cast[TResult] (Collections.IEnumerable source)
at GSMyAdmin.Authentication.LDAPAuth.Authenticate (String username, String password)
[17:34:57] [Logger Warning] : Slow method invocation: Login took 5865ms to complete.
[17:34:57] [Logger Warning] : Slow response: Core.Login took 5873ms to complete.
Update:
So after a minor bit of de-compiling I found this regex s, "^CN=(.+?),.+$", "$1", RegexOptions.None
and noticed it is case sensitive. Any chance that could be made case insensitive? My ldap server does not have the option to use uppercase “CN”.