Skip to content
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

Merged
merged 24 commits into from
May 28, 2024

Commits on May 26, 2024

  1. 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.
    Gcolon021 committed May 26, 2024
    Configuration menu
    Copy the full SHA
    8913d50 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bf9109 View commit details
    Browse the repository at this point in the history
  3. 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.
    Gcolon021 committed May 26, 2024
    Configuration menu
    Copy the full SHA
    d4b63a5 View commit details
    Browse the repository at this point in the history
  4. Update FENCEAuthenticationService to fetch FENCE mapping

    We need to call this at least once in order to load the maps.
    Gcolon021 committed May 26, 2024
    Configuration menu
    Copy the full SHA
    b6d53f0 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    c052b24 View commit details
    Browse the repository at this point in the history
  2. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    b27f6a4 View commit details
    Browse the repository at this point in the history
  3. Refactor FENCEAuthenticationService

    Refactor upsertTopmedPrivilege to improve readability and make future improvements easier. Refactor getAllowedQueryTypeRules to cache fence_allowed_query_types.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    57cc068 View commit details
    Browse the repository at this point in the history
  4. Remove duplicate method

    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    d0c713a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f8884d2 View commit details
    Browse the repository at this point in the history
  6. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    2f52314 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ccb22c7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    048af4f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2f18bda View commit details
    Browse the repository at this point in the history
  10. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    cdb7a5b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    dd7ff13 View commit details
    Browse the repository at this point in the history
  12. 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
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    90cd3c0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6702417 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    daa8bd8 View commit details
    Browse the repository at this point in the history
  15. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    4424f17 View commit details
    Browse the repository at this point in the history
  16. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    3277195 View commit details
    Browse the repository at this point in the history
  17. 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.
    Gcolon021 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    7dc4be8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    b6334c4 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. 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.
    Gcolon021 committed May 28, 2024
    Configuration menu
    Copy the full SHA
    67e3754 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2e17cf6 View commit details
    Browse the repository at this point in the history