When to use spring ldap authentication
i am new to spring security i read some articles about it, but couldn't开发者_C百科 find out when to use it. so i want to know when to use spring LDAP authentication and it would be nice if anyone can give me a use case or example thanks in advance.
As others have noted, this is less a Spring Security question and more of a general architectural question.
A basic difference between an LDAP and an RDBMS is that an LDAP is hierarchical, whereas a DB is relational (hence the name "R"DBMS). LDAPs are particularly well-suited as user stores because users are often hierarchical in nature. Example:
- Employees
- Managers
- Employee_1
- Non_Managers
- Employee_2
- Managers
- Non_Employees
Microsoft's Active Directory (AD) and OpenLDAP are two well-known examples.
Whichever one you use as your data store, though, will probably be less an issue of which data store is "better" (which is debatable), but rather what your environment looks like. If you already have an LDAP in place, why not use it, and the same holds true for a DB. In either case you need to have the appropriate infrastructure in place - servers, admins, backups, etc.
At the end of the day, it depends on what works in your situation. I have generally used DBs as my Spring Security data stores, as I always have a DB.
精彩评论