//TODO V3 is SecurityContext.getCurrent() the right way ? Does it need to be injected ?
if (connectorRuntime.isServer() &&
(securityContext = SecurityContext.getCurrent()) != null &&
(callerPrincipal = securityContext.getCallerPrincipal()) != null &&
(principalSet = securityContext.getPrincipalSet()) != null) {
AuthenticationService authService =
connectorRuntime.getAuthenticationService(rarName, poolInfo);
if (authService != null) {
prin = (ResourcePrincipal) authService.mapPrincipal(
callerPrincipal, principalSet);
}
}
if (prin == null) {