Difference: TWikiAccessControl (34 vs. 35)

Revision 352007-07-08 - TWikiContributor

Line: 1 to 1
Deleted:
<
<
 
Changed:
<
<

TWiki Access Control

>
>

TWiki Access Control

  Restricting read and write access to topics and webs, by Users and groups
Line: 10 to 8
  TIP Tip: TWiki:TWiki.TWikiAccessControlSupplement on TWiki.org has additional documentation on access control.
Added:
>
>
 

An Important Control Consideration

Line: 17 to 17
 
  • Peer influence is enough to ensure that only relevant content is posted.
  • Peer editing - the ability for anyone to rearrange all content on a page - keeps topics focused.
  • In TWiki, content is transparently preserved under revision control:
Changed:
<
<
>
>
 
    • Users are encouraged to edit and refactor (condense a long topic), since there's a safety net.
As a collaboration guideline:
  • Create broad-based Groups (for more and varied input), and...
Line: 43 to 43
 A user can create an account in TWikiRegistration. The following actions are performed:
  • WikiName and encrypted password are recorded using the password manager if authentication is enabled.
  • A confirmation e-mail is sent to the user.
Changed:
<
<
  • A user home page with the WikiName of the user is created in the Main web.
  • The user is added to the TWikiUsers topic.
>
>
  • A user home page with the WikiName of the user is created in the Main web.
  • The user is added to the TWikiUsers topic.
 
Changed:
<
<
The default visitor name is TWikiGuest. This is the non-authenticated user.
>
>
The default visitor name is TWikiGuest. This is the non-authenticated user.
 

Managing Groups

The following describes the standard TWiki support for groups. Your local TWiki may have an alternate group mapping manager installed. Check with your TWiki administrator if you are in doubt.

Changed:
<
<
Groups are defined by group topics located in the Main web. To create a new group, visit TWikiGroups and enter the name of the new group ending in Group into the "new group" form field. This will create a new group topic with two important settings:
>
>
Groups are defined by group topics located in the Main web. To create a new group, visit TWikiGroups and enter the name of the new group ending in Group into the "new group" form field. This will create a new group topic with two important settings:
 
  • Set GROUP = < list of Users and/or Groups >
  • Set ALLOWTOPICCHANGE = < list of Users and/or Groups >

The GROUP setting is a comma-separated list of users and/or other groups. Example:

Changed:
<
<
  • Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeGroup
>
>
  • Set GROUP = Main.SomeUser, Main.OtherUser, Main.SomeGroup
  The ALLOWTOPICCHANGE setting 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. This prevents users not in the group from editing the topic to give themselves or others access. For example, for the KasabianGroup topic write:
Changed:
<
<
  • Set ALLOWTOPICCHANGE = Main.KasabianGroup
>
>
  • Set ALLOWTOPICCHANGE = Main.KasabianGroup
  ALERT! Note: TWiki has strict formatting rules. Make sure you have three spaces, an asterisk, and an extra space in front of any access control rule.
Line: 70 to 70
  A number of TWiki functions (for example, renaming webs) are only available to administrators. Administrators are simply users who belong to the SuperAdminGroup. This is a standard user group, the name of which is defined by {SuperAdminGroup} setting in configure. The default name of this group is the TWikiAdminGroup. The system administrator may have chosen a different name for this group if your local TWiki uses an alternate group mapping manager but for simplicity we will use the default name TWikiAdminGroup in the rest of this topic.
Changed:
<
<
You can create new administrators simply by adding them to the TWikiAdminGroup topic. For example,
  • Set GROUP= Main.ElizabethWindsor, Main.TonyBlair
>
>
You can create new administrators simply by adding them to the TWikiAdminGroup topic. For example,
  • Set GROUP = Main.ElizabethWindsor, Main.TonyBlair
 A member of the Super Admin Group has unrestricted access throughout the TWiki, so only trusted staff should be added to this group.

Restricting Access

You can define who is allowed to read or write to a web or a topic. Note that some plugins may not respect access permissions.

Changed:
<
<
  • Restricting VIEW blocks viewing and searching of content.
>
>
  • Restricting VIEW blocks viewing and searching of content. When you restric VIEW to a topic or web, this also restricts INCLUDE and Formatted SEARCH from showing the content of the topics.
 
  • Restricting CHANGE blocks creating new topics, changing topics or attaching files.
  • Restricting RENAME prevents renaming of topics within a web.

Line: 99 to 99
 
    • Set DENYWEBRENAME = < comma-delimited list of Users and Groups >
    • Set ALLOWWEBRENAME = < comma-delimited list of Users and Groups >
Changed:
<
<
If your site allows hierarchical webs, then access to sub-webs is determined from the access controls of the parent web, plus the access controls in the sub-web. So, if the parent web has ALLOWWEBVIEW set, this will also apply to the subweb.
>
>
If your site allows hierarchical webs, then access to sub-webs is determined from the access controls of the parent web, plus the access controls in the sub-web. So, if the parent web has ALLOWWEBVIEW set, this will also apply to the subweb. Also note that you will need to ensure that the parent web's FINALPREFERENCES does not include the access control settings listed above. Otherwise you will not be able override the parent web's access control settings in sub-webs.
  Creation and renaming of sub-webs is controlled by the WEBCHANGE setting on the parent web (or ROOTCHANGE for root webs). Renaming is additionally restricted by the setting of WEBRENAME in the web itself.
Added:
>
>
Note: If you restrict access to the Main, make sure to add the TWikiRegistrationAgent so that users can register. Example:
    • Set ALLOWWEBCHANGE = TWikiAdminGroup, TWikiRegistrationAgent
 Note: For Web level access rights Setting any of these settings to an empty value has the same effect as not setting them at all. Please note that the documentation of TWiki 4.0 and earlier versions of TWiki 4.1 did not reflect the actual implementation, e.g. an empty ALLOWWEBVIEW does not prevent anyone from viewing the web, and an an empty DENYWEBVIEW does not allow all to view the web.

Controlling access to a Topic

Line: 152 to 155
 

Controlling who can manage top-level webs

Top level webs are a special case, because they don't have a parent web with a WebPreferences. So there has to be a special control just for the root level.

Changed:
<
<
  • You can define these settings in the Main.%TWIKIPREFSTOPIC% topic, preferable towards the end of the topic:
>
>
  • You can define these settings in the Main.%TWIKIPREFSTOPIC% topic, preferable towards the end of the topic:
 
    • Set DENYROOTCHANGE = < comma-delimited list of Users and Groups >
    • Set ALLOWROOTCHANGE = < comma-delimited list of Users and Groups >
Note that you do not require ROOTCHANGE access to rename an existing top-level web. You just need WEBCHANGE in the web itself.
Line: 189 to 192
  ALERT! Note: Obfuscating a web without view access control is very insecure, as anyone who knows the URL can access the web.
Added:
>
>

Restrict Access to Whole TWiki Site

For a firewalled TWiki, e.g. an intranet wiki or extranet wiki, you want to allow only invited people to access your TWiki. In this case, enable user authentication with ApacheLogin and lock down access to the whole twiki/bin and twiki/pub directories to all but valid users. In the Apache .htaccess file or the appropriate .conf file, replace the <FilesMatch "(attach|edit|... section with this:

<FilesMatch ".*">
       require valid-user
</FilesMatch>

If needed, you can further restrict access to selected webs with ALLOWWEBVIEW and other access control settings.

Note: With this configuration, someone with access to the site needs to register new users.

 

Authenticate all Webs and Restrict Selected Webs

Use the following setup to authenticate users for topic viewing in all webs and to restrict access to selected webs. Requires TWikiUserAuthentication to be enabled.

Added:
>
>
  1. Set require valid-user on your view script in .htaccess or the appropriate Apache .conf file. As of 4.x, this looks like: FilesMatch "(attach|edit|manage|rename|save|view|upload|mail|logon|.*auth).*" (normally view is not in that list).
 
  1. Restrict view access to selected Users and Groups. Set one or both of these variables in its WebPreferences topic:
    • Set DENYWEBVIEW = < list of Users and Groups >
    • Set ALLOWWEBVIEW = < list of Users and Groups >
Changed:
<
<
    • Note: DENYWEBVIEW is evaluated before ALLOWWEBVIEW. Access is denied if the authenticated person is in the DENYWEBVIEW list, or not in the ALLOWWEBVIEW list. Access is granted in case DENYWEBVIEW and ALLOWWEBVIEW is not defined.
>
>
    • Note: DENYWEBVIEW is evaluated before ALLOWWEBVIEW. Access is denied if the authenticated person is in the DENYWEBVIEW list, or not in the ALLOWWEBVIEW list. Access is granted if DENYWEBVIEW and ALLOWWEBVIEW are not defined.
  1. If you still want public users to be able to register automatically follow TWiki:TWiki.RegisterOnViewRestrictedSite.
 

Authenticate and Restrict Selected Webs Only

Line: 205 to 224
 
  1. Restrict view access to selected Users and Groups. Set one or both of these variables in its WebPreferences topic:
    • Set DENYWEBVIEW = < list of Users and Groups >
    • Set ALLOWWEBVIEW = < list of Users and Groups >
Changed:
<
<
    • Note: DENYWEBVIEW is evaluated before ALLOWWEBVIEW. Access is denied if the authenticated person is in the DENYWEBVIEW list, or not in the ALLOWWEBVIEW list. Access is granted in case DENYWEBVIEW and ALLOWWEBVIEW is not defined.
>
>
    • Note: DENYWEBVIEW is evaluated before ALLOWWEBVIEW. Access is denied if the authenticated person is in the DENYWEBVIEW list, or not in the ALLOWWEBVIEW list. Access is granted if DENYWEBVIEW and ALLOWWEBVIEW are not defined.
 

Hide Control Settings

Line: 215 to 234
 
<!--
Changed:
<
<
   * Set DENYTOPICCHANGE = Main.SomeGroup
>
>
   * Set DENYTOPICCHANGE = Main.SomeGroup
 -->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 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.