java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.athenz.ZtsClientMock
All Implemented Interfaces:
com.yahoo.vespa.athenz.client.zts.ZtsClient, AutoCloseable

public class ZtsClientMock extends Object implements com.yahoo.vespa.athenz.client.zts.ZtsClient
Author:
bjorncs
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    com.yahoo.vespa.athenz.api.AthenzAccessToken
    getAccessToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)
     
    com.yahoo.vespa.athenz.api.AthenzAccessToken
    getAccessToken(List<com.yahoo.vespa.athenz.api.AthenzRole> athenzRole)
     
    com.yahoo.vespa.athenz.api.AwsTemporaryCredentials
    getAwsTemporaryCredentials(com.yahoo.vespa.athenz.api.AthenzDomain athenzDomain, com.yahoo.vespa.athenz.api.AwsRole awsRole, Duration duration, String externalId)
     
    getRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr)
     
    getRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr, Duration expiry)
     
    com.yahoo.vespa.athenz.api.ZToken
    getRoleToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)
     
    com.yahoo.vespa.athenz.api.ZToken
    getRoleToken(com.yahoo.vespa.athenz.api.AthenzRole athenzRole)
     
    com.yahoo.vespa.athenz.client.zts.Identity
    getServiceIdentity(com.yahoo.vespa.athenz.api.AthenzIdentity identity, String keyId, com.yahoo.security.Pkcs10Csr csr)
     
    com.yahoo.vespa.athenz.client.zts.Identity
    getServiceIdentity(com.yahoo.vespa.athenz.api.AthenzIdentity identity, String keyId, KeyPair keyPair, String dnsSuffix)
     
    List<com.yahoo.vespa.athenz.api.AthenzDomain>
    getTenantDomains(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity userIdentity, String roleName)
     
    com.yahoo.vespa.athenz.client.zts.InstanceIdentity
    refreshInstance(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity instanceIdentity, String instanceId, com.yahoo.security.Pkcs10Csr csr)
     
    com.yahoo.vespa.athenz.client.zts.InstanceIdentity
    registerInstance(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity instanceIdentity, String attestationData, com.yahoo.security.Pkcs10Csr csr)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.yahoo.vespa.athenz.client.zts.ZtsClient

    getAwsTemporaryCredentials, getAwsTemporaryCredentials
  • Constructor Details

  • Method Details

    • getTenantDomains

      public List<com.yahoo.vespa.athenz.api.AthenzDomain> getTenantDomains(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity userIdentity, String roleName)
      Specified by:
      getTenantDomains in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • registerInstance

      public com.yahoo.vespa.athenz.client.zts.InstanceIdentity registerInstance(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity instanceIdentity, String attestationData, com.yahoo.security.Pkcs10Csr csr)
      Specified by:
      registerInstance in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • refreshInstance

      public com.yahoo.vespa.athenz.client.zts.InstanceIdentity refreshInstance(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity instanceIdentity, String instanceId, com.yahoo.security.Pkcs10Csr csr)
      Specified by:
      refreshInstance in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getServiceIdentity

      public com.yahoo.vespa.athenz.client.zts.Identity getServiceIdentity(com.yahoo.vespa.athenz.api.AthenzIdentity identity, String keyId, com.yahoo.security.Pkcs10Csr csr)
      Specified by:
      getServiceIdentity in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getServiceIdentity

      public com.yahoo.vespa.athenz.client.zts.Identity getServiceIdentity(com.yahoo.vespa.athenz.api.AthenzIdentity identity, String keyId, KeyPair keyPair, String dnsSuffix)
      Specified by:
      getServiceIdentity in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getRoleToken

      public com.yahoo.vespa.athenz.api.ZToken getRoleToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)
      Specified by:
      getRoleToken in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getRoleToken

      public com.yahoo.vespa.athenz.api.ZToken getRoleToken(com.yahoo.vespa.athenz.api.AthenzRole athenzRole)
      Specified by:
      getRoleToken in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getAccessToken

      public com.yahoo.vespa.athenz.api.AthenzAccessToken getAccessToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)
      Specified by:
      getAccessToken in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getAccessToken

      public com.yahoo.vespa.athenz.api.AthenzAccessToken getAccessToken(List<com.yahoo.vespa.athenz.api.AthenzRole> athenzRole)
      Specified by:
      getAccessToken in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getRoleCertificate

      public X509Certificate getRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr, Duration expiry)
      Specified by:
      getRoleCertificate in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getRoleCertificate

      public X509Certificate getRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr)
      Specified by:
      getRoleCertificate in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • getAwsTemporaryCredentials

      public com.yahoo.vespa.athenz.api.AwsTemporaryCredentials getAwsTemporaryCredentials(com.yahoo.vespa.athenz.api.AthenzDomain athenzDomain, com.yahoo.vespa.athenz.api.AwsRole awsRole, Duration duration, String externalId)
      Specified by:
      getAwsTemporaryCredentials in interface com.yahoo.vespa.athenz.client.zts.ZtsClient
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface com.yahoo.vespa.athenz.client.zts.ZtsClient