Stateless Authentication Recap
Here’s how Cloudentity supports the authentication flow in a nutshell:
- The user launches an application (with an OAuth client).
- To get access to APIs, the application requests a token from Cloudentity.
- Cloudentity calls IDP to enable the user to log in.
- The user gets authenticated.
- IDP responds to Cloudentity with information including the user attribute.
- Cloudentity maps the feedback data from IDP and issues a token.
Since Cloudentity is stateless by default and caches no user’s data, it needs to call IDP every time the user wants to re-authenticate during one session to, for example, request another scope.
Stateful Authorization with Cloudentity
The stateful authorization feature allows to store the user’s authentication data, including the login status, locally in Cloudentity. With this feature enabled, Cloudentity can cache the user’s data and issue multiple tokens during one user’s session without re-authenticating the user.
With the stateful authorization, the efficiency of issuing tokens in Cloudentity is significantly improved by minimizing latency and performance degradation related to repetitious calls to IDPs.
Dynamic Auth Flows
Recent trends in standards for the token-based access control show the inclination to the fine-grained token issuance and starts favoring short-lived tokens issued for a specific purpose.
The use of the stateful authorization is particularly vital in the context of dynamic authN/authZ flows. The dynamic flows, as opposed to traditional ones, can support multiple access tokens per client application’s session. In the traditional flows, the client requests a token when the user launches the app and continues with this token and its initial list of scopes. In the dynamic flows, during one session, the client application can requests multiple tokens: each for accessing a different application component. This so called intent-based authentication often supports online payment services and the use of dynamic scopes.
Enable Stateful Authz in Cloudentity
In Cloudentity, the stateful authorization feature is disabled by default.
In the Cloudentity portal, you can enable the stateful authorization per IDP and configure for how long the user’s data stay cached in Cloudentity. To leant how to make this feature work in Cloudentity, either see the video or study the instruction.
Select Identity Data > Identity Providers from the sidebar.
In the Identities view, select an identity provider (IDP) that you want to configure.
Select the Authentication Context Caching toggle.
Set the time for keeping the user’s data cached in Cloudentity.
Set a non-zero value for the time. Otherwise, the feature gets disabled automatically.