Search in sources :

Example 1 with UnityServerConfiguration

use of pl.edu.icm.unity.engine.api.config.UnityServerConfiguration in project unity by unity-idm.

the class TestUnityConfig method authenticationFlowsAreCorrectlyLoaded.

@Test
public void authenticationFlowsAreCorrectlyLoaded() throws ConfigurationException, IOException {
    Environment env = mock(Environment.class);
    ConfigurationLocationProvider locProvider = mock(ConfigurationLocationProvider.class);
    Mockito.when(locProvider.getConfigurationLocation()).thenReturn("src/test/resources/testAuthenticatorsSpec.conf");
    UnityServerConfiguration config = new UnityServerConfiguration(env, locProvider);
    List<String> endpointAuth = config.getEndpointAuth("endpoints.1.");
    assertThat(endpointAuth.size(), is(4));
    assertThat(endpointAuth.get(0), is("a1"));
    assertThat(endpointAuth.get(1), is("a2"));
    assertThat(endpointAuth.get(2), is("a3"));
    assertThat(endpointAuth.get(3), is("a4"));
}
Also used : UnityServerConfiguration(pl.edu.icm.unity.engine.api.config.UnityServerConfiguration) Environment(org.springframework.core.env.Environment) ConfigurationLocationProvider(pl.edu.icm.unity.engine.api.config.ConfigurationLocationProvider) Test(org.junit.Test)

Example 2 with UnityServerConfiguration

use of pl.edu.icm.unity.engine.api.config.UnityServerConfiguration in project unity by unity-idm.

the class TestUserImportService method importSerivceInvokesAllImporters.

@Test
public void importSerivceInvokesAllImporters() throws InterruptedException {
    // given
    RemoteAuthnResultTranslator verificatorUtil = mock(RemoteAuthnResultTranslator.class);
    UnityServerConfiguration mainCfg = mock(UnityServerConfiguration.class);
    when(mainCfg.getSortedListKeys(UnityServerConfiguration.IMPORT_PFX)).thenReturn(Lists.newArrayList("key1", "key2"));
    when(mainCfg.getValue(UnityServerConfiguration.IMPORT_PFX + "key1")).thenReturn("f1");
    when(mainCfg.getValue(UnityServerConfiguration.IMPORT_PFX + "key2")).thenReturn("f2");
    ConfigurationLoader cfgLoader = mock(ConfigurationLoader.class);
    when(cfgLoader.getProperties("f1")).thenReturn(getCfgProperties());
    when(cfgLoader.getProperties("f2")).thenReturn(getCfgProperties());
    UserImportSPIFactory factory = mock(UserImportSPIFactory.class);
    UserImportSPI importer = mock(UserImportSPI.class);
    when(importer.importUser("id", "type")).thenReturn(null);
    when(factory.getInstance(any(), any())).thenReturn(importer);
    when(factory.getName()).thenReturn("mockI");
    List<UserImportSPIFactory> importersF = new ArrayList<>();
    importersF.add(factory);
    CacheProvider cp = new CacheProvider();
    // when
    UserImportServiceImpl impl = new UserImportServiceImpl(mainCfg, importersF, cp, verificatorUtil, cfgLoader);
    List<ImportResult> importUser = impl.importUser(Lists.newArrayList(UserImportSpec.withAllImporters("id", "type")));
    // then
    assertThat(importUser.size(), is(2));
    assertThat(importUser.get(0).importerKey, is("key1"));
    assertThat(importUser.get(0).authenticationResult.getStatus(), is(Status.notApplicable));
    assertThat(importUser.get(1).importerKey, is("key2"));
    verify(factory, times(2)).getInstance(getCfgProperties(), "idp");
    verify(importer, times(2)).importUser("id", "type");
}
Also used : UserImportSPIFactory(pl.edu.icm.unity.engine.api.userimport.UserImportSPIFactory) UnityServerConfiguration(pl.edu.icm.unity.engine.api.config.UnityServerConfiguration) ImportResult(pl.edu.icm.unity.engine.api.userimport.UserImportSerivce.ImportResult) RemoteAuthnResultTranslator(pl.edu.icm.unity.engine.api.authn.remote.RemoteAuthnResultTranslator) ArrayList(java.util.ArrayList) UserImportServiceImpl(pl.edu.icm.unity.engine.userimport.UserImportServiceImpl) CacheProvider(pl.edu.icm.unity.engine.api.utils.CacheProvider) UserImportSPI(pl.edu.icm.unity.engine.api.userimport.UserImportSPI) ConfigurationLoader(pl.edu.icm.unity.engine.api.config.ConfigurationLoader) Test(org.junit.Test)

Example 3 with UnityServerConfiguration

use of pl.edu.icm.unity.engine.api.config.UnityServerConfiguration in project unity by unity-idm.

the class SamlAuthVaadinEndpoint method getServletContextHandlerOverridable.

@Override
protected ServletContextHandler getServletContextHandlerOverridable() {
    ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
    context.setContextPath(description.getEndpoint().getContextAddress());
    String samlPublicEntryPointUrl = getServletUrl(publicEntryPointPath);
    Servlet samlParseServlet = getSamlParseServlet(samlPublicEntryPointUrl, getServletUrl(SAML_ENTRY_SERVLET_PATH));
    ServletHolder samlParseHolder = createServletHolder(samlParseServlet, true);
    context.addServlet(samlParseHolder, publicEntryPointPath + "/*");
    context.addFilter(new FilterHolder(remoteAuthnResponseProcessingFilter), "/*", EnumSet.of(DispatcherType.REQUEST));
    Filter samlGuardFilter = new SamlGuardFilter(new ErrorHandler(aTypeSupport, freemarkerHandler));
    context.addFilter(new FilterHolder(samlGuardFilter), SAML_ENTRY_SERVLET_PATH, EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD));
    ServletHolder routingServletHolder = createServletHolder(new RoutingServlet(SAML_CONSENT_DECIDER_SERVLET_PATH), true);
    context.addServlet(routingServletHolder, SAML_ENTRY_SERVLET_PATH + "/*");
    Servlet samlConsentDeciderServlet = dispatcherServletFactory.getInstance(SAML_UI_SERVLET_PATH, AUTHENTICATION_PATH, description.getEndpoint());
    ServletHolder samlConsentDeciderHolder = createServletHolder(samlConsentDeciderServlet, true);
    context.addServlet(samlConsentDeciderHolder, SAML_CONSENT_DECIDER_SERVLET_PATH + "/*");
    String sloAsyncURL = getServletUrl(SAML_SLO_ASYNC_SERVLET_PATH);
    Servlet samlSLOAsyncServlet = getSLOAsyncServlet(sloAsyncURL);
    ServletHolder samlSLOAsyncHolder = createServletHolder(samlSLOAsyncServlet, true);
    context.addServlet(samlSLOAsyncHolder, SAML_SLO_ASYNC_SERVLET_PATH + "/*");
    String sloSyncURL = getServletUrl(SAML_SLO_SOAP_SERVLET_PATH);
    Servlet samlSLOSyncServlet = getSLOSyncServlet(sloSyncURL);
    ServletHolder samlSLOSyncHolder = createServletHolder(samlSLOSyncServlet, true);
    context.addServlet(samlSLOSyncHolder, SAML_SLO_SOAP_SERVLET_PATH + "/*");
    SessionManagement sessionMan = applicationContext.getBean(SessionManagement.class);
    LoginToHttpSessionBinder sessionBinder = applicationContext.getBean(LoginToHttpSessionBinder.class);
    UnityServerConfiguration config = applicationContext.getBean(UnityServerConfiguration.class);
    RememberMeProcessor remeberMeProcessor = applicationContext.getBean(RememberMeProcessor.class);
    context.addFilter(new FilterHolder(new HiddenResourcesFilter(Collections.unmodifiableList(Arrays.asList(AUTHENTICATION_PATH, SAML_CONSENT_DECIDER_SERVLET_PATH, SAML_UI_SERVLET_PATH)))), "/*", EnumSet.of(DispatcherType.REQUEST));
    authnFilter = new AuthenticationFilter(Arrays.asList(SAML_ENTRY_SERVLET_PATH), AUTHENTICATION_PATH, description.getRealm(), sessionMan, sessionBinder, remeberMeProcessor);
    context.addFilter(new FilterHolder(authnFilter), "/*", EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD));
    proxyAuthnFilter = new ProxyAuthenticationFilter(authenticationFlows, description.getEndpoint().getContextAddress(), genericEndpointProperties.getBooleanValue(VaadinEndpointProperties.AUTO_LOGIN), description.getRealm());
    context.addFilter(new FilterHolder(proxyAuthnFilter), AUTHENTICATION_PATH + "/*", EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD));
    contextSetupFilter = new InvocationContextSetupFilter(config, description.getRealm(), null, getAuthenticationFlows());
    context.addFilter(new FilterHolder(contextSetupFilter), "/*", EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD));
    EndpointRegistrationConfiguration registrationConfiguration = genericEndpointProperties.getRegistrationConfiguration();
    authenticationServlet = new UnityVaadinServlet(applicationContext, AuthenticationUI.class.getSimpleName(), description, authenticationFlows, registrationConfiguration, properties, getBootstrapHandler4Authn(SAML_ENTRY_SERVLET_PATH));
    CancelHandler cancelHandler = new SamlAuthnCancelHandler(freemarkerHandler, aTypeSupport, idpStatisticReporterFactory, description.getEndpoint());
    authenticationServlet.setCancelHandler(cancelHandler);
    ServletHolder authnServletHolder = createVaadinServletHolder(authenticationServlet, true);
    context.addServlet(authnServletHolder, AUTHENTICATION_PATH + "/*");
    context.addServlet(authnServletHolder, VAADIN_RESOURCES);
    theServlet = new UnityVaadinServlet(applicationContext, uiBeanName, description, authenticationFlows, registrationConfiguration, properties, getBootstrapHandler(SAML_ENTRY_SERVLET_PATH));
    context.addServlet(createVaadinServletHolder(theServlet, false), uiServletPath + "/*");
    if (samlProperties.getBooleanValue(SamlIdpProperties.PUBLISH_METADATA)) {
        Servlet metadataServlet = getMetadataServlet(samlPublicEntryPointUrl, sloAsyncURL, sloSyncURL);
        context.addServlet(createServletHolder(metadataServlet, true), SAML_META_SERVLET_PATH + "/*");
    }
    return context;
}
Also used : ErrorHandler(pl.edu.icm.unity.saml.idp.web.filter.ErrorHandler) InvocationContextSetupFilter(pl.edu.icm.unity.webui.authn.InvocationContextSetupFilter) UnityVaadinServlet(pl.edu.icm.unity.webui.UnityVaadinServlet) FilterHolder(org.eclipse.jetty.servlet.FilterHolder) LoginToHttpSessionBinder(pl.edu.icm.unity.engine.api.session.LoginToHttpSessionBinder) ProxyAuthenticationFilter(pl.edu.icm.unity.webui.authn.ProxyAuthenticationFilter) AuthenticationFilter(pl.edu.icm.unity.webui.authn.AuthenticationFilter) ProxyAuthenticationFilter(pl.edu.icm.unity.webui.authn.ProxyAuthenticationFilter) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) EndpointRegistrationConfiguration(pl.edu.icm.unity.webui.EndpointRegistrationConfiguration) SamlGuardFilter(pl.edu.icm.unity.saml.idp.web.filter.SamlGuardFilter) UnityServerConfiguration(pl.edu.icm.unity.engine.api.config.UnityServerConfiguration) InvocationContextSetupFilter(pl.edu.icm.unity.webui.authn.InvocationContextSetupFilter) HiddenResourcesFilter(pl.edu.icm.unity.engine.api.utils.HiddenResourcesFilter) RemoteRedirectedAuthnResponseProcessingFilter(pl.edu.icm.unity.webui.authn.remote.RemoteRedirectedAuthnResponseProcessingFilter) Filter(javax.servlet.Filter) ProxyAuthenticationFilter(pl.edu.icm.unity.webui.authn.ProxyAuthenticationFilter) AuthenticationFilter(pl.edu.icm.unity.webui.authn.AuthenticationFilter) SamlGuardFilter(pl.edu.icm.unity.saml.idp.web.filter.SamlGuardFilter) RoutingServlet(pl.edu.icm.unity.engine.api.utils.RoutingServlet) CancelHandler(pl.edu.icm.unity.webui.authn.CancelHandler) SamlParseServlet(pl.edu.icm.unity.saml.idp.web.filter.SamlParseServlet) Servlet(javax.servlet.Servlet) UnityVaadinServlet(pl.edu.icm.unity.webui.UnityVaadinServlet) RoutingServlet(pl.edu.icm.unity.engine.api.utils.RoutingServlet) CXFNonSpringServlet(org.apache.cxf.transport.servlet.CXFNonSpringServlet) SLOSAMLServlet(pl.edu.icm.unity.saml.slo.SLOSAMLServlet) MetadataServlet(pl.edu.icm.unity.saml.metadata.MetadataServlet) SessionManagement(pl.edu.icm.unity.engine.api.session.SessionManagement) RememberMeProcessor(pl.edu.icm.unity.engine.api.authn.RememberMeProcessor) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) HiddenResourcesFilter(pl.edu.icm.unity.engine.api.utils.HiddenResourcesFilter)

Example 4 with UnityServerConfiguration

use of pl.edu.icm.unity.engine.api.config.UnityServerConfiguration in project unity by unity-idm.

the class MockGroovyBindingProvider method getBinding.

public static Binding getBinding(PersistableEvent event) {
    MessageSource unityMessageSource = mock(MessageSource.class, withSettings().verboseLogging());
    UnityServerConfiguration config = mock(UnityServerConfiguration.class, withSettings().verboseLogging());
    BulkProcessingManagement bulkProcessingManagement = mock(BulkProcessingManagement.class, withSettings().verboseLogging());
    PreferencesManagement preferencesManagement = mock(PreferencesManagement.class, withSettings().verboseLogging());
    UserImportManagement userImportManagement = mock(UserImportManagement.class, withSettings().verboseLogging());
    AttributeTypeSupport attributeTypeSupport = mock(AttributeTypeSupport.class, withSettings().verboseLogging());
    IdentityTypeSupport identityTypeSupport = mock(IdentityTypeSupport.class, withSettings().verboseLogging());
    IdentityTypesManagement identityTypesManagement = mock(IdentityTypesManagement.class, withSettings().verboseLogging());
    AttributeClassManagement attributeClassManagement = mock(AttributeClassManagement.class, withSettings().verboseLogging());
    AttributesManagement attributesManagement = mock(AttributesManagement.class, withSettings().verboseLogging());
    AttributeTypeManagement attributeTypeManagement = mock(AttributeTypeManagement.class, withSettings().verboseLogging());
    AuthenticatorManagement authenticatorManagement = mock(AuthenticatorManagement.class, withSettings().verboseLogging());
    CredentialManagement credentialManagement = mock(CredentialManagement.class, withSettings().verboseLogging());
    CredentialRequirementManagement credentialRequirementManagement = mock(CredentialRequirementManagement.class, withSettings().verboseLogging());
    EndpointManagement endpointManagement = mock(EndpointManagement.class, withSettings().verboseLogging());
    EnquiryManagement enquiryManagement = mock(EnquiryManagement.class, withSettings().verboseLogging());
    EntityCredentialManagement entityCredentialManagement = mock(EntityCredentialManagement.class, withSettings().verboseLogging());
    EntityManagement entityManagement = mock(EntityManagement.class, withSettings().verboseLogging());
    GroupsManagement groupsManagement = mock(GroupsManagement.class, withSettings().verboseLogging());
    InvitationManagement invitationManagement = mock(InvitationManagement.class, withSettings().verboseLogging());
    MessageTemplateManagement messageTemplateManagement = mock(MessageTemplateManagement.class, withSettings().verboseLogging());
    NotificationsManagement notificationsManagement = mock(NotificationsManagement.class, withSettings().verboseLogging());
    RealmsManagement realmsManagement = mock(RealmsManagement.class, withSettings().verboseLogging());
    TokensManagement tokensManagement = mock(TokensManagement.class, withSettings().verboseLogging());
    RegistrationsManagement registrationsManagement = mock(RegistrationsManagement.class, withSettings().verboseLogging());
    TranslationProfileManagement translationProfileManagement = mock(TranslationProfileManagement.class, withSettings().verboseLogging());
    GroupDelegationConfigGenerator groupDelegationConfigGenerator = mock(GroupDelegationConfigGenerator.class, withSettings().verboseLogging());
    SessionManagement sessionManagement = mock(SessionManagement.class, withSettings().verboseLogging());
    RegistrationFormTranslationActionGenerator regTranslationActionGenerator = mock(RegistrationFormTranslationActionGenerator.class, withSettings().verboseLogging());
    ApplicationContext applicationContext = mock(ApplicationContext.class, withSettings().verboseLogging());
    Binding binding = new Binding();
    binding.setVariable("config", config);
    binding.setVariable("attributeClassManagement", attributeClassManagement);
    binding.setVariable("attributesManagement", attributesManagement);
    binding.setVariable("attributeTypeManagement", attributeTypeManagement);
    binding.setVariable("authenticatorManagement", authenticatorManagement);
    binding.setVariable("bulkProcessingManagement", bulkProcessingManagement);
    binding.setVariable("credentialManagement", credentialManagement);
    binding.setVariable("credentialRequirementManagement", credentialRequirementManagement);
    binding.setVariable("endpointManagement", endpointManagement);
    binding.setVariable("enquiryManagement", enquiryManagement);
    binding.setVariable("entityCredentialManagement", entityCredentialManagement);
    binding.setVariable("entityManagement", entityManagement);
    binding.setVariable("groupsManagement", groupsManagement);
    binding.setVariable("identityTypesManagement", identityTypesManagement);
    binding.setVariable("invitationManagement", invitationManagement);
    binding.setVariable("messageTemplateManagement", messageTemplateManagement);
    binding.setVariable("notificationsManagement", notificationsManagement);
    binding.setVariable("preferencesManagement", preferencesManagement);
    binding.setVariable("realmsManagement", realmsManagement);
    binding.setVariable("registrationsManagement", registrationsManagement);
    binding.setVariable("translationProfileManagement", translationProfileManagement);
    binding.setVariable("userImportManagement", userImportManagement);
    binding.setVariable("msgSrc", unityMessageSource);
    binding.setVariable("attributeTypeSupport", attributeTypeSupport);
    binding.setVariable("identityTypeSupport", identityTypeSupport);
    binding.setVariable("groupDelegationConfigGenerator", groupDelegationConfigGenerator);
    binding.setVariable("sessionManagement", sessionManagement);
    binding.setVariable("isColdStart", true);
    binding.setVariable("event", event.getTrigger());
    binding.setVariable("context", event.getContents());
    binding.setVariable("regTranslationActionGenerator", regTranslationActionGenerator);
    binding.setVariable("log", LOG);
    binding.setVariable("applicationContext", applicationContext);
    binding.setVariable("tokensManagement", tokensManagement);
    return binding;
}
Also used : RealmsManagement(pl.edu.icm.unity.engine.api.RealmsManagement) IdentityTypeSupport(pl.edu.icm.unity.engine.api.identity.IdentityTypeSupport) UserImportManagement(pl.edu.icm.unity.engine.api.UserImportManagement) CredentialRequirementManagement(pl.edu.icm.unity.engine.api.CredentialRequirementManagement) InvitationManagement(pl.edu.icm.unity.engine.api.InvitationManagement) EntityCredentialManagement(pl.edu.icm.unity.engine.api.EntityCredentialManagement) UnityServerConfiguration(pl.edu.icm.unity.engine.api.config.UnityServerConfiguration) EntityCredentialManagement(pl.edu.icm.unity.engine.api.EntityCredentialManagement) CredentialManagement(pl.edu.icm.unity.engine.api.CredentialManagement) ApplicationContext(org.springframework.context.ApplicationContext) EntityManagement(pl.edu.icm.unity.engine.api.EntityManagement) AuthenticatorManagement(pl.edu.icm.unity.engine.api.AuthenticatorManagement) MessageTemplateManagement(pl.edu.icm.unity.engine.api.MessageTemplateManagement) Binding(groovy.lang.Binding) EnquiryManagement(pl.edu.icm.unity.engine.api.EnquiryManagement) TokensManagement(pl.edu.icm.unity.engine.api.token.TokensManagement) GroupDelegationConfigGenerator(pl.edu.icm.unity.engine.api.utils.GroupDelegationConfigGenerator) GroupsManagement(pl.edu.icm.unity.engine.api.GroupsManagement) BulkProcessingManagement(pl.edu.icm.unity.engine.api.BulkProcessingManagement) IdentityTypesManagement(pl.edu.icm.unity.engine.api.IdentityTypesManagement) MessageSource(pl.edu.icm.unity.MessageSource) TranslationProfileManagement(pl.edu.icm.unity.engine.api.TranslationProfileManagement) AttributeClassManagement(pl.edu.icm.unity.engine.api.AttributeClassManagement) RegistrationFormTranslationActionGenerator(pl.edu.icm.unity.engine.api.translation.form.RegistrationFormTranslationActionGenerator) AttributesManagement(pl.edu.icm.unity.engine.api.AttributesManagement) PreferencesManagement(pl.edu.icm.unity.engine.api.PreferencesManagement) NotificationsManagement(pl.edu.icm.unity.engine.api.NotificationsManagement) RegistrationsManagement(pl.edu.icm.unity.engine.api.RegistrationsManagement) EndpointManagement(pl.edu.icm.unity.engine.api.EndpointManagement) AttributeTypeSupport(pl.edu.icm.unity.engine.api.attributes.AttributeTypeSupport) SessionManagement(pl.edu.icm.unity.engine.api.session.SessionManagement) AttributeTypeManagement(pl.edu.icm.unity.engine.api.AttributeTypeManagement)

Example 5 with UnityServerConfiguration

use of pl.edu.icm.unity.engine.api.config.UnityServerConfiguration in project unity by unity-idm.

the class TestUserImportService method importSerivceLoadsConfiguredHandlerAndInvokesIt.

@Test
public void importSerivceLoadsConfiguredHandlerAndInvokesIt() throws InterruptedException {
    // given
    RemoteAuthnResultTranslator verificatorUtil = mock(RemoteAuthnResultTranslator.class);
    UnityServerConfiguration mainCfg = mock(UnityServerConfiguration.class);
    when(mainCfg.getSortedListKeys(UnityServerConfiguration.IMPORT_PFX)).thenReturn(Lists.newArrayList("key"));
    when(mainCfg.getValue(UnityServerConfiguration.IMPORT_PFX + "key")).thenReturn("f");
    ConfigurationLoader cfgLoader = mock(ConfigurationLoader.class);
    when(cfgLoader.getProperties("f")).thenReturn(getCfgProperties());
    UserImportSPIFactory factory = mock(UserImportSPIFactory.class);
    UserImportSPI importer = mock(UserImportSPI.class);
    when(importer.importUser("id", "type")).thenReturn(null);
    when(factory.getInstance(any(), any())).thenReturn(importer);
    when(factory.getName()).thenReturn("mockI");
    List<UserImportSPIFactory> importersF = new ArrayList<>();
    importersF.add(factory);
    CacheProvider cp = new CacheProvider();
    // when
    UserImportServiceImpl impl = new UserImportServiceImpl(mainCfg, importersF, cp, verificatorUtil, cfgLoader);
    List<ImportResult> importUser = impl.importUser(Lists.newArrayList(new UserImportSpec("key", "id", "type")));
    // then
    assertThat(importUser.size(), is(1));
    assertThat(importUser.get(0).authenticationResult.getStatus(), is(Status.notApplicable));
    assertThat(importUser.get(0).importerKey, is("key"));
    verify(factory).getInstance(getCfgProperties(), "idp");
    verify(importer).importUser("id", "type");
    // again - should cache negative resolve
    // just to have nice 'never'below
    reset(importer);
    List<ImportResult> importUser2 = impl.importUser(Lists.newArrayList(new UserImportSpec("key", "id", "type")));
    assertThat(importUser2.size(), is(1));
    assertThat(importUser2.get(0).authenticationResult.getStatus(), is(Status.notApplicable));
    verify(importer, never()).importUser("id", "type");
    // again - should expire negative resolve cache
    Thread.sleep(1001);
    List<ImportResult> importUser3 = impl.importUser(Lists.newArrayList(new UserImportSpec("key", "id", "type")));
    assertThat(importUser3.size(), is(1));
    assertThat(importUser3.get(0).authenticationResult.getStatus(), is(Status.notApplicable));
    verify(importer).importUser("id", "type");
}
Also used : UserImportSPIFactory(pl.edu.icm.unity.engine.api.userimport.UserImportSPIFactory) UnityServerConfiguration(pl.edu.icm.unity.engine.api.config.UnityServerConfiguration) ImportResult(pl.edu.icm.unity.engine.api.userimport.UserImportSerivce.ImportResult) RemoteAuthnResultTranslator(pl.edu.icm.unity.engine.api.authn.remote.RemoteAuthnResultTranslator) UserImportSpec(pl.edu.icm.unity.engine.api.userimport.UserImportSpec) ArrayList(java.util.ArrayList) UserImportServiceImpl(pl.edu.icm.unity.engine.userimport.UserImportServiceImpl) CacheProvider(pl.edu.icm.unity.engine.api.utils.CacheProvider) UserImportSPI(pl.edu.icm.unity.engine.api.userimport.UserImportSPI) ConfigurationLoader(pl.edu.icm.unity.engine.api.config.ConfigurationLoader) Test(org.junit.Test)

Aggregations

UnityServerConfiguration (pl.edu.icm.unity.engine.api.config.UnityServerConfiguration)6 Test (org.junit.Test)3 SessionManagement (pl.edu.icm.unity.engine.api.session.SessionManagement)3 ArrayList (java.util.ArrayList)2 Filter (javax.servlet.Filter)2 Servlet (javax.servlet.Servlet)2 FilterHolder (org.eclipse.jetty.servlet.FilterHolder)2 ServletContextHandler (org.eclipse.jetty.servlet.ServletContextHandler)2 ServletHolder (org.eclipse.jetty.servlet.ServletHolder)2 RememberMeProcessor (pl.edu.icm.unity.engine.api.authn.RememberMeProcessor)2 RemoteAuthnResultTranslator (pl.edu.icm.unity.engine.api.authn.remote.RemoteAuthnResultTranslator)2 ConfigurationLoader (pl.edu.icm.unity.engine.api.config.ConfigurationLoader)2 LoginToHttpSessionBinder (pl.edu.icm.unity.engine.api.session.LoginToHttpSessionBinder)2 Binding (groovy.lang.Binding)1 CXFNonSpringServlet (org.apache.cxf.transport.servlet.CXFNonSpringServlet)1 ApplicationContext (org.springframework.context.ApplicationContext)1 Environment (org.springframework.core.env.Environment)1 MessageSource (pl.edu.icm.unity.MessageSource)1 AttributeClassManagement (pl.edu.icm.unity.engine.api.AttributeClassManagement)1 AttributeTypeManagement (pl.edu.icm.unity.engine.api.AttributeTypeManagement)1