Closed icuxika closed 2 years ago
Sorry, this may be my problem. It has no problem in a simple springboot project.
hello,could you please paste your entire pom file? I have the same problem.. my pom is below and no parent pom
then promt ”flowable.common.app.idm-url
must be set“ when start program
@zhaobingcheng Okay
<properties>
<flowable.version>6.7.2</flowable.version>
</properties>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-ui-idm</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-ui-modeler</artifactId>
<version>${flowable.version}</version>
</dependency>
and mysql version is 8.0.28
.
In a Hello, world
SpringBoot project, there was no problem.
@zhaobingcheng
management:
health:
ldap:
enabled: false
Put this config in your applicaton.yml
will help you reovle the problem about ldap checking failed.
thank you, I see you import the "flowable-spring-boot-starter-ui-idm". it does work. but the authentication mechanism of flowable will also make effect, right?....does it meet your need?..don't you want to disable the idm and just want to use modeler?..
Something changes... Now I want to solve the conflict between the Spring Security
configuration of idm and the Spring Security
in my own project. Maybe I need to study the source code of flowable-engine
first and then try to solve it.
well, maybe, you can consider to reduce the version of flowable or improve the version of Spring Security in your own project...it may be more easier.
@zhaobingcheng
Some ways to skip flowable-ui 6.7.2
's built-in login.
Recreate org.flowable.ui.common.security.FlowableUiSecurityAutoConfiguration
in your project to overwrite the original functionality.
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter({
IdmEngineServicesAutoConfiguration.class,
})
@AutoConfigureBefore({
FlowableSecurityAutoConfiguration.class,
OAuth2ClientAutoConfiguration.class,
})
public class FlowableUiSecurityAutoConfiguration {
@Bean
public ApiHttpSecurityCustomizer apiHttpSecurityCustomizer() {
return new ApiHttpSecurityCustomizer() {
@Override
public void customize(HttpSecurity http) throws Exception {
}
};
}
@Bean
public CurrentUserProvider currentUserProvider() {
return new CurrentUserProvider() {
@Override
public UserRepresentation getCurrentUser(Authentication authentication) {
UserRepresentation userRepresentation = new UserRepresentation();
userRepresentation.setId("0");
userRepresentation.setFirstName("driftwood");
userRepresentation.setLastName("driftwood");
userRepresentation.setPrivileges(
Arrays.asList(
DefaultPrivileges.ACCESS_IDM,
DefaultPrivileges.ACCESS_MODELER,
DefaultPrivileges.ACCESS_ADMIN,
DefaultPrivileges.ACCESS_TASK,
DefaultPrivileges.ACCESS_REST_API
)
);
return userRepresentation;
}
@Override
public boolean supports(Authentication authentication) {
return true;
}
};
}
}
flowable-ui
.Spring Security
, you should set http.csrf().disable()
& .antMatchers("/modeler/**", "/modeler-app/**").permitAll()
.org.flowable.ui.common.security.SecurityUtils
and rewrite method getCurrentUserId
, depending on whether it will affect you to save the model.org.flowable.ui.modeler.rest.api.ApiModelResource#saveModel
Model model = this.modelService.getModel(modelId);
String currentUserId = SecurityUtils.getCurrentUserId();
boolean currentUserIsOwner = model.getLastUpdatedBy().equals(currentUserId);
@icuxika yeah, the ways do work. I saw the authentication was skipped. thank you very much😄
Version
6.7.2
Question
Could you tell me how to remove the dependency of
flowable-spring-boot-starter-ui-modeler
onflowable.common.app.idm-url
? I just want to integrateflowable-spring-boot-starter-ui-modeler
into my spring cloud and use the existing security authentication system.