class CertificateIdentity {

    @Override
    public String toString() {
        return "{" +
            "domain:\"" + getDomain() + "\"" +
            ", service:\"" + getService() + "\"" +
            ", roles:[" + getRoles().stream().map(r -> '"' + r + '"').collect(Collectors.joining(", ")) + "]" +
            ", x509Cert:\"" + getX509Certificate().toString() + "\"" +
            "}";
    }

    public  CertificateIdentity(String domain, String service, List<String> roles, X509Certificate x509Certificate);

}