use of com.venafi.vcert.sdk.certificate.SshConfig in project vcert-java by Venafi.
the class AbstractTppConnector method retrieveTppSshConfig.
protected SshConfig retrieveTppSshConfig(SshCaTemplateRequest sshCaTemplateRequest) throws VCertException {
SshConfig sshConfig = new SshConfig();
Map<String, String> params = new HashMap<String, String>();
if (StringUtils.isNotBlank(sshCaTemplateRequest.template()))
params.put("DN", TppConnectorUtils.getSshCADN(sshCaTemplateRequest.template()));
else if (StringUtils.isNotBlank(sshCaTemplateRequest.guid()))
params.put("Guid", sshCaTemplateRequest.guid());
else
throw new CAOrGUIDNotProvidedException();
// TODO confirm if it's required to catch the FeignException and rethrow it as a VcertException
// TODO determine if itsn't required to verify that the caPublicKey is not empty
sshConfig.caPublicKey(tppAPI.retrieveSshCAPublicKeyData(params));
sshConfig.principals(retrieveTppSshPrincipals(sshCaTemplateRequest));
return sshConfig;
}
use of com.venafi.vcert.sdk.certificate.SshConfig in project vcert-java by Venafi.
the class TppConnectorATForSSH method retrieveSshConfig.
private void retrieveSshConfig(SshCaTemplateRequest req) throws VCertException, Exception {
// getting the sshConfig of the SSH Cert CA
SshConfig sshConfig = classUnderTest.retrieveSshConfig(req);
assertNotNull(sshConfig);
assertNotNull(sshConfig.caPublicKey());
assertTrue(!sshConfig.caPublicKey().isEmpty());
assertNotNull(sshConfig.principals());
assertTrue(sshConfig.principals().length > 0);
}
use of com.venafi.vcert.sdk.certificate.SshConfig in project vcert-java by Venafi.
the class TppConnectorATForSSH method retrieveSshConfigWithoutCredentials.
private void retrieveSshConfigWithoutCredentials(SshCaTemplateRequest req) throws VCertException, Exception {
// getting the sshConfig of the SSH Cert CA
SshConfig sshConfig = classUnderTest.retrieveSshConfig(req);
assertNotNull(sshConfig);
assertNotNull(sshConfig.caPublicKey());
assertTrue(!sshConfig.caPublicKey().isEmpty());
// When the authentication is not provided, then the principals are not retrieved
assertNull(sshConfig.principals());
}
use of com.venafi.vcert.sdk.certificate.SshConfig in project vcert-java by Venafi.
the class TppTokenConnectorATForSSH method retrieveSshConfigWithoutCredentials.
private void retrieveSshConfigWithoutCredentials(SshCaTemplateRequest req) throws VCertException, Exception {
// getting the sshConfig of the SSH Cert CA
SshConfig sshConfig = classUnderTest.retrieveSshConfig(req);
assertNotNull(sshConfig);
assertNotNull(sshConfig.caPublicKey());
assertTrue(!sshConfig.caPublicKey().isEmpty());
// When the authentication is not provided, then the principals are not retrieved
assertNull(sshConfig.principals());
}
use of com.venafi.vcert.sdk.certificate.SshConfig in project vcert-java by Venafi.
the class TppTokenConnectorATForSSH method retrieveSshConfig.
private void retrieveSshConfig(SshCaTemplateRequest req) throws VCertException, Exception {
// getting the sshConfig of the SSH Cert CA
SshConfig sshConfig = classUnderTest.retrieveSshConfig(req);
assertNotNull(sshConfig);
assertNotNull(sshConfig.caPublicKey());
assertTrue(!sshConfig.caPublicKey().isEmpty());
assertNotNull(sshConfig.principals());
assertTrue(sshConfig.principals().length > 0);
}
Aggregations