Class ZtsClientMock
- java.lang.Object
-
- com.yahoo.vespa.hosted.controller.api.integration.athenz.ZtsClientMock
-
- All Implemented Interfaces:
com.yahoo.vespa.athenz.client.zts.ZtsClient,java.lang.AutoCloseable
public class ZtsClientMock extends java.lang.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(java.util.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, java.time.Duration duration, java.lang.String externalId)java.security.cert.X509CertificategetRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr)java.security.cert.X509CertificategetRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr, java.time.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, java.lang.String keyId, com.yahoo.security.Pkcs10Csr csr)com.yahoo.vespa.athenz.client.zts.IdentitygetServiceIdentity(com.yahoo.vespa.athenz.api.AthenzIdentity identity, java.lang.String keyId, java.security.KeyPair keyPair, java.lang.String dnsSuffix)java.util.List<com.yahoo.vespa.athenz.api.AthenzDomain>getTenantDomains(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity userIdentity, java.lang.String roleName)com.yahoo.vespa.athenz.client.zts.InstanceIdentityrefreshInstance(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity instanceIdentity, java.lang.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, java.lang.String attestationData, com.yahoo.security.Pkcs10Csr csr)
-
-
-
Constructor Detail
-
ZtsClientMock
public ZtsClientMock(AthenzDbMock athenz)
-
-
Method Detail
-
getTenantDomains
public java.util.List<com.yahoo.vespa.athenz.api.AthenzDomain> getTenantDomains(com.yahoo.vespa.athenz.api.AthenzIdentity providerIdentity, com.yahoo.vespa.athenz.api.AthenzIdentity userIdentity, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.String keyId, java.security.KeyPair keyPair, java.lang.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(java.util.List<com.yahoo.vespa.athenz.api.AthenzRole> athenzRole)
- Specified by:
getAccessTokenin interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
getRoleCertificate
public java.security.cert.X509Certificate getRoleCertificate(com.yahoo.vespa.athenz.api.AthenzRole role, com.yahoo.security.Pkcs10Csr csr, java.time.Duration expiry)- Specified by:
getRoleCertificatein interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
getRoleCertificate
public java.security.cert.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, java.time.Duration duration, java.lang.String externalId)- Specified by:
getAwsTemporaryCredentialsin interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacecom.yahoo.vespa.athenz.client.zts.ZtsClient
-
-