Hi, Thanks for having handled this.
2016-08-26 22:14 GMT+02:00 Claus Ibsen-2 [via Camel] < ml-node+s465427n5786774...@n5.nabble.com>: > Hi > > I just fixed the example so we wont forget to do it > https://github.com/apache/camel/commit/ba6fc872e40b48344330b7bc469892 > e63eb739cc > > > On Fri, Aug 19, 2016 at 10:08 AM, Claus Ibsen <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=5786774&i=0>> 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 <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=5786774&i=1>> 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 > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://camel.465427.n5.nabble.com/Can-t-make-camel-example- > spring-security-works-tp5786528p5786774.html > To unsubscribe from Can't make camel-example-spring-security works, click > here > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5786528&code=b2xpdmllci5kZWxvYnJlQGdtYWlsLmNvbXw1Nzg2NTI4fDE2OTkwMDM5OTY=> > . > NAML > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528p5786963.html Sent from the Camel - Users mailing list archive at Nabble.com.