Foros de discusión

How Liferay SSO works on external systems?

Gwowen Fu, modificado hace 9 años.

How Liferay SSO works on external systems?

Expert Mensajes: 315 Fecha de incorporación: 27/12/10 Mensajes recientes
Hi,

I am new to SSO and want to know more about how SSO works with external systems.

From http://nxcgroup.com/Products/Liferay/Single-Sign-On:
Single Sign On (SSO) in Liferay is a method to allow users to access multiple related but independent software systems while only needing to authenticate once in Liferay.

According to that, does that mean once I logged in to Liferay, click on any external link that goes to a system that uses the same SSO server, I don't have to login in again?

Does this external link need to pass authentication information? If yes, then it is not true that user is only authenticated once. In that case, each external system we want to do SSO, we need to pass authentication information for that system to authenticate the user again.

Could someone help?

Thansk!
Gwowen
thumbnail
Vilmos Papp, modificado hace 9 años.

RE: How Liferay SSO works on external systems?

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Basically Liferay can work with several SSO solutions, where the user to log into Liferay, authenticates to the SSO server, then the SSO server creates a session when the user navigates to other systems, a valid session for him will be available because of the former login, and no additional login is needed. That's it in a nutshell.
Gwowen Fu, modificado hace 9 años.

RE: How Liferay SSO works on external systems?

Expert Mensajes: 315 Fecha de incorporación: 27/12/10 Mensajes recientes
Vilmos Papp:
Basically Liferay can work with several SSO solutions, where the user to log into Liferay, authenticates to the SSO server, then the SSO server creates a session when the user navigates to other systems, a valid session for him will be available because of the former login, and no additional login is needed. That's it in a nutshell.


Hi Vilmos,

That's sounds great and I would like to make sure I am truly understanding how that works. Let's say I have another web server for user to enter timesheet that is using the same LDAP and CAS as Liferay portal. I have a link inside Liferay portal that points to this timesheet web server. The link is pointing to the main page not the login page. Does Liferay handle the timesheet web site login automatically without any configuration made?

Is there an easy way to test that? For example, an easy way to setup a CAS server for Liferay and CMS to test that user can navigate into CMS without user login?

Thanks a lot!
Gwowen
thumbnail
Vilmos Papp, modificado hace 9 años.

RE: How Liferay SSO works on external systems? (Respuesta)

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
If the website which hosts timesheet is bound to the same CAS server as Liferay, after authenticating to CAS and login to Liferay, the user should be able to click on the link and login to timesheet without furter authentication.
Gwowen Fu, modificado hace 9 años.

RE: How Liferay SSO works on external systems?

Expert Mensajes: 315 Fecha de incorporación: 27/12/10 Mensajes recientes
Thanks! I was able to setup a testing environment using Liferay 6.2 with a second tomcat instance for CAS server and a WebLogic Server for other web apps.
Everything works perfectly.

-Gwowen
thumbnail
Andew Jardine, modificado hace 9 años.

RE: How Liferay SSO works on external systems?

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
Hi Gwowen,

If you want to understand a little more about what happens under the hood, there are a few elements at play. There are two MAIN pieces for this.

1. OpenSSOFilter
2. OpenSSOAutoLogin

The filter by default in Liferay is set to enabled, and the OpenSSOAutoLogin is part of the listing for the auto.login.hooks. If OpenSSO is enabled (either through properties or the control panel) then the OpenSSOFilter will run. Assume for the moment that your entire site is protected. The OpenSSOFilter will detect that you are trying to access a protected resource and will route you to the "login url" you defined in your settings (again, properties or control panel). An alternative to this, for the record, might be to use a J2EE agent or a WebAgent on the proxy to protect specific resources (urls). Either way, the point is the user is routed to the SSO (lets just say OpenSSO for simplicity) server.

Inside the OpenSSO server a realm will have been created. The realm will encompass applications that are all trusted. Normally this part, I beleive, is called the Identity Provider. So is you have a Timesheet tool, a Vacation Tool and an Expense tool all as separate applications, you can add them to the same "bucket" so that authenticating for one automatically authenticates you for the others. As you know, the authentication is tied to a directory store where the users details are stored. So you user is on the OpenSSO web page and signs in successfully.

They are routed back to Liferay at this stage with their cookie proving that they have authenticated. The OpenSSOFilter detects this and the user now goes into the "auto.login.hooks" chain. Eventually they hit the OpenSSOAutoLogin hook. This hook will check for the cookie and then communicate silently over http (REST type services) with the OpenSSO server and validate the token as well as retrieve some mappings. The class will then determine whether or not a user with the same attribute values exists in Liferays database. This is important because although you gain access to Liferay as an endpoint from authenticating with OpenSSO, Liferay itself needs to authenticate you so that you have a security context in the portal. If the user is not found Liferay will automatically create a new user account using the LDAP mappings to create the record. Once the user is created, then you are signed into the portal.

This last step is important. If there is a problem with the mappings, then the user cannot be created in which case even though you pass authentication with OpenSSO, you won't get into the portal.

Once in the portal the user clicks links to go to the the expense tracker for example. That request travels there with the same OpenSSO cookie. The expense tracker has it's own filters/logic that will detect the cookie, communicate with the OpenSSO server and then grant access or not. The end systems, as a matter of interest, are referred to as "service providers". So the service providers communicate with the identity provider in order to validate whether or not you are authorized to access a resource.
Gwowen Fu, modificado hace 9 años.

RE: How Liferay SSO works on external systems?

Expert Mensajes: 315 Fecha de incorporación: 27/12/10 Mensajes recientes
hi Andrew,

Thanks, I use CAS Server and CAS Client filters at this point. Will look into OpenSSO.

Regards,
Gwowen
thumbnail
Vilmos Papp, modificado hace 9 años.

RE: How Liferay SSO works on external systems?

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Hi,

Actually for CAS there are also: