Tags:
create new tag
view all tags

Question

(This might be more appropriate in the Codev area if it doesn't have an answer that I simply haven't found.)

Does TWiki have the capability to use external authentication (for example, to an LDAP) database and still enforce having registered on the TWiki?

Our university is currently wanting to move toward using a proprietary, very limited system for web-based interaction, and being able to have some of the user authentication process kept on the cs side and away from individual (non-technial) faculty would be a win. But the overall wiki concept would break down at some level if I could just login as maur0064 and have the wiki let me edit without having a corresponding WikiName - username mapping.

  • TWiki version: Feb 2003
  • Perl version: 5.6.1
  • Web server & version: Apache 1.3.27
  • Server OS: Debian Linux
  • Web browser & version: N/A
  • Client OS: N/A

-- MikeMaurer - 24 Apr 2003

Answer

Possible solution (a hack): if the LDAP (or whatever) registered user base doesn't change very often, extract the login name and full name and build the TWikiUsers outside of twiki:

echo "   * JohnHancockSmith - jhsmith" >> /var/www/twiki/data/Users/TWikiUsers.txt

This breaks versioning but it works.

-- MattWilkie - 24 Apr 2003

Assuming that all LDAP users have lower case user names: In the edit script you could check if the wikiname is upper case. If not bail out with an oops dialog.

    # $userName set after &TWiki::initialize, e.g. "maur0064"
    my $meta = "";
    my $extra = "";
    my $wikiUserName = &TWiki::userToWikiName( $userName ); # e.g. "Main.MikeMaurer" or "Main.maur0064" if not registered
    my $wikiName     = userToWikiName( $userName, 1 );      # e.g. "MikeMaurer" or "maur0064" if not registered
    if( $wikiName =~ /^[a-z0-9_]/ ) {
        my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsnotregistered" );
        TWiki::redirect( $query, $url );
        return;
    }

This code is not tested. You would need to create the "oopsnotregistered.tmpl" template.

-- PeterThoeny - 27 Jul 2003

See RequireRegistrationPlugin

-- PeterThoeny - 28 Jul 2007

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-07-28 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.