gravitee-io / issues

Gravitee.io - API Platform - Issues
65 stars 26 forks source link

[management] add LDAP Referral property #5340

Open fbussolin opened 3 years ago

fbussolin commented 3 years ago

I cannot use your version of ldap feature/plugin in my shop because the referral property is not set. Due to this the following exception is throw:

Expected Behavior

LDAP Authentication OK

Current Behavior

Exception:

Possible Solution

In io.gravitee.rest.api.idp.ldap.authentication.LdapAuthenticationProvider create a property to allow the enabling and setup of referral in DefaultSpringSecurityContextSource creation.

For your evaluation, something like that: if(environment.getProperty("context.referral.enabled")) then contextSource.setReferral(environment.getProperty("context.referral.value"));

Steps to Reproduce (for bugs)

  1. Set the following: security: providers:

    • type: ldap context: username: "" password: "" url: "ldap://address:389/DC=v1,DC=v2,DC=v3" base: "DC=v1,DC=v2,DC=v3" authentication: user: base: "OU=Users,OU=Group1,OU=Group2" filter: "mail={0}" lookup: user: base: "OU=Users,OU=Group1,OU=Group2" filter: "(&(objectClass=user)(objectClass=person)(|(cn={0})(mail={0})))"
  2. Try to use LDAP feature/plugin from management-ui

Context

I have a custom version of your plugin setting the referral property to "follow".

Your Environment

LDAP issue

brasseld commented 3 years ago

Hi @fbussolin

Could you create a Pull Request for this ?

Thanks,