Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
Spitfire Sprint 152
-
5
-
Spitfire
-
Orchid (R1 2023)
Description
Purpose/Overview:
Updation of MARC Bib fields controlled by related Authority records will be implemented by using Kafka messaging interaction. To perform required calls to other Folio modules while the incoming Kafka message is processing there is required to have system user with a pre-defined list of permissions.
Requirements/Scope:
- Mechanism of system user (for each tenant) creation on module enabling should be implemented
- User data:
- username: mod-entities-links
- password: mod-entities-links
- lastname: System
- list of permissions:
- TBD
- It should be able to define the system user's password via ENV variables.
- List of user permissions should be easy extendable.
Approach:
- In `afterTenantUpdate` method of the module's TenantService implement logic of system user creation.
- The logic of user creation:
- check if the user with provided username already exists in the system (GET /users endpoint with CQL-query: "username==<username>"
- If yes then update user's permissions:
- get existed user's permissions (GET /perms/users/<userId>/permissions?indexField=userId
- Verify that all required permissions are in place
- If not then update permissions (POST /perms/users/<userId>/permissions?indexField=userId
- If no:
- Create the user (POST /users)
- Save user's credentials (POST /authn/credentials)
- Create user's permissions (POST /perms/users)
- Implement mechanism of user authetication (POST /authn/login)
- Store user credentials in local cache
Acceptance criteria:
- For each tenant enabling system user is created
- Covered by unit tests
- Module documentation updated
- Logging is well-defined
TestRail: Results
Attachments
Issue Links
- has to be done before
-
MODELINKS-17 Link update: subscribe to authority update/delete event
-
- Closed
-
-
MODELINKS-18 Link update: trigger update of linked MARC bib records
-
- Closed
-
- is cloned by
-
FST-34 Implement mechanism of system user creation
-
- Closed
-
- relates to
-
FOLIO-3624 Vagrant box build failure
-
- Closed
-
-
UXPROD-2967 quickMARC | Handling linked bib/authority field updates
-
- In Review
-