Class ZtsClientMock
- 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 ZtsClientMock(AthenzDbMock athenz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.yahoo.vespa.athenz.api.AthenzAccessTokengetAccessToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)com.yahoo.vespa.athenz.api.AthenzAccessTokengetAccessToken(List<com.yahoo.vespa.athenz.api.AthenzRole> athenzRole)com.yahoo.vespa.athenz.api.AwsTemporaryCredentialsgetAwsTemporaryCredentials(com.yahoo.vespa.athenz.api.AthenzDomain athenzDomain, com.yahoo.vespa.athenz.api.AwsRole awsRole, Duration duration, String externalId)X509CertificategetRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr)X509CertificategetRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr, Duration expiry)com.yahoo.vespa.athenz.api.ZTokengetRoleToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)com.yahoo.vespa.athenz.api.ZTokengetRoleToken(com.yahoo.vespa.athenz.api.AthenzRole athenzRole)com.yahoo.vespa.athenz.client.zts.IdentitygetServiceIdentity(com.yahoo.vespa.athenz.api.AthenzIdentity identity, String keyId, com.yahoo.security.Pkcs10Csr csr)com.yahoo.vespa.athenz.client.zts.IdentitygetServiceIdentity(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.InstanceIdentityrefreshInstance(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.InstanceIdentityregisterInstance(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity instanceIdentity, String attestationData, com.yahoo.security.Pkcs10Csr csr)
-
-
-
Constructor Detail
-
ZtsClientMock
public ZtsClientMock(AthenzDbMock athenz)
-
-
Method Detail
-
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:
getTenantDomainsin interfacecom.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:
registerInstancein interfacecom.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:
refreshInstancein interfacecom.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:
getServiceIdentityin interfacecom.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:
getServiceIdentityin interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
getRoleToken
public com.yahoo.vespa.athenz.api.ZToken getRoleToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)
- Specified by:
getRoleTokenin interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
getRoleToken
public com.yahoo.vespa.athenz.api.ZToken getRoleToken(com.yahoo.vespa.athenz.api.AthenzRole athenzRole)
- Specified by:
getRoleTokenin interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
getAccessToken
public com.yahoo.vespa.athenz.api.AthenzAccessToken getAccessToken(com.yahoo.vespa.athenz.api.AthenzDomain domain)
- Specified by:
getAccessTokenin interfacecom.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:
getAccessTokenin interfacecom.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:
getRoleCertificatein interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
getRoleCertificate
public X509Certificate getRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr)
- Specified by:
getRoleCertificatein interfacecom.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:
getAwsTemporaryCredentialsin interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
-