Configuring Predefined Clients¶
Configuring the Redirection URL in the Identity Provider¶
In the identity provider, configure the URLs for redirecting.
-
In your Web browser, open the Keycloak user interface: https://localhost:32769
-
Open the
Administration Console
. -
Log on with the pre-configured
admin
user andSealAdmin1
password. -
In the
Configure
menu on the left, selectClients
to open the client list. -
In the
Client ID
column, select the following clients one by one:seal-mobile-print
seal-opcli
seal-plossysadmin
seal-plossyscli
seal-print-client
-
In
Valid Redirect URIs
, replacelocalhost
with the server name on which the selected client is installed.with: -
Valid Redirect URIs
: URLs to which the user is redirected after a successful logon.Example
- PLOSSYS Administrator redirects to Keycloak to do the authentication.
- Authentication in Keycloak
- Keycloak redirects back to PLOSSYS Administrator.
Caution - lower case
The server name in
Valid Redirect URIs
has to be specified in lower case. -
In
Web Origins
, enter the same server name as used inValid Redirect URIs
.with: -
Web Origins
: URLs for which Cross-Origin Resource Sharing (CORS) is allowed. -
Save the settings.
Background Knowledge¶
JSON Web Token¶
The clients receive the user's identity encoded in a secure JSON Web Token (JWT), named ID token. It is issued by the identity server, here Keycloak, and obtained via standard OAuth 2.0 Code Flow supporting Web applications.
For example, a JWT contains:
{
"name": "hugo",
"preferred_username": "Hugo",
"given_name": "Hugo",
"family_name": "",
"email": "hugo@sealsystems.de",
"iat": 1546860576,
"exp": 1572780576,
"iss": "http://<server_name>:32768/auth/realms/seal-operator",
"sub": "hugos-id"
}
Relationship Between the Settings¶
The issuer property (iss
) in the ID token is a unique name created by the identity provider. Its value is an arbitrary string, which differs for each identity provider and has to be determined individually.
If you use Keycloak as identity provider, the value contains the URL by which the service can be accessed over the network. Therefore, the value in the example above will change, if the service is accessed from a different machine than localhost.
Caution - identical configurations
For security reasons, the ID_PROVIDER_NAME
configuration in the above example has to be identical to the iss
entry in the ID token and has to be configured appropriatley.
The AUTH_ISSUER_URL
contains a URL pointing to the address by which the identity server can be accessed over the network.
If you use Keycloak as identity provider, the value in AUTH_ISSUER_URL
is identical to the one in ID_PROVIDER_NAME
.