Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-6959

Cache CA name lookup in RoleMembers page view scope

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.8.0
    • Fix Version/s: EJBCA 6.14.0
    • Component/s: CA GUI
    • Labels:
      None
    • Stakeholder:
      Customer
    • Issue discovered during:
      Customer
    • Sprint:
      EJBCA Sprint 14

      Description

      The RoleMember page in the Admin GUI does not work well for a non-trivial number of CAs and RoleMembers using the X509Certificate matching.

      Simplified call stack that causes all CAs to be re-read on every RoleMember row:

      modules/admin-gui/resources/administratorprivileges/rolemembers.xhtml
      <h:outputText value="#

      {roleMembersBean.getTokenIssuerIdString(roleMember)}

      "/>

      modules/admin-gui/src/org.ejbca.ui.web.admin.administratorprivileges.RoleMembersBean.getTokenIssuerIdString(RoleMember)

      modules/cesecore-ejb/src/org.cesecore.certificates.ca.CaSessionBean.getCAIdToNameMap()

      modules/cesecore-ejb/src/org.cesecore.certificates.ca.CaSessionBean.findAll() :
      public List<CAData> findAll()

      { final TypedQuery<CAData> query = entityManager.createQuery("SELECT a FROM CAData a", CAData.class); return query.getResultList(); }

      Attaching a patch for a local fix to cache the lookup in the ViewScope (e.g. stays the same as long as the admin stays on the page).

      A more proper fix (and also more complex to test) should consider caching this in the lower layers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                johan Johan Eklund
                Reporter:
                johan Johan Eklund
                Verified by:
                Tomas Gustavsson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Time Spent - 4 minutes Remaining Estimate - 3 hours, 56 minutes
                  3h 56m
                  Logged:
                  Time Spent - 4 minutes Remaining Estimate - 3 hours, 56 minutes
                  4m