How to correctly run a flow-ui application with ldap add-on

I started trying to migrate the first application from classic to flow-ui.

Adding the dependency on implementation("io.jmix.ldap:jmix-ldap-starter") based on Jmix version 1.5.1 configuring the LDAP specific application-properties, the application startup fails:

***************************
APPLICATION FAILED TO START
***************************

Description:

Field authenticationManager in io.jmix.core.usersubstitution.impl.UserSubstitutionManagerImpl required a single bean, but 2 were found:
	- ldap_AuthenticationManager: defined by method 'ldapAuthenticationManager' in class path resource [io/jmix/autoconfigure/ldap/LdapAutoConfiguration$DefaultLdapSecurityConfiguration.class]
	- sec_AuthenticationManager: defined by method 'providerManager' in class path resource [io/jmix/autoconfigure/securityflowui/SecurityFlowuiAutoConfiguration$DefaultFlowuiSecurityConfiguration.class]


Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

I could not find a specific documentation using the ldap addon within flow-ui applications.

What is the correct way of using an LDAP authentication in a flow-ui application?

Dear support,

is there any way to do it?

Or do Flow-UI applications not support LDAP authentication (and the REST API) yet?

Hi,

I’ve created an issue for this. Thank you for reporting.

As for REST API, do you have difficulties with it? I’ve just tried and FlowUI and REST API seem to work together.

1 Like

@gorbunkov The problem using the REST API was, that any request became redirected to the URL path /login - but I didn’t look into more detail on this.

REST API with Flow UI worked for me with the latest Jmix version