Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-7760

json/sessions?_queryID=all retrieves wrong session count

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 11.0.0, 11.0.1, 11.0.2, 11.0.3, 12.0.0, 12.0.1, 12.0.2
    • Fix Version/s: None
    • Component/s: rest
    • Labels:
    • Environment:
      Java 7, Tomcat 7, OpenAM 12.0.2 multi-instance
    • Support Ticket IDs:

      Description

      When an OpenAM site is configured the REST call

      curl --request GET --header "Content-Type: application/json" --header "iplanetDirectoryPro: SOME_ADMIN_TOKEN_ID" http://openam.test.xyz:8080/openam1202/json/sessions?_queryID=all
      

      returns incorrect number of sessions because it queries the SessionServices of all OpenAM sites and OpenAM instances.

      This is due to

      org.forgerock.openam.forgerockrest.session.SessionResource.java
          /**
           * Returns a collection of all Server ID that are known to the OpenAM instance.
           *
           *  @return A non null, possibly empty collection of server ids.
           */
          public Collection<String> getAllServerIds() {
              try {
                  return WebtopNaming.getAllServerIDs();
              } catch (Exception e) {
                  LOGGER.error("SessionResource.getAllServerIds() :: WebtopNaming throw irrecoverable error.");
                  throw new IllegalStateException("Cannot recover from this error", e);
              }
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peter.major Peter Major [X] (Inactive)
                Reporter:
                bthalmayr Bernhard Thalmayr
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: