Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4496

UserPrincipal lookup in the JAAS' BackingEngine

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0, 4.1.5
    • Component/s: karaf
    • Labels:

      Description

      I have a suggestion for improving org.apache.karaf.jaas.modules.BackingEngine

      Currently, the only way to lookup an individual user (as far as I can tell) is to iterate through the result of BackingEngine#listUsers() and find the required user. This is fine if the number of users is reasonably low. However, when JAAS infrastructure is used for public systems (say, a SaaS), it quickly becomes a bottleneck.

      I suggest adding something like `public UserPrincipal lookupUser(String name)` to avoid this problem (also, it should return `null` if no such user found , or throw an exception)

      I am happy to contribute a PR promptly if this change will be approved.

      Thoughts?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                yrashk Yurii Rashkovskii
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: