Share on:

Single Sign-On with OpenAM and OpenIG: Practical Implementation Examples

Introduction

Single Sign-On or SSO is a technology that allows users to access different applications with the same credentiasl using a single authentication service.

This approach improves not only user experience but also security, as credential management, access policies, authentication processes and monitoring are centralized.

In this article, we will review the main approaches to SSO implementation using the examples of open source solutions OpenAM and OpenIG.

Multiple Services on a Single Domain

Consider a company with customer or partner services on the same domain. For example, a bank and a marketplace on the example.org domain.

The SSO architecture is shown in the diagram below:

OpenAM and OpenIG SSO Diagram

In the diagram, OpenAM acts as the authentication service, OpenIG acts as the authorization gateway.

The authentication process using SSO for a user:

Using Enterprise SSO with Kerberos

Let’s consider an enterprise whose employees working in a Windows Server domain. Windows built-in authentication using the Kerberos protocol that is used to access enterprise services.

The system architecture is as follows:

OpenAM and OpenIG Kerberos SSO Diagram

The process is similar to the example above. The difference is that OpenAM contacts the Kerberos Key Distribution Center (KDC) to authenticate users.

The authentication process from a technical point of view:

From a technical point of view, the process looks quite complex, but for the user it is as simple as possible: he simply opens the desired application in the browser and immediately gets access without any additional actions.

Federated SSO

In above examples, all services were located on the same domain. So how do you solve the problem when the services are on different domains? For instance, a supermarket chain has partnered with a grocery delivery company and wants to use their customers accounts to make deliveries.

Federated SSO is the right solution for this case.

It is a technology that allows services on different domains to use a trusted authentication service.

This approach is implemented using the federated protocols SAML, OAuth2, or OpenID Connect. Despite the differences in implementation, these protocols accomplish one task, which is to use a trusted Identity Provider for authentication.

The federation consists of two entities, the Identity Provider (IdP) and the Service Provider (SP). The IdP and SP are aware of each other and trust each other.

The architecture of the federate is as follows:

Federated SSO Diagram

OpenAM acts as an Identity Provider and the application acts as a Service Provider.

OpenAM can act as either a Service Provider or an Identity Provider. However, it is generally used as an Identity Provider.

Authentication when using federated SSO generally looks like this, regardless of the protocol used:

Conclusion

In this article we covered only the most basic ways of Single Sign-On implementation. In practice, they can be combined. For example, Kerberos authentication can be used in OpenAM for federated access to an external application via the SAML protocol.

Single Sign-On technology provides a convenient and secure way to control access to different services, whether they are sites on the same domain, corporate applications or services on different domains. Using solutions such as OpenAM and OpenIG, you can flexibly configure authentication and authorization processes, adapting them to specific business objectives. Implementing SSO not only simplifies user interaction with systems, but also increases security through centralized management.