mod-erm-usage-harvester - add support for disabling system user creation/mgmt/use

Description

Background:We agreed to allow system/tenant users to be specified declaratively in module descriptors.  The manager components would be responsible for creating the users and assigning the appropriate roles/capabilities.  However, modules (mod-search, mod-pubsub, etc.) have not yet been updated to remove/disable the code which creates and manages system users.  This system user creation by the modules is causing problems for the FSE team since these modules expect mod-permissions to be available so permissions can be assigned to the newly created system users.   As it turns out we still have mod-permissions in the system.  We need it for migration purposes.  However, mod-permissions' tenant-permissions API is not being called by any of our components (it is called by OKAPI on the legacy platform).  This means that when modules try to assign permissions to their system users, in some cases (e.g. a fresh system) mod-permissions is unaware that those permissions even exist. The decision was made to add an environment var should be added to the modules which conditionalizes the relevant code (For creation, mgmt, and use of system users). This work will be done in the community repositories as feature branches, and will not be merged to master until Eureka code is open sourced. Purpose:This functionality is implemented for the RMB-based mod-pubsub in scope of US1182725: mod-pubsub - add support for disabling system user creation/mgmt/use.  This story is to implement the same functionality in the RMB-based mod-erm-usage-harvester. Scope:Implement the ability to conditionally create/manage/use system users (controlled via environment variable) in mod-erm-usage-harvesterUpdate tests and README as neededThis work is planned to happen after the Eureka code has been open-sourced, so it can be handled in a standard way, being merged to master instead of a long-lived feature branch.

Environment

None

CSP Request Details

None

CSP Rejection Details

None

Estimation Notes and Assumptions

None

RCA Group Details

None

Potential Workaround

None

Attachments

1
  • 10 Sep 2024, 01:27 PM

Checklist

hide

TestRail: Results

Activity

Show:

Yauhen ViazauSeptember 10, 2024 at 1:28 PM
Edited

Tested harvesting on Snapshot-1 (https://folio-snapshot.dev.folio.org/ ) - works as expected Check Mark

As has been clarified by Tino Ryll from Leipzig team, to test this functionality, the following precondition must be met:

  • Existing user credentials mod-erm-usage-harvester/mod-erm-usage-harvester with ermusageharvester.start permission

Testing:

  1. Created harvesting user and assigned permission (see above)

  2. Configured harvesting schedule at https://folio-snapshot.dev.folio.org/settings/eusage/periodic-harvesting

  3. Reviewed harvesting logs at https://folio-snapshot.dev.folio.org/eusage/jobs

Harvesting was finished successfully. See example:

image-20240910-132306.png

Yauhen ViazauSeptember 9, 2024 at 10:02 AM
Edited

- I think we need to check that the functionality related to mod-erm-usage-harvester is still working as expected on Snapshot after this update. Could you please advise on what can be tested, and are there any test cases created for that? It looks like our QA team is not aware of how to check it.

Natalia ZaitsevaDecember 31, 2023 at 3:52 PM

Question:  Do we need a corresponding JIRA for this?

Natalia ZaitsevaDecember 31, 2023 at 3:52 PM

The ability to conditionally create/manage/use system users (controlled via environment variable) in mod-erm-usage-harvesterThe implementation is consistent with other modulesTests and README have been updated 

Done

Details

Assignee

Reporter

Development Team

Eureka

Story Points

Sprint

Priority

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created December 31, 2023 at 3:52 PM
Updated September 16, 2024 at 12:16 PM
Resolved September 16, 2024 at 12:16 PM
TestRail: Cases
TestRail: Runs

Flag notifications