Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-13439

Change client-side filtering of IdentityProviderEntity by id or alias. Do not use loops

    Details

    • Type: Enhancement
    • Status: Triage (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.0.2
    • Fix Version/s: None
    • Component/s: Core, Database
    • Labels:
      None
    • Estimated Difficulty:
      Low
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Within the org.keycloak.models.jpa.RealmAdapter, whenever fetching a IdentityProviderEntity by alias or by id, replace the logic of

      • realm.getIdentityProviders -> loop over all entities within java -> find and return the entity matching the id
        with a faster and more memory-efficient
      • entitymanager.findbyid
        Similarly, for alias (there is a already a namedquery in IdentityProviderEntity for that)
      • abolish the loops client -side (java)
        instead
      • use the "findIdentityProviderByAlias" with entity manager to fetch a single one by alias.

      Find by id (or by alias, which is indexed as well), should not be implemented by looping all entities on "java side" in any case

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                laskarisn Nikolas Laskaris
                Involved:
                Nikolas Laskaris
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: