cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti 5.17 Spring dependency

himani
Champ in-the-making
Champ in-the-making
Hi,

We are currently on Activiti version 5.16 and upgrading to 5.17. We had integrated the engine without using any spring dependency. The documentation still says that 5.17 version can be used without any spring dependencies. The engine came-up fine without adding spring jars but I am stuck at 2 places :

>In the new version the rest-framework restlet seems to be replaced with spring mvc. Is there any way we can still use
the Rest API's the old way , i.e. without using spring dependencies??
>We were bypassing the Activiti Basic Authentication by extending the org.activiti.rest.service.application.ActivitiRestServicesApplication and attaching the customized RestAuthenticator to it. In 5.17 we are using Spring SecurityConfiguration for overriding capabilities. Is there any way to do it non-spring way?

Thanks
Himani
6 REPLIES 6

trademak
Star Contributor
Star Contributor
Hi Himani,

We switched to Spring MVC so for the REST API there's no way to use it without the Spring dependencies.
Yes, the SecurityConfiguration is the place to implement this custom logic. There's no non-Spring way to do this.

Best regards,

skidvd
Champ in-the-making
Champ in-the-making
Is there any documentation or examples on how to accomplish this with Spring SecurityConfiguration?

trademak
Star Contributor
Star Contributor
What are you trying to change? There's a lot of documentation available for Spring Security of course.

Best regards,

jbarrez
Star Contributor
Star Contributor
Spring security has decent docs imo, typically what you'd do is overwrite this method:

<code>
    @Override
    protected void configure(HttpSecurity http) throws Exception {
      http
        .authenticationProvider(authenticationProvider())
        .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
        .csrf().disable()
        .authorizeRequests()
          .anyRequest().authenticated()
          .and()
        .httpBasic();
    }
</code>

with your own code

himani
Champ in-the-making
Champ in-the-making
Thanks much for the info !!

Can I downlaod the source code of activiti-rest war (in 5.17) from somewhere. I think the Configuration classes in there provide a good start.
org\activiti\rest\conf\SecurityConfiguration

jbarrez
Star Contributor
Star Contributor
Activiti is open source … all our source code is on Github. This particular class is here: https://github.com/Activiti/Activiti/blob/master/modules/activiti-rest/src/test/java/org/activiti/re...