mod-kb-ebsco-java can not work with the Eureka Keycloak clients due to the absence of the user_id field in x-okapi-token

Description

The Eureka platform supports two authorization methods: ordinary users and Keycloak clients.

In the case of Keycloak clients, the folio-holdingsiq-client encountered a problem when the user_id was missing from the x-okapi-token. This resulted in a failure while trying to store the configuration in the cache because it requires the format user_id: Configuration_class_object, and the key cannot be null. Consequently, this leads to the following error during the request.

The error happens here

x-okapi-token example:


You should change that behavior to meet the Eureka platform needs.

  1. Update: The issue appears on any environment at any time with the Keycloak client credentials token.

    To reproduce:
    1. Request the following endpoint to get the client credentials.
    https://<keycloak-url>/realms/<tenant_name>/protocol/openid-connect/token
    The body should contain the
    client_id: <SOME_CLIENT_ID>
    client_secret: <SOME_CLIENT_SECRET>
    grant_type: "client_credentials"

  2. Request the following endpoint with the previously obtained credentials putting them in the header with the Authorization key.
    https://{{kong_fqdn}}/eholdings/kb-credentials/80898dee-449f-44dd-9c8e-37d5eb469b1d
    and with the following body

the content type should be the following application/vnd.api+json

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

6

Checklist

hide

Activity

Show:

Valery_Pilko February 24, 2025 at 10:06 AM

Verified in the scope of MODKBEKBJ-777

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Sunflower (R1 2025)

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created February 17, 2025 at 1:33 PM
Updated February 28, 2025 at 10:09 AM
Resolved February 24, 2025 at 5:03 PM
TestRail: Cases
TestRail: Runs