summaryrefslogtreecommitdiff
path: root/TWiki/TWikiUserAuthentication.mdwn
blob: faab0cccc8ba109ea3162e957f9724341c9b272d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## <a name="TWiki_Authentication"> TWiki Authentication </a>

TWiki does not authenticate users internally, it depends on the <code>**REMOTE\_USER**</code> environment variable. This variable is set when you enable basic authentication or authentication via SSL (https protocol)

TWiki keeps track who made changes to topics at what time. This gives a complete audit trail of changes.

No special installation steps need to be performed in case the server is already autenticated. If not you can opt for one of these:

* Forget about authentication. All changes will be registered as %MAINWEB%.TWikiGuest user, e.g. you can't tell who made changes.
* Use basic authentication for the <code>**edit**</code> and <code>**attach**</code> scripts. [[TWikiDocumentation]] tells you more about that.
* Use SSL to authenticate and secure the whole server.

The <code>**REMOTE\_USER**</code> environment variable is only set for the scripts that are under authentication. If for example the <code>**edit**</code>, <code>**save**</code> and <code>**preview**</code> scripts are authenticated, but not <code>**view**</code>, you would get your [[WikiName]] in <code>**preview**</code> for the <code>**%WIKIUSERNAME%**</code> variable, but <code>**view**</code> will show <code>**TWikiGuest**</code> instead of your WikiName.

There is a way to tell TWiki to remember the user for the scripts that are not authenticated, e.g. for the case where the <code>**REMOTE\_USER**</code> environment variable is not set. TWiki can be configured to remember the IP address / username pair whenever an authentication happens (edit topic, attach file). Once remembered, the non authenticated scripts like <code>**view**</code> will show the correct username instead of <code>**TWikiGuest**</code>. You can enable this by setting the <code>**$doRememberRemoteUser**</code> flag in <code>**TWiki.cfg**</code>. TWiki persistently stores the IP address / username pairs in file <code>**$remoteUserFilename**</code>, which is <code>**"$dataDir/remoteusers.txt"**</code> by default. Please note that this can fail in case the IP address changes due to dynamically assigned IP addresses or proxy servers.

Test: You are %WIKIUSERNAME%.

-- [[PeterThoeny]] - 16 Mar 2001 <br />