Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to support new SearchDnResolver's resolveFromAttribute parameter #5112

Closed
wants to merge 3 commits into from

Conversation

elmendavies
Copy link
Contributor

Dear all,

By default, CAS LDAP module in the AUTHENTICATED or ANONYMOUS configuration will search for an entry using the search settings, obtain the entry's DN, authenticate against that DN, and then proceed with attribute resolution.

I have included the code for allowing to use an arbitrary LDAP entry's attribute to use to autenticate against. The solution is to add a resolveFromAttribute in the SearchDnResolver that, when present, will make the resolver to try to autenticate using the DN on the attribute specificated.

I added an example in LDAPTIVE:
vt-middleware/ldaptive#192 (comment)

For the test, I have used a modified version of the mmoayyed/ldap Docker image. The modification is the following:

#ldapmodify ...
dn: cn=PD Managers,ou=Groups,dc=example,dc=org
changetype: modify
add: owner
owner: cn=admin,dc=example,dc=org

In this example, the test defines the new configuration parameter set to:
cas.authn.ldap[0].resolve-from-attribute=owner

The test checks that the user can authenticate using PD Managers as username and admin's credential.

The ldaptive dependency is set to 2.0.2-SNAPSHOT (compiled from PR vt-middleware/ldaptive#192).

WIP, things to do:

  • Update the depedency when LDAPTIVE is ready (I will follow ldaptive and update the PR)
  • Add sample to mmoayyed/ldap Docker image or other place to not break the build (I contact to Misagh if needed).

Do you see any problem with this implementation?

Best regards,
Miguel

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Miguel Martinez de Espronceda seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mmoayyed
Copy link
Member

Conceptually, no problems. Let's revisit when the ldaptive release is available.

@elmendavies
Copy link
Contributor Author

I moved a check in LDAPTIVE to configuration propoerties ("if the cas.authn.ldap[0].resolve-from-attribute is initialized from blank string make it null"):

vt-middleware/ldaptive#192 (comment)

@mmoayyed mmoayyed modified the milestones: 6.4.0-RC3, 6.4.0-RC4 Apr 4, 2021
@mmoayyed mmoayyed modified the milestones: 6.4.0-RC4, 6.4.0-RC5 May 9, 2021
@mmoayyed mmoayyed modified the milestones: 6.4.0-RC5, 6.5.0-RC1 Jun 12, 2021
@mmoayyed
Copy link
Member

Merged out of band. Thank you for the contribution!

@mmoayyed mmoayyed closed this Aug 26, 2021
@mmoayyed mmoayyed changed the title WIP, Modifications to support new SearchDnResolver's resolveFromAttribute parameter Modifications to support new SearchDnResolver's resolveFromAttribute parameter Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants