Difference: TWikiAccessControl (38 vs. 39)

Revision 392011-07-15 - TWikiContributor

Line: 1 to 1
 

TWiki Access Control

Restricting read and write access to topics and webs, by Users and groups

Line: 44 to 44
 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.
>
>
  • A user profile page with the WikiName of the user is created in the Main web.
 

The default visitor name is TWikiGuest. This is the non-authenticated user.

Line: 59 to 59
 
  • 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 = SomeUser, OtherUser, SomeGroup
 
Changed:
<
<
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:
  • Set ALLOWTOPICCHANGE = Main.KasabianGroup
>
>
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 MarketingGroup topic write:
  • Set ALLOWTOPICCHANGE = MarketingGroup
 
Changed:
<
<
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.
>
>
ALERT! Note: TWiki has strict formatting rules. Make sure you have a real bullet. (In raw edit it is three or six spaces, an asterisk, and an extra space in front of any access control rule.)
 

The Super Admin Group

Line: 72 to 72
 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.

You can create new administrators simply by adding them to the TWikiAdminGroup topic. For example,

Changed:
<
<
  • Set GROUP = Main.ElizabethWindsor, Main.TonyBlair
>
>
  • Set GROUP = RobertCailliau, TimBernersLee
 A member of the Super Admin Group has unrestricted access throughout the TWiki, so only trusted staff should be added to this group.

Line: 102 to 102
 
    • Set DENYWEBRENAME = < comma-delimited list of Users and Groups >
    • Set ALLOWWEBRENAME = < comma-delimited list of Users and Groups >
Added:
>
>
For example, set this to restrict a web to be viewable only by the MarketingGroup:
  • Set ALLOWWEBVIEW = Main.MarketingGroup
 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.

Line: 122 to 125
 
    • Set DENYTOPICRENAME = < comma-delimited list of Users and Groups >
    • Set ALLOWTOPICRENAME = < comma-delimited list of Users and Groups >
Added:
>
>
For example, set this to restrict a topic to be viewable only by the MarketingExecGroup:
  • Set ALLOWTOPICVIEW = Main.MarketingExecGroup
 Remember when opening up access to specific topics within a restricted web that other topics in the web - for example, the WebLeftBar - may also be accessed when viewing the topics. The message you get when you are denied access should tell you what topic you were not permitted to access.

Be careful with empty values for any of these.

Line: 168 to 174
 

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.TWikiPreferences 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: 207 to 213
 

Access Control quick recipes

Deleted:
<
<

Obfuscating Webs

Another way of hiding webs is to keep them hidden by not publishing the URL and by preventing the all webs search option from accessing obfuscated webs. Do so by enabling the NOSEARCHALL variable in WebPreferences:

  • Set NOSEARCHALL = on

This setup can be useful to hide a new web until content its ready for deployment, or to hide view access restricted webs.

ALERT! Note: Obfuscating a web without view access control is very insecure, as anyone who knows the URL can access the web.

 

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:

Line: 262 to 259
 -->
Added:
>
>

Obfuscating Webs

Another way of hiding webs is to keep them hidden by not publishing the URL and by preventing the all webs search option from accessing obfuscated webs. Do so by enabling the NOSEARCHALL variable in WebPreferences:

  • Set NOSEARCHALL = on

This setup can be useful to hide a new web until content its ready for deployment, or to hide view access restricted webs.

ALERT! Note: Obfuscating a web without view access control is very insecure, as anyone who knows the URL can access the web.

Read-only Skin Mode

It is possible to turn the PatternSkin and TopMenuSkin into read-only mode by removing the edit and attach controls (links and buttons). This is mainly useful if you have TWiki application pages or dashboards where you do not want regular users to change content. The read-only skin mode is not a replacement for access control; you can use it in addition to access control. Details at PatternSkinCustomization#ReadOnlySkinMode.

 

Related Topics: AdminDocumentationCategory, TWikiUserAuthentication, TWiki:TWiki.TWikiAccessControlSupplement

 
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.