How to implement a single login authentication server?

I want to implement a discrete remote authentication server that handles login for many sites. Quite similar to OpenID.

Basically, I have site-1 and site-2, and they both depend on the same user database, which is located on a separate auth site. Thus, auth-site processes user authentication for them, and during this process makes information available to the user requesting authentication to the requesting system.

Each site can be located on a completely separate domain name on completely separate machines.

This is all through HTTP (S), direct access to the database is not possible.

Here is one last quirk: after a user logs on to site-1, when the user accesses any other site, which depends on the auth site, the site should treat the user as already verified.

This entire business should be completely useless to the end user. It should work like a simple regular login form.

As a concrete example, let's say we are talking about stackoverflow.comand serverfault.com, and both are authenticated through authentic-overflow-server-stack.com. Again, after logging into any site, I can go to another and do my business without logging in again.

What I would like to know is the general mechanism of interaction between the sites behind this scenario.

Rails, [1], , . OTOH, , MVC, REST - .


[1]: MIT/BSD- //, .

+3
3

( ), - , . , en.wikipedia.org, (, en.wikinews.org) . , , . http://en.wikinews.org/wiki/Special:AutoLogin?token=xxxxxxxxxxxxxxx, url (img src), cookie . , http://www.mediawiki.org/wiki/Extension:CentralAuth.

OpenID , , "" . , , - Canonical. , https://help.ubuntu.com/community/UserPreferences, Launchpad (https://login.launchpad.net/+openid) .

, Wikipedia http, https, img src .

+2

It looks like you want to use the OpenID protocol itself. There is no reason why you cannot restrict the authentication provider to only your own server and make several shortcuts that make the authentication process transparent. In addition, the OpenID protocol supports what you describe about logging in, meaning logging in to all services.

+1
source

Source: https://habr.com/ru/post/1707130/


All Articles