[SHIRO-640] queryForAuthenticationInfo(): resolve DN using user name#74
[SHIRO-640] queryForAuthenticationInfo(): resolve DN using user name#74mephi42 wants to merge 2 commits intoapache:masterfrom
Conversation
|
We may want to combine some of the functionality in the DefaultLdapRealm with the AD realm. Take a look at: |
d09d2e8 to
0705ff3
Compare
|
Why are DefaultLdapRealm and AD realm are separated altogether? |
|
IIRC, ActiveDirectory typically uses one or two different schemas,
depending on how it is configured. The schema for an LDAP server could be
just about anything (but typically follow a couple patterns).
We could make them share a lot more code through the AbstractLdapRealm
…On Sat, Nov 25, 2017 at 6:25 PM, mephi42 ***@***.***> wrote:
Why are DefaultLdapRealm and AD realm are separated altogether?
Wouldn't it make sense to merge them?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#74 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAGGcnQM9ASnfsVDkSQKhAPi_JPG7bCsks5s6KHQgaJpZM4QjCnM>
.
|
Preparation for reusing that logic in AbstractLdapRealm.
0705ff3 to
4be488f
Compare
|
In this update I made two improvements:
|
|
@bdemers @mephi42 , did you think of a situation where the userDN cannot be composed by adding a prefix and a suffix to the username at all. So where authentication is handled with the userPrincipalName, but where the userDN is required for authorization. I haven't found a REALM implementation that resolves this issue. Currently I created a custom implementation for supporting this LDAP; but I was wondering whether I am the only one facing this problem. Instead of working with an userDnTemplate, I worked with an authenticationTemplate and a user search base. Using those, I was able to retrieve the userDN. This is the config file I'm currently using: I have a local branch where I've implemented the changes in case you're willing to check them out. Please be critic to what I've done, Your experience in this area might result in a better approach for handling this. |
|
@rubenvanwanzeele my running theory is that no two LDAP instances are the same :) Put your code on a branch and add a link, it would be nice to merge in the common code if possible! |
|
Thanks @rubenvanwanzeele: #81 |
|
@bdemers What's the status of this? Is there any update on this functionality? |
|
@rubenvanwanzeele the biggest thing I think we would need are tests. Any help in either of those cases would be appreciated! |
I am trying to use ActiveDirectoryRealm with searchFilter in order to make it possible to log in using e-mail (which is not part of DN). I see that this is partially supported in getRoleNamesForUser(), but not in queryForAuthenticationInfo().
This change make it fully work for me, but I have a feeling that it may disturb other users, so I'm willing to work on improving it.