View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011546 | mantisbt | ldap | public | 2010-02-24 08:25 | 2012-07-20 14:13 |
| Reporter | tk | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 1.2.0 | ||||
| Summary | 0011546: g_use_ldap_realname = ON only works for logged in user | ||||
| Description | I've been using Now I enabled realname lookup from ldap (or, more exactly from AD in my case) with On my installation the realname will only be obtained from the directory service for the currently logged-in user. Realname information for all other users (e.g., in drop-down boxes, view-issues page) will be obtained from mantis database. If I click on a user on manager users page, also LDAP/AD realname will be displayed. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| related to | 0011755 | new | $g_use_ldap_realname set to ON is sometimes ignored |
|
Considering that Mantis updates the DB with LDAP information after successful login, from my point of view the current behavior is fine, I don't see the purpose of querying the LDAP all the time. |
|
|
a) does it really update the /entire/ DB ? b) i (and my users) run my Linux-box about one month w/o reboot (then i issue a forced reboot to all machines). this is the timespan that my mantis-login is open. so update once per login is not sufficent. |
|
|
You are correct, the DB info is updated once, at login-time, for the user who is connecting only. I guess it really depends on how static the LDAP data is. Meaning, how frequently do users' names and e-mails get updated. For me, this data changes very rarely, maybe in your case it's different. As a workaround, you could maybe try to reduce the cookie's validity (g_cookie_time_length) to force a more frequent refresh ? If I understand your need correctly, is that email and name should systematically be pulled from LDAP, without using a cache (i.e. the Mantis DB). |
|
|
An hourly update would be sufficient. Regarding g_cookie_time_length I assume that I have to re-authenticate as soon as this cookie expires, don't I? -- This would not be acceptable. |
|
|
Still have a hard time to understand why a realname should be updated every hour? My name stays the same for as long as I live. Attached a small script that retrieves all users from AD (have fun) |
|
|
I'm not talking of my personal account, but of the thousands of users that are enlisted in our general users database (and where I've attached mantis to via LDAP/AD). |
|
|
In case you want to see their AD names in mantis all the way, suggest you use the provided script to update the mantis_user_table on a regular base. |
|
|
So the requirement is that all users in your LDAP should be registered in Mantis, with up-to-date name/e-mail, right ? In that case, I think the script solution mentioned by CAS, to add/update account information in the Mantis DB, is really the best option for you. The alternative would be to make the lookup of this information completely dynamic, i.e. read from LDAP everytime name/email is needed (and to never use the DB, or to build a cache with a configurable expiration). In terms of efficiency, this does not sound too good as it would cause a very large volume of LDAP traffic. |
|
|
The script allows both ways, one can control Mantis user table from AD (Adding/Updating) or simply update Mantis with correct values. |
|
|
from the discussion i conclude i have two requirements a) major: automatical repeated update of the entire mantis users db against ldap, based on parameterised cookie expiry (I cannot use cron) b) minor: really constistent use of "real name" in mantis |
|
|
b) is a true Mantis issue whereas for a) you have a challenge. |
|
I think it is consistent today... Always pulling the information from DB (and having DB refreshed from LDAP at each user's login). If I'm mistaken, can you please point out precisely what you think is not consistent ? |
|
|
in reply to 0011546:0027300: |
|
|
in reply to 0011546:0027303: |
|
|
Consistent use, see issue 11755. As for why not use cookie, then it becomes an issue of mantis to update the entire user database. In my view this is not a mantis requirement. |
|
|
cron simply is not admissible in the way we operate our web services |
|
|
... in my case, the real name update does not work, anyway. But I have following idea regarding the real name update issue: Access to the AD database is granted via the standard LDAP-interface as it will be needed for authetication - you need a binding user |
|
This is exactly what MantisBT does today.
Which version are you using ? I just (re-)tested this and it works fine for me.
Are you suggesting that MantisBT updates your LDAP with the updated information ? In my opinion, an easier and probably more correct way of handling this, would be to update your Master Data, i.e. the LDAP (following your company's HR process I guess), then ask user to login again so that the Mantis DB gets updated.
I think this actually is a good idea, but beyond the scope of MantisBT. This could probably be built as a plugin, but I see little chance of it making it into the core. |
|
|
a) b) c) |
|
|
something I forgot: |
|
|
Which all boils down to your point c) - you need some external tool to handle mass-updating of Mantis user table based on LDAP query. You either need to use an external script or, as I suggested earlier, write a plugin that will add a new button for the Administrator to trigger the mechanism from e.g. the user admin page. Based on the above as well as your earlier response 0011546:0032256, from my perspective there is no issue with MantisBT. |
|
|
agreed |
|