Question
We've been using TWiki for about a year now on corporate internet, and it's being enthusiastically adopted.
We have a corporate LDAP server for most applications, and it makes sense for TWiki authentication to occur via this server. This could even be a barrier to adoption for some people (?)
I've followed the instructions in
LdapAuthenticationHowTo, and successfully managed to enable authentication via the LDAP server (thanks).
My remaining problem is how to map usernames from the LDAP server to TWiki. Our LDAP server uses 'firstname space lastname' (e.g. fred bloggs) all in lowercase as a username. How do I map this to the WIKINAME
FredBloggs so that TWiki works properly ?
I know perl fairly well, but not LDAP.
Thanks for any advice,
Steve.
Environment
--
SteveJonesST - 19 Nov 2004
Answer
Assuming that the LDAP authentication stuff puts "fred bloggs" in the REMOTE_USER environment, variable, then one way to do what you want would be to have TWiki convert that to "FredBloggs" (pretty trivial perl, unless there are some special case names to worry about). You could do this by hacking TWiki source directly, or using a plugin (which is probably cleaner). If you go the plugin route, see
LoginNameAliasesPlugin for an example of how this could be done (feel free to grab it and modify it for your needs).
--
ClaussStrauch - 19 Nov 2004
Also, there exists the
LdapPlugin
Clauss - would you be interested in helping with the broader authentication issues inherent to the
RegisterCgiScriptRewrite? Its now in subversion.
--
MartinCleaver - 19 Nov 2004
Thanks, Clauss's solution has enabled me to do what I need. Setting this to 'AnsweredQuestions'. Thanks, all.
--
SteveJonesST - 25 Nov 2004