Search in sources :

Example 6 with ActiveDirectoryKerberosDescriptor

use of com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor in project cloudbreak by hortonworks.

the class KerberosConfigToCreateKerberosConfigRequestConverter method getActiveDirectory.

private ActiveDirectoryKerberosDescriptor getActiveDirectory(KerberosConfig source) {
    ActiveDirectoryKerberosDescriptor activeDirectory = new ActiveDirectoryKerberosDescriptor();
    fillRequestWithCommonFields(activeDirectory, source);
    activeDirectory.setAdminUrl(source.getAdminUrl());
    activeDirectory.setContainerDn(source.getContainerDn());
    activeDirectory.setLdapUrl(source.getLdapUrl());
    activeDirectory.setPrincipal(getFakeSecretIfNotNull(source.getPrincipal(), FAKE_PRINCIPAL_POSTFIX));
    activeDirectory.setRealm(getFakeSecretIfNotNull(source.getRealm(), FAKE_REALM_POSTFIX));
    activeDirectory.setUrl(source.getUrl());
    return activeDirectory;
}
Also used : ActiveDirectoryKerberosDescriptor(com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor)

Aggregations

ActiveDirectoryKerberosDescriptor (com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor)6 CreateKerberosConfigRequest (com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest)4 Test (org.junit.jupiter.api.Test)4 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)2 KerberosConfig (com.sequenceiq.freeipa.kerberos.KerberosConfig)2 MITKerberosDescriptor (com.sequenceiq.freeipa.api.v1.kerberos.model.create.MITKerberosDescriptor)1