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

8

Checklist

hide

Activity

Show:

Valery_Pilko February 24, 2025 at 10:06 AM

Verified on Eureka Snapshot environment:

  • User can create/update/delete Knowledge base with valid credentials

     

  • eHoldings app is working:

Khalilah Gambrell February 14, 2025 at 1:19 PM

Changed priority because team is unclear why this is a P1.

Vasyl Avramenko February 14, 2025 at 1:00 AM
Edited

Hello .
1. I was told by that this operation don’t perform on Eureka Bugfest. They simply don’t need it because already have the following record in the underlying dataset.

  1. The Eureka snapshot, along with the Eureka and OKAPI team environments, lacks the underlying dataset; it only contains sample data provided during the application entitlement process. Therefore, this endpoint should be requested to gather necessary information unlike the sprint testing and bug fest.

  2. This issue was discussed in the Team chat which involved several people from different teams, including Spitfire () and Eureka ( ). The final conclusion was the same.

  3. The issue could easily be reproduced on any environment by invoking the PUT request to the /eholdings/kb-credentials/80898dee-449f-44dd-9c8e-37d5eb469b1d endpoint.

  4. In this task description, I detailed the specific piece of code where this occurs. To demonstrate this, I debugged the module code using Telepresence.

Khalilah Gambrell February 13, 2025 at 10:42 PM

Hey - I do not understand

  1. Is not LOC using eholdings app on the production Eureka - ECS environment?

  2. I am 100% positive that the eholdings app was tested and is available on Eureka ECS/non-ECS bugfest environment.

  3. So I do not understand why it is working in Eureka bugfest environments and not on Eureka snapshot and sprint environments.

  4. Is it possible to ask the Eureka team or EBSCO FSE team to investigate this issue?

  5. Also can the description be updated to describe the problem and what environments are impacted?

Pavlo Smahin February 12, 2025 at 11:11 AM

, I think you shouldn’t post credentials here.

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 12, 2025 at 1:30 AM
Updated March 10, 2025 at 3:12 PM
Resolved February 26, 2025 at 12:11 PM
TestRail: Cases
TestRail: Runs