Configure OIDC on Keycloak for a Web Service

This section will guide you in configuring authentication via OIDC with Keycloak.

Client Configuration

  1. Go to the "Clients" page and click on the "Create" button :

  1. Assign a name to the “Client ID” (necessary for the configuration on the BMS).

  2. Set the “Access Type” to “confidential”.

  3. Set “Service Accounts Enabled” to “true”.

  1. Add “Root URL”, “Valid Redirect URLs”, “Admin URL”, and “Web Origins” with the address of the BMS where the Web Service is located. In the example below, dev.mars :

  1. Click on “Save” at the bottom of the page.

Configuration of the Web Service Authentication for BMS

Retrieve the Client Secret

Go to the “Credentials” tab of the client and retrieve the secret (necessary for configuration in the BMS).

Retrieve the token URL

  1. Go to “Realm Settings.”

  1. Click on “OpenID Endpoint Configuration.”

  1. At the bottom of the file, locate “token_endpoint.”

  2. Copy the value to configure it in the BMS.

Configuration of the web service in the BMS

All that remains is to go to the BMS and fill in the following fields :

  • Token URL: To retrieve it, simply follow these steps.

  • Client ID: Configured during the creation of the Client.

  • Client Secret: To retrieve it, simply follow this step.

Last updated

Tous droits réservés @ 2023 dydu.