class InstanceZTSProvider implements InstanceProvider {

    boolean validateSanUri(final String sanUri, final String hostname) {

        LOGGER.debug("Validating sanUri: {}, hostname: {}", sanUri, hostname);

        if (sanUri == null || sanUri.isEmpty()) {
            LOGGER.info("Request contains no sanURI to verify");
            return true;
        }

        for (String uri: sanUri.split(",")) {
            int idx = uri.indexOf(URI_HOSTNAME_PREFIX);
            if (idx != -1) {
                if (!uri.substring(idx + URI_HOSTNAME_PREFIX.length()).equals(hostname)) {
                    LOGGER.error("SanURI: {} does not contain hostname: {}", sanUri, hostname);
                    return false;
                }
            }
        }

        return true;
    }

}