code: private String getServerPrincipal(String principal, String host) throws IOException {
          return SecurityUtil.getServerPrincipal(principal, host);
      }
docs: Return a server (service) principal.  The token "_HOST" in the principal will be replaced with the local host
  name (e.g. dgi/_HOST will be changed to dgi/localHostName)
  @param principal the input principal containing an option "_HOST" token
  @return the service principal.
  @throws IOException