0

I have two web server (server1, server2) and multiple web application (20+) are running. Some app(10+) needs ldap authentication to get access. I wanted to implement 'single sign on' kind of stuff and maintain session with ldap authentication.

My proposal: Once user is logged in any of the application then maintain a unique key for each user in persistent key value store, with a timestamp, and lifetime.
timestamp-> when the user logged in.
lifetime-> who long the authentication should be valid.

What is the best way to implement this feature? First thing came in my mind is persistent message queues. Any suggestion what is the best way to this and which persistent message queue to choose.

NOTE: I can run this session management in server1 or server2 and both may go down. (Language of choice : Any, Preferable python.)

Please comment if problem statement is not clear.

Cereal_Killer
  • 304
  • 2
  • 13

1 Answers1

1

What you are looking for seems to be something like the redis backend session store.

there is a libary available for this solution in Django: https://github.com/martinrusev/django-redis-sessions

and an official snipplet from Flask: http://flask.pocoo.org/snippets/75/

If you run the redis session storage on a different server than your applications, your authentification system should still be functional in the case that one of your application servers goes down.

matyas
  • 2,696
  • 23
  • 29