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 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
        Returns:
        SSLContext that is automatically updated.
      • 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