FQM sends multiple tenant headers when retrieving entity type permissions

Description

In , it was discovered that mod-fqm-manager is sending requests to mod-roles-keycloak with multiple x-okapi-tenant headers (with different case on the headers), which causes problems. We need to not do that.

As part of this, let’s switch the tenant header in ModPermissionsClient and ModRolesKeycloakClient to all lower-case (using the headers defined in XOkapiHeaders from folio-spring-base) and switch to the CrossTenantClient configuration, so that we only send the one tenant header

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

Activity

Show:

Kathleen MooreDecember 17, 2024 at 10:46 PM
Edited

confirmed cross-tenant queries are now working as expected in Eureka ECS bugfest + Okapi ECS bugfest

will you please add a fix version and RCA?

Emma_HaroyanDecember 17, 2024 at 2:54 PM

Works as expected on Eureka ECS BF.

All related tickets are also fixed.

Yogesh KumarDecember 17, 2024 at 2:00 PM

- What is the status of this ticket on the EUREKA ECS BF environment?

Emma_HaroyanDecember 15, 2024 at 7:20 PM

I am moving the ticket to “In review”, as , and looks good on Eureka ECS Snapshot.

Matt WeaverDecember 13, 2024 at 4:34 PM

This was blocked due to environment issues. We’ve got a working env again, and so I was finally able to test and merge this. This ticket addresses the underlying issue from , so it can be tested in the same way: cross-tenant queries should work for non-admin users (also, stuff like the value dropdown should work again).

For my own testing, I created a new user in the Corsair edev env (mweaver/folio) in the central tenant with an affiliation in a member tenant. I also added all of the Lists and FQM permissions (I created a “Lists (all)” role for this), along with the cataloguer role. With this setup, I was able to reproduce the original error. After deploying the fix from this ticket’s branch, the error went away.

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Corsair

Fix versions

Release

Ramsons (R2 2024) Bug Fix

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created December 10, 2024 at 6:40 PM
Updated December 19, 2024 at 2:44 PM
Resolved December 16, 2024 at 4:23 PM
TestRail: Cases
TestRail: Runs