2 ms·
While technically you're right (as in, LDAP is great for handling many user entries and auth[nz] correctly), in practice it's not going to happen. Nobody knows
by viraptor 12y ago
While technically you're right (as in, LDAP is great for handling many user entries and auth[nz] correctly), in practice it's not going to happen. Nobody knows LDAP (as in, take a random sample of non-corporate developers and most likely none of them will know LDAP). It's a pain to integrate and operate in a small environment. That's why there's a call for a simple solution.
It's why everyone uses JSON and not ASN.1. Why people will save a single number in a file rather than standing up Oracle database. Or why they still use random invented rot-level "encryption" for messages rather than pgp.
LDAP doesn't expose operations like "create new user", "verify password", "deactivate user", "set encryption method to ...". It's a database where you "bind" your user description against your hierarchy of objects/attributes - explain that to a guy who just wants to get his new app idea working ASAP... It's got its own query language too. You can even do LDAP query injections - just like in SQL!
Like you said - LDAP is a beast. It's great and I'd use it as soon as number of users goes over 10k, or employees on different levels over 10. But otherwise, no way. A new component with its own security issues is just not worth it.
- voltagex_ 12y ago(Active Directory trigger warning) Even when the number of users goes over 10k I'm not sure it's worth it. I've lost days chasing down random errors to do with DNS or a misbehaving DC... when the error reference looks like http://www.selfadsi.org/errorcodes.htm http://www.selfadsi.org/errorcodes.htm (although I wish I'd known about MS's err.exe at the time) And that's just when you're using the recommended connectors (ODBC/ADO.NET). FSM help you if you're using JDBC and the vendor of the $20k+ product hasn't tested against Server 2012. I wonder if there's any money in providing an LDAP/AD -> REST server. http://stackoverflow.com/questions/2453769/active-directory-as-openid-provider http://stackoverflow.com/questions/2453769/active-directory-... might be an idea, too.
- hyc_symas 12y agoBuzz, wrong - no such thing as LDAP injection attacks, sorry.
- viraptor 12y agoCome on, it's just one google search away. https://www.owasp.org/index.php/LDAP_injection https://www.owasp.org/index.php/LDAP_injection (but confirms the "nobody knows LDAP" nicely) Unless you escape your "(cn=$username)" properly, the users can do a lot of fun things.
- hyc_symas 12y agoNonsense. That page is utter tripe. The 2nd example " ( cn = jonys ) ( | (password = * ) ) " isn't even a valid filter, and a proper LDAP server will discard it. An OpenLDAP libldap-based app won't even be able to generate the request because the library will reject it. More importantly, an LDAP search filter only goes with an LDAP search request, which is read-only. You cannot use silly parser games like this to destroy a database, like you can in SQL with Little Bobby Tables. https://xkcd.com/327/ https://xkcd.com/327/ Playing games with LDAP search filters can't return you more information than the app was originally authorized to see. It most often won't even return you more than a single record, since most apps that make LDAP queries and expect only a single entry to be returned won't even look at any subsequent entries if they happen to be in the reply. Canonical LDAP application code to search for a user record, for authentication/authorization purposes, sets the LDAP search sizelimit to 1. Getting more than 1 matching result is an error.
- viraptor 12y agoUncommon - yes. Can do less than SQL injections - yes. Read-only - yes. But it does exist. Saying that LDAP auth[nz] code should set sizelimit to 1 is like saying SQL auth[nz] code should set LIMIT 1. Correct and defensive code does that. But there's still code out there which doesn't and is vulnerable. Then again, I don't think you understood the second example. It's not for auth, but rather user search - which is the probably the second most common corporate ldap usage. As for LDAP injection being nonsense, how about searching some CVEs: - LDAP injection and resulting STORED Cross Site Scripting in Events Planner - SmarterMail 7.x (7.2.3925) - https://www.exploit-db.com/exploits/15189/ https://www.exploit-db.com/exploits/15189/ - Graylog2 before 0.92 allows remote attackers to bypass LDAP authentication via crafted wildcards. - CVE-2014-9217 - PowerDNS before 2.9.18, when running with an LDAP backend, does not properly escape LDAP queries, which allows remote attackers to cause a denial of service (failure to answer ldap questions) and possibly conduct an LDAP injection attack. - CVE-2005-2301 And many many more...