Authentication and authorization process
Figure 1. Authentication and authorization process |
Process Steps
Discovery (Missing from the diagram, first step before authentication)
Discovery means determining the correct authentication method for the user presented. This can be based on information we know about the user before authentication, such as IP address, or a user selection or can be determined by the requesting application. The application that the user is trying to access also determines what type of authentication is required.
Authentication
Here we authenticate the user using the chosen technique. Some authentication methods are built-in to the system and others are made through calls to external services. The authentication method used sets the level of assurance for the user identities – that is how much we can be sure about who the user is. Authentication methods can be group into logical sets and presented to the user in a chosen order and grouped for easy selection. Some authentication methods stop the user and ask for information, such as username and password, whilst others occur silently, without interrupting the user, such as Windows SSO.
Method Attribute Mapping
Using the attributes returned from the authentication provider, we can rename and modify the attributes into a format that application can use. This helps to standardize the attributes returned from various services to make rule processing easier. Backend services can be used to assist in the method attribute mapping, if required. Method Attribute Mapping is optional and this stage can be skipped if not required.
Directory User Mapping
In many cases the user has an existing account. Directory User Mapping is used to search for the user from the chosen user directory. After a match is found, all of the user record attributes are also available to the Identity Broker Engine. Directory User Mapping is optional and this stage can be skipped if not required.
Identity Creation
Now that these steps have been completed, a session is created. The steps before this step are not required to be repeated if the user attempts to access a subsequent application. In that case, the process starts from here. In a browser situation, a reference to the session is done by cookie or session tokens.
For every application the user accesses, the following steps are performed:
Group Mapping
Based on all of the information available, the user belongs to various access control groups. These stage evaluates all of the group memberships dynamically. These are checked each time, as the user may have been removed or added to an access control group since the previous application access. Group Mapping is very flexible and is explained in depth later.
Access Control
For every application, we check that this user belongs to a group on the "Allowed To" access control group list. If not, access to the application is denied. Furthermore, we evaluate that the user has all required mandatory attributes that the application demands.
Authorization Policy (Attribute release by authorization policy)
The Authorization policy defines what attributes are sent to a given application and in what format. The user's group membership helps to determine the format. The attribute release can also be dynamic, using an extensible Authorizer component. To protect user's privacy, only the specified attributes are sent.
Examples
Example 1 - A user is logging in to salesforce using a smart card.
Discovery
We use the IP address of the user to automatically determine that he or she is a local network user.
Authentication
we check the user identity using the smart card.
Method Attribute Mapping
We select one or more user attributes from the certificate on the card and discard others.
Directory User Mapping
We use the selected attribute, such as the serial number of the card, to find the user in the company Active Directory.
Identity Creation
Now the identity has been created
Session Creation
The Session is created
Group Mapping
We can look at group information from external directories, such as the Active Directory memberships or create dynamic group membership based on which authentication method was used.
Access Control
For the salesforce application, we check that the user belongs to a group that is allowed to access the SalesForce application. The user is on the sales team according to the Active Directory, and so will be granted access to SalesForce.
Attribute Release via the Authorization Policy
SalesForce requires that the user's email address is sent alongside basic contact information. We retrieve these attributes from the session and present them to Salesforce in the correct format.
Example 2 - An external user is logging in to a custom B2B business application using SMS or printed one-time password list.
Discovery
The user enters a user name and password and is presented with the two possible options, SMS or printed one-time password list and chooses themselves. The user chooses SMS.
Authentication
We send a one-time password by SMS to the user and the user enters the one time password to complete the authentication.
Method Attribute Mapping
This stage can be skipped if not required.
Directory User Mapping
This user has been identified in the CustomerID directory during authentication and now all of the attributes are available for further processing.
Identity Creation
Now the identity has been created
Session Creation
The session has been created
Group Mapping
We can look at group information from CustomerID to assign various roles to the user.
Access Control
For the custom B2B application, we check that the user has the required application role.
Attribute Release via the Authorization Policy
The custom B2B application needs the user's email, first name, last name, customer number and roles that are related to this application. We present them to Salesforce in the correct format.