What are the options for sharing sessions between applications? - session

Say that I have two or more completely separate web applications. The might even be running on a different server and use different language & framework.
What I need to do is to share state, or at least authentication. For example if the user logs in on one of the websites and goes to another one, he will be able to authenticate using his credentials from the first website.
For example, if I have one website running e-commerce and another one is a blog, I want all the e-commerce users be able to comment on the blog with the information from their profile.
What is the best way to do this? Is it even a good idea?
The only solution that comes to my mind is abstracting away the profiles and authentication and create some kind of global profile and then use that on both of those websites. But that seems like a really complex solution considering what I need to achieve.

OpenID seems like a good way.

Related

Laravel authentication in multiple instances

Since we currently maintain 6 applications that were developed with Laravel, the wish has now arisen that there is a unified login system.
Currently we are working with a database purely for authentication where all applications access it. So the user only has to be created once for all 6 applications.
Now I would like the user to have only one login page and be able to use all applications after authentication.
I would solve the problem with a RSYNC task which synchronizes the cache of the applications. However, I think that there is a better way, so I ask you
What you are looking for is called a Single sign-on, which has been answered here before some times, but for people who don't know how to call it, it would be pretty hard to find! So here are some links:
Good single sign-on solution for Laravel by lesssuger
single sign on (sso) laravel by Moauya Meghari

Need Advice: Laravel single signon for different laravel applications

I have a certain requirement where i will have a central laravel application, and it has all the users in there. Then there are 2-3 sub laravel applications. The users are individually given access to these sub applications.
Now the requirement is that these sub applications shouldn't have any users in there. They should query the central laravel application (through api).
So if someone signs in the central laravel application, it should automatically sign-in to the other applications that they are given access to.
I am aware that providing code wont be possible, so just an overall overview of how it might work and some packages that might be helpful would be really great. Thanks in advance.
I have pretty much done this. I really struggled to find examples/advice so just started building it.
I have several applications, all for internal use.
I have one application/db for storing users/roles/permissions.
In my other applications, the user model just points to the usermanager db.
When user log in, I grab all their permissions for this application and store them in the session.
Seems to be working so far.
Mick

Restrict administrator to one store view

I have installed and configured a Magento Community edition v1.8 according to a few requirements. Part of the requirements is the setup of a few stores.
For completion though, it is necessary to configure "administrators" per se for each of these stores. This administrator, when (s)he logs in to the admin portal, would be viewing data, configuration and settings only for their respective store, and the rest(of the stores) is not shown (As is the case when one configures an admin role via System -> Permissions -> Roles).
When the main administrator logs in to the back-end portal, they should view options for assigning these smaller (so to speak) administrators to their respective admin website sites. This list should be updated when stores are added/deleted (and hence the excellent Alan Storm's blog is not of much help)
I have been looking at various tutorials that enable and manipulate ACL, although none of them specifically tackle allowing such specific administrator access.
Can someone kindly point the right resources for achieving such a functionality? Any help is very much appreciated and will be rewarded with karma points :)
(I forgot to mention that I am not looking for a turnkey solution, but rather a direction to proceed, so that I may configure it myself. Any resource in this regard will be very helpful!)
Magento just doesn't work this way - it sounds like you are trying to create a kind of multi-vendor setup with each vendor having access just to their store/products. To achieve a robust, complete solution like this would require such widespread changes to standard functionality you would probably end up making it extremely difficult to upgrade the store, it would also take many, many hours of development time. Essentially, I wouldn't recommend going down this route.
Aitoc has made an extension for admin restrictions per strore. But Aitoc is not my favorite :). And than I'm kind in my words :) honestly we set them to our extension Blacklist
But if you want it : http://www.aitoc.com/en/magentomods_advanced_permissions.html
Note: on own risk ;)

Simplest way to authenticate a user with express?

I'm looking for the simplest way to register and authenticate a user with the express library for node.js. I would like to store the users in a redis db.
I would prefer to use only express and not an additional library.
Also, once a user is authenticated. How should I carry out storing information pertinent to only that user? Perhaps the user's login would be the key in the redis db, and the value would be an array of other information? Or is that not a good solution?
I'm not familiar with authentication, but have some familiarity with node, express and redis so it hopefully won't be too much of a problem.
Any suggestions are welcome!
Check out EveryAuth. From what I've seen, it provides the most comprehensive solution, including support for passwords, OpenID, OAuth, LDAP, and so forth. You can use it and allow your users to login with a password or with many different online services, including twitter, facebook, linkedin, etc.
https://github.com/bnoguchi/everyauth
Here's a pretty decent video tutorial that integrates it with CouchDB:
http://nodetuts.com/tutorials/26-starting-with-everyauth.html
https://github.com/pgte/nodetuts_26
I'm not familiar with authentication, but have some familiarity with
node, express and redis so it hopefully won't be too much of a
problem.
If you really want store passwords inside your database, which I don't think you should do(see below), you could have a quick look at TJ's example to do authentication.
I always think it is a bad idea to store passwords inside your (own) database. Stackoverflow author Jeff Atwood does have a very interesting article about this named OpenID: Does The World Really Need Yet Another Username and Password?. I would advise you to use systems like OpenID(facebook-connect, etc) just like stackoverflow.com is doing. A good openid library is available, which is very easy to use.
connect-auth is a good choice for third party auth.
If you are planning to write your own, see this thread for an example

Software for a social network in a corporate intranet running on LAMP

The company where I work for (1800+ Employees) is looking to enhance the personal relationships between its employees, allow a better collaboration and communication between departments and make it easier for the HR department to identify skills, experience and interests among the personnel (ex: we have some colleagues with deep knowledge of SAP modules and products, but during concrete projects it results very difficult to identify them and integrate them). Therefore, they want to implement a social network for our intranet.
We are just looking for the basic features such as profiles, discussion boards and so on, so nothing fancy. I proposed Community Server but my boss said .Net and java are no-gos. He wants LAMP and is not interested in a web solution like Ning, because of privacy and security concerns. It does not matter if it is Open-Source or commercial software. But it should allow a complete layout customization and must also have access from the outside world.
So my question would be, is there something like Community Server running on a LAMP stack?
Thank you very much!
UPDATE: We already have a Facebook page and a group. But my boss wants some features not included in Facebook such as a tag cloud in each profile page displaying skills and relevant proyects; and a feature like the "neighborhoods" from Last.FM, where you can group people with similar skills and interests and there is also the confidentialy issue (discussions about projects, clients, etc). So, any ideas?
You should check out StatusNet. http://status.net/
It doesn't directly answer your question, but aren't you rather trying to reinvent the wheel?
Facebook has got Social Networking down and the likely hood is 95% of your 1800 employees already use it.
Why would you go to the effort of writing and supporting a product as well as asking your employees to update information about themselves in multiple places when you could just set up a Facebook Network.
The other point I would make is, why are you limiting yourself to one way of doing things right from the off. Perhaps a detailed analysis of which technologies best serve your purpose would be more appropriate.
I appreciate this doesn't answer you question, I just feel this is a good example of Corporations unwilling to embrace tools already out there, I suspect because they are scared of them.
I'm probably right in guess that you're company heavily monitors Facebook usage, which is why this also might be hard.
Try Open Atrium, a Drupal-based team server.
Some sort of facebook application would allow you to keep the data on a server that you manage, but still use facebook's existing features. Pretty certain that facebook uses PHP for its application framework.
I agree with MrEdmundo and would upvote him if I were registered. Dont fall victim to "It wasnt invented here" syndrome. I bet your boss is like "we need something like facebook".
If it makes you feel better... here is a little story:
I was trying to implement some sort of group chat so fellow employees could ask quick questions to eachother online without having to get up or if someone was on the phone, etc. However, the service I installed (some sort of jabber daemon, i forget which one) never really got used. The solution? Just install the facebook chat client because all the co-workers are already on facebook most the day anyways!
plus, the "screen name" is appropriate because it is our real names, not stuff like "Out Into Space", "theman", or "fly-mystikal-dj-69"
You might want to consider something like Drupal. It's technically a CMS, but it's extremely customizable, and there are a lot of modules available that provide social-networking-style features.
Use Office Messenger for communication. It's basically like MSN Messenger but run on the company's servers so they can monitor all traffic. To know who has expertise in what area, it can't be too hard to build your own simple CRUD application to record profiles of employees and have each profile tagged with key skills, that the employee has and build a search function to find the people with the skills you need at any given time.
You can create an application using the Facebook SDK (PHP, java or any other language) and moderate it so that only employees can use it. That way you can use the existing Facebook features and add the tag clouds and other stuff your boss wants.
I've not used it, but Dolphin might be worth downloading to try out.
elgg.org
LAMP easy to install and setup, looks like your requirements would all be easily satisfied by the official plugins that are available.
Another option: http://buddypress.org/

Resources