2016-05-26 16:09:04 +00:00
[[_identity_broker_overview]]
=== Brokering Overview
2017-08-28 12:50:14 +00:00
When using {project_name} as an identity broker, users are not forced to provide their credentials in order to authenticate in a specific realm.
2016-06-05 21:22:42 +00:00
Instead, they are presented with a list of identity providers from which they can authenticate.
2016-09-07 12:03:14 +00:00
You can also configure a default broker. In this case the user will not be given a choice, but instead be redirected directly to the parent broker.
2016-09-07 11:55:25 +00:00
2017-08-28 12:50:14 +00:00
The following diagram demonstrates the steps involved when using {project_name} to broker an external identity provider:
2016-05-26 16:09:04 +00:00
.Identity Broker Flow
2017-08-28 12:50:14 +00:00
image:images/identity_broker_flow.png[]
2016-05-26 16:09:04 +00:00
. User is not authenticated and requests a protected resource in a client application.
2017-08-28 12:50:14 +00:00
. The client applications redirects the user to {project_name} to authenticate.
2016-06-05 21:22:42 +00:00
. At this point the user is presented with the login page where there is a list of identity providers supported by a realm.
2016-05-26 16:09:04 +00:00
. User selects one of the identity providers by clicking on its respective button or link.
2017-08-28 12:50:14 +00:00
. {project_name} issues an authentication request to the target identity provider asking for authentication and the user
2016-05-26 16:09:04 +00:00
is redirected to the login page of the identity provider.
The connection properties and other configuration options for the identity provider were previously set by the administrator in the Admin Console.
. User provides his credentials or consent in order to authenticate in the identity provider.
2017-08-28 12:50:14 +00:00
. Upon a successful authentication by the identity provider, the user is redirected back to {project_name} with an authentication response.
Usually this response contains a security token that will be used by {project_name} to trust the authentication performed by the identity provider
2016-05-26 16:09:04 +00:00
and retrieve information about the user.
2017-08-28 12:50:14 +00:00
. Now {project_name} is going to check if the response from the identity provider is valid.
2016-05-26 16:09:04 +00:00
If valid, it will import and create a new user or just skip that if the user already exists.
2017-08-28 12:50:14 +00:00
If it is a new user, {project_name} may ask the identity provider for information about the user if that info doesn't already exist in the token.
2016-05-26 16:09:04 +00:00
This is what we call _identity federation_.
2017-08-28 12:50:14 +00:00
If the user already exists {project_name} may ask him to link the identity returned from the identity provider with his existing account.
2016-06-05 21:22:42 +00:00
We call this process _account linking_.
2017-08-28 12:50:14 +00:00
What exactly is done is configurable and can be specified by setup of <<_identity_broker_first_login,First Login Flow>> . At the end of this step, {project_name} authenticates the user and issues its own token in order to access the requested resource in the service provider.
. Once the user is locally authenticated, {project_name} redirects the user to the service provider by sending the token previously issued during the local authentication.
. The service provider receives the token from {project_name} and allows access to the protected resource.
2016-05-26 16:09:04 +00:00
There are some variations of this flow that we will talk about later.
2016-06-05 21:22:42 +00:00
For instance, instead of presenting a list of identity providers, the client application can request a specific one.
2017-08-28 12:50:14 +00:00
Or you can tell {project_name} to force the user to provide additional information before federating his identity.
2016-05-26 16:09:04 +00:00
NOTE: Different protocols may require different authentication flows.
2017-08-28 12:50:14 +00:00
At this moment, all the identity providers supported by {project_name} use a flow just like described above.
2016-05-26 16:09:04 +00:00
However, despite the protocol in use, user experience should be pretty much the same.
2017-08-28 12:50:14 +00:00
As you may notice, at the end of the authentication process {project_name} will always issue its own token to client applications.
2016-06-05 21:22:42 +00:00
What this means is that client applications are completely decoupled from external identity providers.
2016-06-01 14:16:15 +00:00
They don't need to know which protocol (eg.: SAML, OpenID Connect, OAuth, etc) was used or how the user's identity was validated.
2017-08-28 12:50:14 +00:00
They only need to know about {project_name}.