code: public UUID getUserKeycloakId(User user) {
      AuthSource authSource = authSourceDAO.findByStrategy(KEYCLOAK_AUTH_SOURCE);
      if (authSource == null) {
        logger.error("Could not find Keycloak auth source");
      }
      
      List<UserIdentification> userIdentifications = userIdentificationDAO.listByUserAndAuthSource(user, authSource);
      if (userIdentifications.size() == 1) {
        return UUID.fromString(userIdentifications.get(0).getExternalId());
      }
      
      if (userIdentifications.size() > 1) {
        logger.warn("User {} has more than one identity", user.getId());
      }
      
      return new UUID(0L, 0L);
    }
docs: Returns Keycloak id for an user
  
  @param user user
  @return Keycloak id or null if id could not be resolved