Hi

I just fixed the example so we wont forget to do it
https://github.com/apache/camel/commit/ba6fc872e40b48344330b7bc469892e63eb739cc

On Fri, Aug 19, 2016 at 10:08 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Hi
>
> Thanks for spotting.
>
> You are welcome to log a JIRA and provide a patch / github PR with a fix
> http://camel.apache.org/support.html
> http://camel.apache.org/contributing.html
>
> On Fri, Aug 19, 2016 at 9:53 AM, olivier <olivier.delo...@gmail.com> wrote:
>> So, i've figured it out by myself. Here is the solution for those who might
>> have the same issue.
>>
>> It seems Camel security 2.17.3 depends on Spring security 4.x...but the
>> camel-context spring security part of the example is written in Spring
>> security 3.x, which produces the errors above, because, indeed, in Spring
>> security 4.x, there is no more default constructor for AffirmativeBased
>> (which existed in 3.x version).
>>
>> So below are the changes to do in camel-context.xml.
>>
>> The <spring-security:http> becomes:
>> <spring-security:http realm="User Restrict Realm">
>>     *<spring-security:intercept-url pattern="/camel/**"
>> access="hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')"/>*
>>     <spring-security:http-basic/>
>>     <spring-security:remember-me/>
>>   </spring-security:http>
>>
>> And the accessDecisionManager becomes:
>> <bean id="accessDecisionManager"
>> class="org.springframework.security.access.vote.AffirmativeBased">
>>     <property name="allowIfAllAbstainDecisions" value="true"/>
>>     *<constructor-arg>
>>       <list>
>>         <bean class="org.springframework.security.access.vote.RoleVoter"/>
>>       </list>
>>     </constructor-arg>*
>>   </bean>
>>
>> Then you can mvn install and mvn jetty:run without any error, and test the
>> endpoints by passing the credentials in HTTP Authorization header.
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528p5786624.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to