-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ALS-6235] Investigate: BDC Auth login issue: Explore delays creating the user roles #173
Commits on May 26, 2024
-
Refactor all AccessRule creation
Move AccessRule creation out to a separate method. Centralizing this will make it is to optimize more in the near future.
Configuration menu - View commit details
-
Copy full SHA for 8913d50 - Browse repository at this point
Copy the full SHA 8913d50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bf9109 - Browse repository at this point
Copy the full SHA 9bf9109View commit details -
Refactor FENCEAuthenticationService
The code changes refactor the FENCEAuthenticationService class to enhance code readability and performance. This includes introducing a new `_authZMap` for faster lookups and reorganizing methods for better code reusability.
Configuration menu - View commit details
-
Copy full SHA for d4b63a5 - Browse repository at this point
Copy the full SHA d4b63a5View commit details -
Update FENCEAuthenticationService to fetch FENCE mapping
We need to call this at least once in order to load the maps.
Configuration menu - View commit details
-
Copy full SHA for b6d53f0 - Browse repository at this point
Copy the full SHA b6d53f0View commit details
Commits on May 27, 2024
-
Refactor FENCE mapping to a separate utility
A new utility class (FenceMappingUtility) has been introduced to handle FENCE mapping operations. The FenceMappingUtility is now used for FENCE mapping in FENCEAuthenticationService and StudyAccessService instead of these classes handling it directly. This change makes the applications more modular, distributes responsibilities better among classes, and improves code readability.
Configuration menu - View commit details
-
Copy full SHA for c052b24 - Browse repository at this point
Copy the full SHA c052b24View commit details -
Improve thread safety in FenceMappingUtility.java
In the FenceMappingUtility class, the data structures have been updated to improve the thread safety of the application. The non-thread-safe HashMap was replaced with ConcurrentHashMap to handle potential concurrency issues. To further strengthen thread safety, the 'volatile' keyword was added to provide the most recent value whenever a variable is called, directly addressing potential issues with thread caching. The method 'initializeFENCEMappings' was also modified to use a parallel stream for efficient data processing.
Configuration menu - View commit details
-
Copy full SHA for b27f6a4 - Browse repository at this point
Copy the full SHA b27f6a4View commit details -
Refactor FENCEAuthenticationService
Refactor upsertTopmedPrivilege to improve readability and make future improvements easier. Refactor getAllowedQueryTypeRules to cache fence_allowed_query_types.
Configuration menu - View commit details
-
Copy full SHA for 57cc068 - Browse repository at this point
Copy the full SHA 57cc068View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0c713a - Browse repository at this point
Copy the full SHA d0c713aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8884d2 - Browse repository at this point
Copy the full SHA f8884d2View commit details -
Refactor addStandardAccessRules method for null safety
A null-check has been added before using the standardAccessRules variable to safeguard against potential NullPointerException. The logic has also been reconsidered, and now it only attempts to populate the standardAccessRules set from the database if it is found to be empty or null. This should enhance efficiency by avoiding unnecessary database calls.
Configuration menu - View commit details
-
Copy full SHA for 2f52314 - Browse repository at this point
Copy the full SHA 2f52314View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccb22c7 - Browse repository at this point
Copy the full SHA ccb22c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 048af4f - Browse repository at this point
Copy the full SHA 048af4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f18bda - Browse repository at this point
Copy the full SHA 2f18bdaView commit details -
Refactor role creation and update process for efficiency
The role creation and assignment process has been optimized in the FENCEAuthenticationService. Rather than processing roles one-by-one, the revised code collects all the role names, prepares a list of roles, and commits them all at once to the repository. This is achieved by leveraging Java's parallel streams and the 'persistAll' method added to RoleRepository.
Configuration menu - View commit details
-
Copy full SHA for cdb7a5b - Browse repository at this point
Copy the full SHA cdb7a5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd7ff13 - Browse repository at this point
Copy the full SHA dd7ff13View commit details -
Add validation for empty role name in createRole method
A check has been added in the createRole method to handle the situation when the role name is empty. It prevents the creation of roles with empty names, logging an error message
Configuration menu - View commit details
-
Copy full SHA for 90cd3c0 - Browse repository at this point
Copy the full SHA 90cd3c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6702417 - Browse repository at this point
Copy the full SHA 6702417View commit details -
Configuration menu - View commit details
-
Copy full SHA for daa8bd8 - Browse repository at this point
Copy the full SHA daa8bd8View commit details -
Update RoleRepository to handle existing roles
The persistAll method in the RoleRepository has been updated. This change ensures that if a role already has a UUID, it is merged instead of persisted, preventing any duplicate entries. New roles, which do not yet have a UUID, are persisted as before.
Configuration menu - View commit details
-
Copy full SHA for 4424f17 - Browse repository at this point
Copy the full SHA 4424f17View commit details -
Refactor FENCEAuthenticationService for optimized role handling
FENCEAuthenticationService.java has been refactored to improve role handling. The logic is now more precise and efficient in checking the existence of roles, adding new ones, and removing obsolete ones. It ensures correct persistence of roles while providing better error handling and logging.
Configuration menu - View commit details
-
Copy full SHA for 3277195 - Browse repository at this point
Copy the full SHA 3277195View commit details -
Remove redundancy in role handling of FENCEAuthenticationService
The previous code used to find roles that aren't present in a user's existing roles, but the following logic left it unused. Thus, this redundancy has been removed, streamlining the process of handling roles in the FENCEAuthenticationService class.
Configuration menu - View commit details
-
Copy full SHA for 7dc4be8 - Browse repository at this point
Copy the full SHA 7dc4be8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6334c4 - Browse repository at this point
Copy the full SHA b6334c4View commit details
Commits on May 28, 2024
-
Remove performance timing from FENCEAuthenticationService
Performance timing for user login within the FENCEAuthenticationService was removed to clean up the code. This logging was unnecessary and did not contribute in any significant manner to the overall functionality.
Configuration menu - View commit details
-
Copy full SHA for 67e3754 - Browse repository at this point
Copy the full SHA 67e3754View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e17cf6 - Browse repository at this point
Copy the full SHA 2e17cf6View commit details