public Cluster getCluster() {
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    if (authentication == null) {
      return null;
    }

    if (authentication instanceof OAuth2AuthenticationToken) {
      return getClusterWithAuthenticationToken((OAuth2AuthenticationToken) authentication);
    }

    return getClusterWithUserNameAndPassword(authentication.getName(), null);
  }
this will return a cluster already connected to the geode jmx manager for the user in the
request
<p>
But for multi-user connections to gemfireJMX, i.e pulse that uses gemfire integrated security,
we will need to get the username from the context
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/Repository.java