Difference: TWikiAccessControl (21 vs. 22)

Revision 222002-04-02 - MikeMannix

Line: 1 to 1
 
Line: 57 to 57
 

Deny Editing by Topic

Changed:
<
<
Denying editing of a topic also restricts attaching files to it; both privileges are assigned together.
>
>
Denying editing of a topic also restricts file attachment; both privileges are assigned together.
 
  • Define one or both of these variables in a topic, preferably at the end of the page:
    • Set DENYTOPICCHANGE = < list of users and groups >
    • Set ALLOWTOPICCHANGE = < list of users and groups >
Line: 119 to 119
 You can prevent selected users and groups from viewing certain TWiki webs by setting one or both of these variables in each web's WebPreferences topic:
    • Set DENYWEBVIEW = < list of users and groups >
    • Set ALLOWWEBVIEW = < list of users and groups >
Changed:
<
<
  • If keeping a hidden web out of general use is a consideration, you should also prevent the "all webs" search option from accessing each hidden web, by enabling the NOSEARCHALL variable in WebPreferences:
>
>
TIP If keeping a hidden web out of general use is a consideration, you can prevent the all webs search option from accessing hidden webs, by enabling the NOSEARCHALL variable in WebPreferences:
 
    • Set NOSEARCHALL = on
    • It is not recommended to restrict view access to individual topics since all content is searchable within a web.
Changed:
<
<
  • HELPThis method only works if the view script is authenticated, which means that all users have to login, even for read-only access. (An open guest account, like TWikiGuest, can get around this, allowing anyone to login with, for example, view-only access for public webs.) TWikiInstallationGuide has more on Basic Authentication, using the .htaccess file.
  • ALERT! Hiding webs is not very secure, as there is a way to circumvent the read access restriction. It can be useful in certain situations - for example, to simplify site organization and clutter, by hiding low traffic webs - but is not recommended for securing sensitive content.
>
>
    • HELPThis method only works if the view script is authenticated, which means that all users have to login, even for read-only access. (An open guest account, like TWikiGuest, can get around this, allowing anyone to login to a common account with, for example, view-only access for public webs.) TWikiInstallationGuide has more on Basic Authentication, using the .htaccess file.

ALERT! Hiding webs is not very secure, as there is a way to circumvent the read access restriction. It can be useful in certain situations - for example, to simplify site organization and clutter, by hiding low traffic webs - but is not recommended for securing sensitive content. (See the next section for a more secure approach.)

 

Create Authenticated Access By Web

Changed:
<
<
To selectively restrict web access with the security of Basic Authentication, there is a reliable workaround that involves some straightforward code modification:
>
>
ALERT! THIS SECTION CONTAINS WORKAROUNDS. Perhaps unconventional for official documentation, but practical, the following method for extending TWiki functionality involves modifying core TWiki, making it essentially not a feature but a hack. Still, it is officially TWiki developer-approved and documented, and will no doubt be included in some form in an upcoming edition of TWiki.

To selectively restrict web access with the security of Basic Authentication, there is a reliable workaround that involves some straightforward code modification:

 
  1. Set aside the view script (rename) and create a view subdirectory in its place.
  2. In the view subdirectory, create a separate copy of a modified viewing script for each web, and create .htaccess settings for the restricted webs.
    • TIP You can use symbolic links to a single copy of the viewing script to make any script updates that much easier.
Changed:
<
<
>
>
 Example of viewing script redirect
#!/usr/bin/perl -w
Line: 162 to 166
 EOF
Changed:
<
<
>
>
 
Changed:
<
<
A SECOND OPTION: A less reliable workaround that also requires code changes is available to provide the same unrestricted viewing access, with authentication required only on selected webs:
>
>
A SECOND OPTION: A less reliable workaround that doesn't involve code changes, but does require renaming a script, can provide the same generally unrestricted viewing access, with authentication only on selected webs:
 
  1. Omit the view script from the .htaccess file.
Changed:
<
<
  1. Enable the $doRememberRemoteUser flag in lib/TWiki.cfg as described in TWikiUserAuthentication. TWiki will now remember the IP address of an authenticated user. 1. Copy the view script to viewauth (or better, create a symbolic link) 1. Add viewauth to the list of authenticated scripts in the .htaccess file.
>
>
  1. Enable the $doRememberRemoteUser flag in lib/TWiki.cfg as described in TWikiUserAuthentication. TWiki will now remember the IP address of an authenticated user.
  2. Copy the view script to viewauth (or better, create a symbolic link)
  3. Add viewauth to the list of authenticated scripts in the .htaccess file.
 
    • When a user accesses a web where you enabled view restriction, TWiki will redirect from the view script to the viewauth script once (this happens only if the user has never edited a topic). Doing so will ask for authentication. The viewauth script shows the requested topic if the user could log on and if the user is authorized to see that web.
    • If you enable view restriction for a web, it is recommended to restrict search "all webs" from searching this web. Enable this restriction with the NOSEARCHALL variable in its WebPreferences, like:
      • Set NOSEARCHALL = on
Line: 184 to 190
 

The SuperAdminGroup

Changed:
<
<
By mistyping a user or group name in the ALLOWTOPICCHANGE setting, it's possible to lock a topic so that it no-one can edit it from a browser. To avoid this:
  • Set the $superAdminGroup variable in lib/TWiki.cfg to the name of a group of users that are always allowed to edit/view topics.
>
>
By mistyping a user or group name in the ALLOWTOPICCHANGE setting, it's possible to lock a topic so that no-one can edit it from a browser. To avoid this, you can create Web-based superusers:
  • Set the $superAdminGroup variable in lib/TWiki.cfg to the name of a group of users who are always allowed to edit/view topics.
 
$superAdminGroup = "TWikiAdminGroup";
Line: 193 to 199
 
  • The default setting is not to have superusers.
Changed:
<
<
-- MikeMannix - 20 Mar 2002
>
>
-- MikeMannix - 01 Apr 2002
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiAccessControl.