docs: private static void addUniqueIdAndGroupsForUser(String securityName,
                                                      Hashtable<String, Object> credData, String appRealm) // 675924
      throws WSSecurityException, RemoteException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "addUniqueIdAndGroupsForUser", securityName);
          }
  
          GetRegistry action = new GetRegistry(appRealm);
          UserRegistry registry = null;
          try {
              registry = AccessController.doPrivileged(action);
          } catch (PrivilegedActionException pae) {
              Exception ex = pae.getException();
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                  Tr.exit(tc, "addUniqueIdAndGroupsForUser");
              }
              if (ex instanceof WSSecurityException) {
                  throw (WSSecurityException) ex;
              } else { // This means an unexpected runtime exception is wrapped in the PrivilegedActionException
                  throw new WSSecurityException(ex);
              }
          }
          if (registry.isValidUser(securityName)) {
              String uniqueId = registry.getUniqueUserId(securityName);
              String uidGrp = stripRealm(uniqueId, appRealm); // 669627 // 673415
  
              List<?> groups = null;
              try {
                  groups = registry.getUniqueGroupIds(uidGrp); // 673415
  
              } catch (EntryNotFoundException ex) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Exception is ", ex);
                  Tr.warning(tc, "NO_GROUPS_FOR_UNIQUEID_J2CA0679", uidGrp); // 673415
              }
              updateCustomHashtable(credData, appRealm, uniqueId, securityName, groups);
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "Added uniqueId: " + uniqueId + " and uniqueGroups: "
                               + groups);
          } else {
              String message = getNLS()
                              .getFormattedMessage("INVALID_USER_NAME_IN_PRINCIPAL_J2CA0670",
                                                   new Object[] { securityName },
                                                   "J2CA0670E: The WorkManager was unable to establish the security context for the Work instance, " +
                                                                   "because the resource adapter provided a caller identity " + securityName
                                                                   + ", which does not belong to the security " +
                                                                   "domain associated with the application.");
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                  Tr.exit(tc, "addUniqueIdAndGroupsForUser");
              }
              throw new WSSecurityException(message);
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "addUniqueIdAndGroupsForUser");
          }
      }