<p>How would you implement a system with the following objectives:</p>

<ul>
<li>Manage authentication,
authorization for
<strong>hundreds of thousands</strong> of <em>existing users</em> currently tightly integrated with a 3rd party vendor's application (We want to bust these users out into something we manage and make our apps work against it, plus our 3rd party vendors work against it).</li>
<li>Manage profile information linked to those users</li>
<li>Must be able to be accessed from any number of web applications on just about any platform (Windows, *nix, PHP, ASP/C#, Python/Django, et cetera).</li>
</ul>

<p>Here some sample implementations:</p>

<ul>
<li>LDAP/AD Server to manage everything. Use custom schema for all profile data.  Everything can authenticate against LDAP/AD and we can store all sorts of ACLs and profile data in a custom schema.</li>
<li>Use LDAP/AD for authentication only, tie LDAP users to a most robust profile/authorization server using some sort of traditional database (MSSQL/PostgreSQL/MySQL) or document based DB (CouchDB, SimpleDB, et cetera).  Use LDAP for authorization, then hit the DB for more advanced stuff.</li>
<li>Use a traditional database (Relational or Document) for everything.</li>
</ul>

<p>Are any of these three the best? Are there other solutions which fit the objectives above and are easier to implement?</p>

<p>** I should add that almost all applications that will be authenticating against the user database will be under our control.  The lone few outsiders will be the applications we're removing the current user database from and perhaps 1 or 2 others.  Nothing so broad as to need an openID server.</p>

<p>Its also important to know that a lot of these users have had these accounts for  5-8 years and know their logins and passwords, et cetera.</p>

[{'answer_id': 78255, 'author': 'zuber', 'author_id': 9812, 'author_profile': 'https://Stackoverflow.com/users/9812', 'pm_score': -1, 'selected': False, 'text': '<p>You can always implement your own <a href="http://openid.net/what/" rel="nofollow noreferrer">OpenID</a> server. There is already a <a href="http://openidenabled.com/python-openid/" rel="nofollow noreferrer">Python library for OpenID</a> so it should be fairly easy. </p>\n\n<p>Of course you don\'t need to accept logins authorized by other servers in your applications. Accept credentials authorized only by your own server.</p>\n\n<p><strong>Edit:</strong> I have found an <a href="http://trac.nicolast.be/djangoid" rel="nofollow noreferrer">implementation of OpenID server protocol in Django</a>.</p>\n\n<p><strong>Edit2:</strong> There is an obvious advantage in implementing OpenID for your users. They will be able to login to StackOverflow with their logins :-)</p>\n'}, {'answer_id': 78289, 'author': 'Jon Limjap', 'author_id': 372, 'author_profile': 'https://Stackoverflow.com/users/372', 'pm_score': 2, 'selected': False, 'text': '<p>If you have an existing ActiveDirectory infrastructure, that will be the way to go. This will be particularly advantageous to companies that have already had Windows servers set up for authentication. If this is the case, I\'m leaning towards your first bullet point in "sample implementations".</p>\n\n<p>Otherwise it will be a toss-up between AD and opensource LDAP options.</p>\n\n<p>It might be not viable to roll your own authentication schema for single-sign-on (especially considering the high amount of documentation and integration work you might have to do), and obviously do not bundle your authentication server with any of the applications running on your system (since you want it to be able to be independent of the load of such applications).</p>\n\n<p>Goodluck!</p>\n'}, {'answer_id': 78327, 'author': 'dacracot', 'author_id': 13930, 'author_profile': 'https://Stackoverflow.com/users/13930', 'pm_score': 4, 'selected': True, 'text': "<p>There is a difference between authentication and authorization/profiling so don't force both necessarily into a single tool.  Your second solution of using LDAP for authentication and a DB for authorization seems more robust as the LDAP data is controlled by the user and the DB would be controlled by an admin.  The latter would likely morph in structure and complexity over time, but authentication is just that authentication.  Separation of these functions will prove more manageable.</p>\n"}, {'answer_id': 78340, 'author': 'jason saldo', 'author_id': 1293, 'author_profile': 'https://Stackoverflow.com/users/1293', 'pm_score': 0, 'selected': False, 'text': '<p>Use LDAP/AD for authentication only, tie LDAP users to a most robust profile/authorization server using some sort of traditional database (MSSQL/PostgreSQL/MySQL) or document based DB (CouchDB, SimpleDB, et cetera). Use LDAP for authorization, then hit the DB for more advanced stuff.</p>\n'}, {'answer_id': 78358, 'author': 'Sklivvz', 'author_id': 7028, 'author_profile': 'https://Stackoverflow.com/users/7028', 'pm_score': 0, 'selected': False, 'text': '<p>We have different sites with around 100k users and they all work with normal databases. If most applications can access the db you can use this solution.</p>\n'}]
['https://Stackoverflow.com/questions/78217', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']