private static Optional<String> getLastSegmentFromSanUri(List<SubjectAlternativeName> sans, String uriPrefix) {
        return sans.stream()
                .filter(san -> {
                    if (san.getType() != Type.URI) return false;
                    return san.getValue().startsWith(uriPrefix);
                })
                .map(san -> {
                    String uriPath = URI.create(san.getValue()).getPath();
                    return uriPath.substring(uriPath.lastIndexOf('/') + 1); // last path segment contains instance id
                })
                .findFirst();
    }
@return Athenz URI hostname from the Subject Alternative Name extension
vespa-athenz/src/main/java/com/yahoo/vespa/athenz/tls/AthenzX509CertificateUtils.java