Difference: TWikiAccessControl (12 vs. 13)

Revision 132001-09-04 - MikeMannix

Line: 1 to 1
 

TWiki Access Control

Added:
>
>
Restricting read and write access to topics and webs, by users and groups

Overview

 URCS allows you to define restrictions of who is allowed to view a URCS web, make changes to topics or attach files.

IMPORTANT NOTE: Think twice before restricting read or write access to a web or a topic, because an open system where everybody can contribute is the essence of the WikiCulture. Experience shows that unrestricted write access works very well because:

Changed:
<
<
  • There is enough peer pressure to post only conform content.
  • Content does not get lost because topics are under revision control.
  • A topic revision can be undone by a member of the TWikiAdminGroup in case needed.
>
>
  • Peer influence is enough to ensure that only relevant content is posted.
  • Peer editing - edit anything on a page - keeps topics focussed.
  • All content is preserved under revision control.
    • Edits can be undone by the TWikiAdminGroup (the default administrators group; see Managing Groups).
    • Editing and refactoring (condensing a long topic) is encouraged (there's a safety net).
 

Users and Groups

Access control is based on users and groups.

Changed:
<
<
Users are defined by the user topics in the Main web, i.e. TWikiGuest
  • Users can be authenticated using basic authentication or SSL. Installation Notes has more.
>
>

Managing Users

A user is created by with the TWikiRegistration form. The process generates a topic in the Main web in the new user's WikiName. The default visitor name is TWikiGuest.

Managing Groups

 
Changed:
<
<
Groups are defined by group topics in the Main web, i.e. TWikiAdminGroup
  • A group topic name must end in ...Group
>
>
Groups are defined by group topics in the Main web, like the TWikiAdminGroup.
  • A group topic name must end in _Group
 
  • The group topic should define these two variables:
Added:
>
>
 
    • Set GROUP = < list of users and groups >
    • Set ALLOWTOPICCHANGE = < list of users and groups >
Changed:
<
<
  • GROUP defines the members of the group; it is a comma delimited list of users and other groups. Example:
        * Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeOtherGroup
>
>
  • GROUP defines the members of the group; it is a comma delimited list of users and other groups. Example:
        * Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeOtherGroup
 
  • ALLOWTOPICCHANGE defines who is allowed to change the group topic; it is a comma delimited list of users and groups. You typically want to restrict that to the members of the group itself, so it should contain the name of the topic, i.e.
        * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup
    for the TWikiAdminGroup topic. (This is to prevent users not in the group from editing the topic and gaining unauthorized membership to the group.)
Added:
>
>

Restricting Write Access

 
Changed:
<
<

Write Access Restriction by Topic

>
>

Deny Editing by Topic

  You can define restrictions of who is allowed to make changes to a topic or attach files to it.
Line: 42 to 55
  DENYTOPICCHANGE is evaluated before ALLOWTOPICCHANGE. Access is denied if the authenticated person is in the DENYTOPICCHANGE list, or not in the ALLOWTOPICCHANGE list. Access is granted in case DENYTOPICCHANGE and ALLOWTOPICCHANGE is not defined.
Changed:
<
<

Write Access Restriction by Web

>
>

Deny Editing by Web

  You can define restrictions of who is allowed to make changes to a URCS web. This includes creating new topics, changing topics or attaching files.
Line: 54 to 67
 
  • DENYTOPICCHANGE (in topic) overrides DENYWEBCHANGE (in WebPreferences)
  • ALLOWTOPICCHANGE (in topic) overrides ALLOWWEBCHANGE (in WebPreferences)
Changed:
<
<

Rename Access Restriction by Topic

>
>

Restricting Rename Access

Deny Renaming by Topic

  You can define restrictions of who is allowed to rename a topic. Note that users need this permission in addition to the CHANGE permission in order to rename a topic. They also need CHANGE access to change references in referring topics.
Line: 68 to 85
  DENYTOPICRENAME is evaluated before ALLOWTOPICRENAME. Access is denied if the authenticated person is in the DENYTOPICRENAME list, or not in the ALLOWTOPICRENAME list. Access is granted in case DENYTOPICRENAME and ALLOWTOPICRENAME is not defined.
Changed:
<
<

Rename Access Restriction by Web

>
>

Deny Renaming by Web

  You can define restrictions of who is allowed to do renames for a URCS web.
Line: 80 to 97
 
  • DENYTOPICRENAME (in topic) overrides DENYWEBRENAME (in WebPreferences)
  • ALLOWTOPICRENAME (in topic) overrides ALLOWWEBRENAME (in WebPreferences)
Changed:
<
<

Read Access Restriction by Web

>
>

Restricting Read Access

  You can define restrictions of who is allowed to view a URCS web.
Line: 88 to 105
 
  • Set DENYWEBVIEW = < list of users and groups >
  • Set ALLOWWEBVIEW = < list of users and groups >
Changed:
<
<

Read Restriction Known Issues

>
>

Known Issues

 
  • The view restriction is not suitable for very sensitive content since there is a way to circumvent the read access restriction.
Changed:
<
<
  • Read access restriction only works if the view script is authenticated, that means that users need to log on also just to read topics. TWiki Installation has more on basic authentication based on the .htaccess file.
>
>
  • Read access restriction only works if the view script is authenticated, that means that users need to log on also just to read topics. TWiki Installation Guide has more on Basic Authentication based on the .htaccess file.

Selective Unrestricted Web Access
 
  • There is a workaround if you prefer to have unrestricted access to view topics located in normal webs, and to authenticate users only for webs where view restriction is enabled:
Changed:
<
<
    • Leave the view script non authenticated in the .htaccess file.
    • Enable the $doRememberRemoteUser flag in wikicfg.pm as described in TWiki Authentication. URCS will now remember the IP address of an authenticated user.
    • Copy the view script to viewauth (or better, create a symbolic link)
    • Add viewauth to the list of authenticated scripts in the .htaccess file.
>
>
    • Leave the view script non-authenticated in the .htaccess file.
    • Enable the $doRememberRemoteUser flag in lib/wikicfg.pm as described in User Authentication. URCS will now remember the IP address of an authenticated user.
    • Copy the view script to viewauth (or better, create a symbolic link)
    • Add viewauth to the list of authenticated scripts in the .htaccess file.
 
    • When a user accesses a web where you enabled view restriction, URCS 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.
Changed:
<
<
  • 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:
>
>
  • 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
Changed:
<
<
  • It is not recommended to restrict view access to individual topics since all content is searchable within a web.
>
>
  • It is not recommended to restrict view access to individual topics since all content is searchable within a web.
 

The SuperAdminGroup

Changed:
<
<
The above schema can lock completely a topic in case of a typing error of the ALLOWTOPICCHANGE setting (see UnchangeableTopicBug). To avoid this:
  • set the $superAdminGroup variable in TWiki.cfg to the name of a group of users that are always allowed to edit/view topics. E.g.:

>
>
The above schema can lock completely a topic in case of a typing error of the ALLOWTOPICCHANGE setting (see UnchangeableTopicBug for more detail). 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.
 $superAdminGroup = "TWikiAdminGroup";
Changed:
<
<
  • the default setting is not to have superusers
>
>
  • The default setting is not to have superusers.
  -- PeterThoeny - 16 Mar 2001
-- AndreaSterbini - 11 Apr 2001
 
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 URCS? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiAccessControl.