diff options
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/TlsPrincipal.java')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/TlsPrincipal.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/TlsPrincipal.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/TlsPrincipal.java new file mode 100644 index 00000000000..227c514160b --- /dev/null +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/filter/TlsPrincipal.java @@ -0,0 +1,35 @@ +// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.hosted.provision.restapi.v2.filter; + +import com.yahoo.vespa.athenz.tls.SubjectAlternativeName; + +import java.security.Principal; +import java.security.cert.X509Certificate; +import java.util.List; + +/** + * @author bjorncs + */ +public class TlsPrincipal implements Principal { + private final String hostIdentity; + private final List<X509Certificate> clientCertificateChain; + + public TlsPrincipal(String hostIdentity, List<X509Certificate> clientCertificateChain) { + this.hostIdentity = hostIdentity; + this.clientCertificateChain = clientCertificateChain; + } + + public String getHostIdentityName() { + return hostIdentity; + } + + public List<X509Certificate> getClientCertificateChain() { + return clientCertificateChain; + } + + @Override + public String getName() { + return hostIdentity; + } + +} |