public static AthenzRole getRolesFromRoleCertificate(X509Certificate certificate) {
        String commonName = X509CertificateUtils.getSubjectCommonName(certificate).orElseThrow();
        return AthenzRole.fromResourceNameString(commonName);
    }
Utility methods for Athenz issued x509 certificates

@author bjorncs
vespa-athenz/src/main/java/com/yahoo/vespa/athenz/tls/AthenzX509CertificateUtils.java