Class AthenzIdentityProviderImpl

  • All Implemented Interfaces:
    com.yahoo.component.Component, com.yahoo.container.jdisc.athenz.AthenzIdentityProvider, ServiceIdentityProvider, java.lang.Comparable<com.yahoo.component.Component>

    public final class AthenzIdentityProviderImpl
    extends com.yahoo.component.AbstractComponent
    implements com.yahoo.container.jdisc.athenz.AthenzIdentityProvider, ServiceIdentityProvider
    A AthenzIdentityProvider / ServiceIdentityProvider component that provides the tenant identity.
    Author:
    mortent, bjorncs
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CERTIFICATE_EXPIRY_METRIC_NAME  
      • Fields inherited from class com.yahoo.component.AbstractComponent

        isDeconstructable
    • Constructor Summary

      Constructors 
      Constructor Description
      AthenzIdentityProviderImpl​(com.yahoo.container.core.identity.IdentityConfig config, com.yahoo.jdisc.Metric metric)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deconstruct()  
      java.lang.String domain()  
      java.lang.String getAccessToken​(java.lang.String domain)  
      java.lang.String getAccessToken​(java.lang.String domain, java.util.List<java.lang.String> roles)  
      java.util.List<java.security.cert.X509Certificate> getIdentityCertificate()  
      javax.net.ssl.SSLContext getIdentitySslContext()  
      java.security.PrivateKey getPrivateKey()  
      javax.net.ssl.SSLContext getRoleSslContext​(java.lang.String domain, java.lang.String role)  
      java.lang.String getRoleToken​(java.lang.String domain)  
      java.lang.String getRoleToken​(java.lang.String domain, java.lang.String role)  
      AthenzService identity()  
      java.lang.String service()  
      java.nio.file.Path trustStorePath()  
      • Methods inherited from class com.yahoo.component.AbstractComponent

        clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CERTIFICATE_EXPIRY_METRIC_NAME

        public static final java.lang.String CERTIFICATE_EXPIRY_METRIC_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • AthenzIdentityProviderImpl

        @Inject
        public AthenzIdentityProviderImpl​(com.yahoo.container.core.identity.IdentityConfig config,
                                          com.yahoo.jdisc.Metric metric)
    • Method Detail

      • domain

        public java.lang.String domain()
        Specified by:
        domain in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • service

        public java.lang.String service()
        Specified by:
        service in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getIdentitySslContext

        public javax.net.ssl.SSLContext getIdentitySslContext()
        Specified by:
        getIdentitySslContext in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
        Specified by:
        getIdentitySslContext in interface ServiceIdentityProvider
      • getRoleSslContext

        public javax.net.ssl.SSLContext getRoleSslContext​(java.lang.String domain,
                                                          java.lang.String role)
        Specified by:
        getRoleSslContext in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getRoleToken

        public java.lang.String getRoleToken​(java.lang.String domain)
        Specified by:
        getRoleToken in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getRoleToken

        public java.lang.String getRoleToken​(java.lang.String domain,
                                             java.lang.String role)
        Specified by:
        getRoleToken in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getAccessToken

        public java.lang.String getAccessToken​(java.lang.String domain)
        Specified by:
        getAccessToken in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getAccessToken

        public java.lang.String getAccessToken​(java.lang.String domain,
                                               java.util.List<java.lang.String> roles)
        Specified by:
        getAccessToken in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getPrivateKey

        public java.security.PrivateKey getPrivateKey()
        Specified by:
        getPrivateKey in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • trustStorePath

        public java.nio.file.Path trustStorePath()
        Specified by:
        trustStorePath in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • getIdentityCertificate

        public java.util.List<java.security.cert.X509Certificate> getIdentityCertificate()
        Specified by:
        getIdentityCertificate in interface com.yahoo.container.jdisc.athenz.AthenzIdentityProvider
      • deconstruct

        public void deconstruct()
        Overrides:
        deconstruct in class com.yahoo.component.AbstractComponent