Cloud Software Group, Inc. EBX®
Documentation > Administration Guide > Installation & configuration
Navigation modeDocumentation > Administration Guide > Installation & configuration

User authentication

The /ebx-authentication servlet

The /ebx-authentication servlet is the central point handling the user authentication in EBX®. Its role is to:

Furthermore, depending on the configuration, it can also:

The authorization token

When the /ebx-authentication servlet successfully authenticates a user, it creates a token containing the authentication information and stores it in a session cookie.

This means that the authorization is shared between all the browser tabs:

Cookie properties

The cookie containing the token has the following properties:

HttpOnly

Not customizable. The cookie can't be read by javascript code in the browser.

Secure

Customizable via the property ebx.security.authorizationCookie.attribute.secure in ebx.properties. Defines if the cookie can be sent over HTTPS only, or if it can also be sent over HTTP.

SameSite

Customizable via the property ebx.security.authorizationCookie.attribute.sameSite in ebx.properties. Defines if the cookie can be sent when browsing from an external site.

Customizing the authentication process

By default, EBX® uses a built-in directory and built-in login page. It is strongly recommended to replace the built-in directory by a custom one.

Customizing the directory

While EBX® provides a built-in directory, it is strongly recommended to replace it:

  1. Create a class overriding Directory.

  2. Create a class overriding DirectoryFactory.

  3. Use the property ebx.directory.factory in ebx.properties to declare the factory.

Customizing the login page

While EBX® provides a built-in login page, it is possible to replace it. To do so, use the property ebx.security.loginPage.url in ebx.properties to declare the custom login page.

It is up to the custom login page to authenticate the user. Once the user is authenticated, he should be redirected to the /ebx-authentication/login page. Then, EBX® will call the Directory.authenticateUserFromHttpRequest method before creating an authorization token. The following points are required for this to work:

Note

When EBX® redirects the user to the custom login page, it also adds a resume query parameter to the URL. This resume query parameter contains an URL pointing to /ebx-authentication/login with some additional parameters and should be used in priority to redirect the user to /ebx-authentication/login after the authentication succeeds.

Single Sign-On (SSO)

Single sign-on allows users to authenticate once and gain access to multiple applications and services through a centralized Identity Provider (IdP) rather than managing separate login credentials. This integration streamlines the login process, reduces the risk of password-related security breaches, and enhances user experience by enabling seamless access.

/directory-sso-schema.png

EBX® supports the SAML 2.0 and OpenID Connect protocols. To enable these features, you must declare and configure EBX® as an application in the Identity Provider. Configuration requirements depend on the enabled protocol. When using SAML 2.0, an sp-descriptor.xml is generated on startup and should be imported in the Identity Provider to ensure a seamless configuration.

Note

Only one protocol can be configured at a time.

Note

The logout process initiated from the IdP will only apply to the browser used to log out.

Note

In the case of a reverse-proxy configuration, the base URL of the server should be configured in the properties of both protocols.

The endpoints used to initiate a login/logout via the configured protocol are:

http[s]://<host>[:<port>]/ebx-authentication/rest/sso/v1/login

Note

A resume query parameter can be used to hold an encoded URL to which the client should be redirected once authentication is completed.

http[s]://<host>[:<port>]/ebx-authentication/rest/sso/v1/logout

If there is a need to access or redirect to the built-in or custom login page that uses the internal directory, the following url may be used:

http[s]://<host>[:<port>]/ebx-authentication/login?method=loginPage

SAML 2.0

To enable SAML 2.0, configure the service provider properties or EBX® Container Edition environment variables and have a keystore, idp-descriptor.xml and sp-descriptor.xml in the repository folder.

The configured nameId is extracted from the assertion and matched with the EBX® directory to authenticate the user. Therefore, it's crucial to precisely configure the nameId attribute or the format.

The same endpoint is used for both assertion consumer and single logout services:

http[s]://<host>[:<port>]/ebx-authentication/rest/sso/v1/saml2/callback

Note

A property change triggers the generation of a new sp-descriptor.xml and the loading of the existing keystore.jks and idp-descriptor.xml.

OpenID Connect

To enable OpenID connect, configure the client properties or for EBX® Container Edition the environment variables. When using OpenID:

The same endpoint is used for both redirect and logout operations:

http[s]://<host>[:<port>]/ebx-authentication/rest/sso/v1/oidc/callback

Documentation > Administration Guide > Installation & configuration