Search in sources :

Example 6 with KerberosConfig

use of com.sequenceiq.freeipa.kerberos.KerberosConfig in project cloudbreak by hortonworks.

the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testFreeIpa.

@Test
public void testFreeIpa() {
    CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
    request.setFreeIpa(createFreeIpaDescriptor(true));
    request.setName(NAME);
    KerberosConfig kerberosConfig = underTest.convert(request);
    checkFreeIpaParams(kerberosConfig, true);
}
Also used : KerberosConfig(com.sequenceiq.freeipa.kerberos.KerberosConfig) CreateKerberosConfigRequest(com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest) Test(org.junit.jupiter.api.Test)

Example 7 with KerberosConfig

use of com.sequenceiq.freeipa.kerberos.KerberosConfig in project cloudbreak by hortonworks.

the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testAdWithoutDomain.

@Test
public void testAdWithoutDomain() {
    CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
    ActiveDirectoryKerberosDescriptor adDescriptor = createActiveDirectoryKerberosDescriptor(false);
    request.setActiveDirectory(adDescriptor);
    request.setName(NAME);
    KerberosConfig kerberosConfig = underTest.convert(request);
    checkActiveDirectoryParams(kerberosConfig, false);
}
Also used : KerberosConfig(com.sequenceiq.freeipa.kerberos.KerberosConfig) CreateKerberosConfigRequest(com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest) ActiveDirectoryKerberosDescriptor(com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor) Test(org.junit.jupiter.api.Test)

Example 8 with KerberosConfig

use of com.sequenceiq.freeipa.kerberos.KerberosConfig in project cloudbreak by hortonworks.

the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testAd.

@Test
public void testAd() {
    CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
    ActiveDirectoryKerberosDescriptor adDescriptor = createActiveDirectoryKerberosDescriptor(true);
    request.setActiveDirectory(adDescriptor);
    request.setName(NAME);
    KerberosConfig kerberosConfig = underTest.convert(request);
    checkActiveDirectoryParams(kerberosConfig, true);
}
Also used : KerberosConfig(com.sequenceiq.freeipa.kerberos.KerberosConfig) CreateKerberosConfigRequest(com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest) ActiveDirectoryKerberosDescriptor(com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor) Test(org.junit.jupiter.api.Test)

Example 9 with KerberosConfig

use of com.sequenceiq.freeipa.kerberos.KerberosConfig in project cloudbreak by hortonworks.

the class UserKeytabServiceTest method setupKerberosConfig.

private void setupKerberosConfig() {
    KerberosConfig kerberosConfig = mock(KerberosConfig.class);
    when(kerberosConfig.getRealm()).thenReturn("realm");
    when(kerberosConfigRepository.findByAccountIdAndEnvironmentCrnAndClusterNameIsNullAndArchivedIsFalse(any(), any())).thenReturn(Optional.of(kerberosConfig));
}
Also used : KerberosConfig(com.sequenceiq.freeipa.kerberos.KerberosConfig)

Example 10 with KerberosConfig

use of com.sequenceiq.freeipa.kerberos.KerberosConfig in project cloudbreak by hortonworks.

the class CreateKerberosConfigRequestToKerberosConfigConverterTest method testFreeIpaWithoutDomain.

@Test
public void testFreeIpaWithoutDomain() {
    CreateKerberosConfigRequest request = new CreateKerberosConfigRequest();
    request.setFreeIpa(createFreeIpaDescriptor(false));
    request.setName(NAME);
    KerberosConfig kerberosConfig = underTest.convert(request);
    checkFreeIpaParams(kerberosConfig, false);
}
Also used : KerberosConfig(com.sequenceiq.freeipa.kerberos.KerberosConfig) CreateKerberosConfigRequest(com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest) Test(org.junit.jupiter.api.Test)

Aggregations

KerberosConfig (com.sequenceiq.freeipa.kerberos.KerberosConfig)18 Test (org.junit.jupiter.api.Test)8 CreateKerberosConfigRequest (com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest)5 InstanceMetaData (com.sequenceiq.freeipa.entity.InstanceMetaData)4 Stack (com.sequenceiq.freeipa.entity.Stack)4 ActiveDirectoryKerberosDescriptor (com.sequenceiq.freeipa.api.v1.kerberos.model.create.ActiveDirectoryKerberosDescriptor)2 FreeIpa (com.sequenceiq.freeipa.entity.FreeIpa)2 InstanceGroup (com.sequenceiq.freeipa.entity.InstanceGroup)2 CreateBindUserEvent (com.sequenceiq.freeipa.flow.freeipa.binduser.create.event.CreateBindUserEvent)2 KerberosConfigService (com.sequenceiq.freeipa.kerberos.KerberosConfigService)2 Set (java.util.Set)2 Collectors (java.util.stream.Collectors)2 Inject (javax.inject.Inject)2 Logger (org.slf4j.Logger)2 LoggerFactory (org.slf4j.LoggerFactory)2 Service (org.springframework.stereotype.Service)2 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)1 NotFoundException (com.sequenceiq.cloudbreak.common.exception.NotFoundException)1 HandlerEvent (com.sequenceiq.flow.reactor.api.handler.HandlerEvent)1