Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Line: 6 to 6 | ||||||||
Restricting read and write access to topics and webs, by Users and groups | ||||||||
Changed: | ||||||||
< < | TWikiAccessControl allows you restrict access to single topics and entire webs, by individual user and by user Groups, in three areas: view; edit & attach; and rename/move/delete. Access control, combined with TWikiUserAuthentication, lets you easily create and manage an extremely flexible, fine-grained privilege system. | |||||||
> > | TWiki Access Control allows you restrict access to single topics and entire webs, by individual user and by user Groups. Access control, combined with TWikiUserAuthentication, lets you easily create and manage an extremely flexible, fine-grained privilege system. | |||||||
Changed: | ||||||||
< < | An Important Control Consideration | |||||||
> > | Tip: TWiki:TWiki.TWikiAccessControlSupplement on TWiki.org has additional documentation on access control. | |||||||
Changed: | ||||||||
< < | Open, freeform editing is the essence of WikiCulture - what makes TWiki different and often more effective than other collaboration tools. For that reason, it is strongly recommended that decisions to restrict read or write access to a web or a topic are made with care - the more restrictions, the less Wiki in the mix. Experience shows that unrestricted write access works very well because: | |||||||
> > | An Important Control Consideration | |||||||
Added: | ||||||||
> > | Open, freeform editing is the essence of WikiCulture - what makes TWiki different and often more effective than other collaboration tools. For that reason, it is strongly recommended that decisions to restrict read or write access to a web or a topic are made with great care - the more restrictions, the less Wiki in the mix. Experience shows that unrestricted write access works very well because: | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 25 to 22 | ||||||||
| ||||||||
Added: | ||||||||
> > | Permissions settings of the webs on this TWiki site
| |||||||
Authentication vs. Access ControlAuthentication: Identifies who a user is based on a login procedure. See TWikiUserAuthentication. | ||||||||
Line: 38 to 40 | ||||||||
Managing UsersA user can create an account in TWikiRegistration. The following actions are performed: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Deleted: | ||||||||
< < | Users can be authenticated using Basic Authentication (htaccess) or SSL (secure server). In either case, TWikiUserAuthentication is required in order to track user identities, and use User and Group access control. | |||||||
The default visitor name is TWikiGuest. This is the non-authenticated user.
Managing Groups | ||||||||
Changed: | ||||||||
< < | Groups are defined by group topics created in the Main web, like the TWikiAdminGroup. To create a new group:
| |||||||
> > | Groups are defined by group topics located in the Main web, such as the TWikiAdminGroup. 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: | |||||||
| ||||||||
Deleted: | ||||||||
< < |
Restricting Write AccessYou can define who is allowed to make changes to a web or a topic.Deny Editing by TopicDenying editing of a topic also restricts file attachment; both privileges are assigned together.
Deny Editing by Web | |||||||
Changed: | ||||||||
< < | Restricting web-level editing blocks creating new topics, changing topics or attaching files. | |||||||
> > | The GROUP setting is a comma-separated list of users and/or other groups. Example:
| |||||||
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 TWikiAdminGroup topic write:
| |||||||
Changed: | ||||||||
< < | The same rules apply as for restricting topics, with these additions:
| |||||||
> > | 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. | |||||||
Changed: | ||||||||
< < | Restricting Rename Access | |||||||
> > |
The Super Admin Group | |||||||
Changed: | ||||||||
< < | You can define who is allowed to rename, move or delete a topic, or rename a web. | |||||||
> > | By mistyping a user or group name in the settings, it's possible to lock a topic so that no-one can edit it from a browser. To avoid this, add the WikiNames of registered administrators to the super admin group topic called TWikiAdminGroup . The name of this topic is defined by the {SuperAdminGroup} configure setting. Example group setting:
| |||||||
Changed: | ||||||||
< < | Deny Renaming by Topic | |||||||
> > | Restricting Access | |||||||
Changed: | ||||||||
< < | To allow a user to rename, move or delete a topic, they also need write (editing) permission. They also need write access to change references in referring topics. | |||||||
> > | 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: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > | Controlling access to a Web | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | You can define restrictions of who is allowed to view a TWiki web. You can restrict access to certain webs to selected Users and Groups, by: | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Changed: | ||||||||
< < | Deny Renaming by Web | |||||||
> > |
Controlling access to a Topic
| |||||||
Changed: | ||||||||
< < | You can define restrictions of who is allowed to rename a TWiki web. | |||||||
> > | Controlling access to Attachments | |||||||
Changed: | ||||||||
< < |
| |||||||
> > | Attachments are referred to directly, and are not normally indirected via TWiki scripts. This means that the above instructions for access control will not apply to attachments. It is possible that someone may inadvertently publicise a URL that they expected to be access-controlled. | |||||||
Changed: | ||||||||
< < | The same rules apply as for topics, with these additions:
| |||||||
> > | The easiest way to apply the same access control rules for attachments as apply to topics is to use the Apache mod_rewrite module, and configure your webserver to redirect accesses to attachments to the TWiki viewfile script. For example, | |||||||
Changed: | ||||||||
< < | Restricting Read Access | |||||||
> > | ScriptAlias /twiki/bin/ /filesystem/path/to/twiki/bin/ Alias /twiki/pub/ /filesystem/path/to/twiki/pub/ | |||||||
Changed: | ||||||||
< < | You can define who is allowed to see a web. | |||||||
> > | RewriteEngine on RewriteRule ^/twiki/pub/TWiki/(.*)$ /twiki/pub/TWiki/$1 [L,PT] RewriteRule ^/twiki/pub/([^\/]+)/([^\/]+)/([^\/]+)$ /twiki/bin/viewfile/$1/$2?filename=$3 [L,PT] | |||||||
Changed: | ||||||||
< < | Deny Viewing by Topic | |||||||
> > | That way all the controls that apply to the topic also apply to attachments to the topic. Other types of webserver have similar support. | |||||||
Changed: | ||||||||
< < | Technically it is possible to restrict read access to an individual topic based on DENYTOPICVIEW / ALLOWTOPICVIEW preferences variables, provided that the view script is authenticated. However this setup is not recommended since all content is searchable within a web - a search will turn up view restricted topics. | |||||||
> > | Note: Images embedded in topics will load much slower since each image will be delivered by the viewfile script. | |||||||
Changed: | ||||||||
< < | Deny Viewing by Web | |||||||
> > | How TWiki evaluates ALLOW/DENY settings | |||||||
Changed: | ||||||||
< < | You can define restrictions of who is allowed to view a TWiki web. You can restrict access to certain webs to selected Users and Groups, by: | |||||||
> > | When deciding whether to grant access, TWiki evaluates the following rules in order (read from the top of the list; if the logic arrives at PERMITTED or DENIED that applies immediately and no more rules are applied). You need to read the rules bearing in mind that VIEW, CHANGE and RENAME access may be granted/denied separately.
| |||||||
Changed: | ||||||||
< < |
| |||||||
> > | Access Control quick recipes | |||||||
Changed: | ||||||||
< < | Obfuscate Webs | |||||||
> > | Obfuscating Webs | |||||||
Changed: | ||||||||
< < | The idea is to keep a web hidden by not publishing its URL and by preventing the all webs search option from accessing obfuscated webs. Do so by enabling the NOSEARCHALL variable in WebPreferences: | |||||||
> > | 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: | |||||||
| ||||||||
Changed: | ||||||||
< < | This setup can be useful to hide a new web until content its ready for deployment. | |||||||
> > | This setup can be useful to hide a new web until content its ready for deployment, or to hide view access restricted webs. | |||||||
Changed: | ||||||||
< < | Obfuscating webs is insecure, as anyone who knows the URL can access the web. | |||||||
> > | Note: Obfuscating a web without view access control is very insecure, as anyone who knows the URL can access the web. | |||||||
Changed: | ||||||||
< < | Authenticate all Webs and Restrict Selected Webs | |||||||
> > | Authenticate all Webs and Restrict Selected Webs | |||||||
Changed: | ||||||||
< < | Use the following setup to authenticate users for topic viewing in all webs and to restrict access to 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. | |||||||
| ||||||||
Line: 160 to 178 | ||||||||
| ||||||||
Deleted: | ||||||||
< < |
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. | |||||||
Changed: | ||||||||
< < | Authenticate and Restricting Selected Webs Only | |||||||
> > | Authenticate and Restrict Selected Webs Only | |||||||
Changed: | ||||||||
< < | Use the following setup to provide unrestricted viewing access to open webs, with authentication only on selected webs: | |||||||
> > | Use the following setup to provide unrestricted viewing access to open webs, with authentication only on selected webs. Requires TWikiUserAuthentication to be enabled. | |||||||
| ||||||||
Line: 174 to 189 | ||||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | Hide Control Settings | |||||||
Changed: | ||||||||
< < | Authenticating 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. | |||||||
> > | Tip: To hide access control settings from normal browser viewing, place them in HTML comment markers. | |||||||
Changed: | ||||||||
< < |
Hiding Control SettingsTo hide access control settings from normal browser viewing, place them in comment markers. <style="background-color:#f5f5f5"><!-- * Set DENYTOPICCHANGE = Main.SomeGroup -->
The SuperAdminGroupBy 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:
$superAdminGroup = "TWikiAdminGroup"; | |||||||
> > |
| |||||||
Deleted: | ||||||||
< < |
-- TWiki:Main.MikeMannix - 12 May 2002 | |||||||
Added: | ||||||||
> > | Related Topics: AdminDocumentationCategory, TWikiUserAuthentication, TWiki:TWiki.TWikiAccessControlSupplement -- Contributors: TWiki:Main.PeterThoeny, TWiki:Main.MikeMannix, TWiki:Main.CrawfordCurrie |