Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18158

Spring security implementation using aries-blueprint-spring feature

    XMLWordPrintable

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • fuse-7.9-GA
    • fuse-7.11-GA
    • Fuse Standalone
    • None
    • Hide

      Pre-requisite: 

      Install Fuse standalone 7.10

      Step 1: Start Fuse standalone using

      ./fuse clean
      

      Step 2: Install the feature aries-blueprint-spring

      karaf@root()> feature:install aries-blueprint-spring 

      Step 3: Install spring-security feature

      karaf@root()> feature:install spring-security 

      Step 4: Install the attached spring jar

      karaf@root()> bundle:install -s file:<path to spring jar>/camel-springSecurity-dm-0.0.1.jar 

      Check the logs, for the exceptions while starting the bundle.

      Show
      Pre-requisite:  Install Fuse standalone 7.10 Step 1: Start Fuse standalone using ./fuse clean Step 2: Install the feature aries-blueprint-spring karaf@root()> feature:install aries-blueprint-spring Step 3: Install spring-security feature karaf@root()> feature:install spring-security Step 4: Install the attached spring jar karaf@root()> bundle:install -s file:<path to spring jar>/camel-springSecurity-dm-0.0.1.jar Check the logs, for the exceptions while starting the bundle.
    • Todo

    Description

      When trying to implement spring security using SpringSecurityFilterChain as OSGI service, the application throws the below exception.

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot resolve reference to bean 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0' while setting constructor argument with key [5]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0': Cannot resolve reference to bean 'org.springframework.security.authentication.ProviderManager#0' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': Cannot resolve reference to bean 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.AbstractMethodError: org.apache.aries.blueprint.spring.BlueprintBeanFactory$WrapperBeanFactory.getBeanProvider(Lorg/springframework/core/ResolvableType;)Lorg/springframework/beans/factory/ObjectProvider;
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) ~[?:?]
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) ~[?:?]
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:428) ~[?:?]
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:173) ~[?:?]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1702) ~[?:?]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1447) ~[?:?]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[?:?]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[?:?]
          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[?:?]
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[?:?]
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[?:?]
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[?:?]
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:878) ~[?:?]
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[?:?]
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[?:?]
          at org.apache.aries.blueprint.spring.SpringBeanProcessor.process(SpringBeanProcessor.java:56) ~[?:?]
          at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:573) ~[!/:1.10.3]
          at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:417) [!/:1.10.3]
          at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:298) [!/:1.10.3]
          at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:335) [!/:1.10.3]
          at org.apache.aries.blueprint.container.BlueprintExtender.access$1100(BlueprintExtender.java:75) [!/:1.10.3]
          at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:653) [!/:1.10.3]
          at org.apache.aries.blueprint.spring.extender.SpringOsgiExtension.start(SpringOsgiExtension.java:112) [!/:0.4.0]
          at org.apache.felix.utils.extender.AbstractExtender$1.run(AbstractExtender.java:265) [!/:0.4.0]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_282]
          at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_282]
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_282]
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_282]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_282]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_282]
          at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
      

      Attachments

        Issue Links

          Activity

            People

              ggrzybek Grzegorz Grzybek
              rhn-support-shchavan Shrikant Chavan
              Tomas Veskrna Tomas Veskrna
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: