~ubuntu-branches/ubuntu/gutsy/moin/gutsy

« back to all changes in this revision

Viewing changes to wiki/underlay/pages/HelpOnAuthentication/revisions/00000001

  • Committer: Bazaar Package Importer
  • Author(s): Sivan Greenberg
  • Date: 2006-07-09 19:28:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060709192802-oaeuvt4v3e9300uj
Tags: 1.5.3-1ubuntu1
* Merge new debian version.
* Reapply Ubuntu changes:
    + debian/rules:
      - Comment out usage of control.ubuntu.in (doesn't fit!).
    + debian/control.in:
      - Dropped python2.3 binary package.
    + debian/control:
      - Dropped python2.3 binary, again.
      - Dropped python2.3-dev from Build-Depends-Indep.
    + debian/patches/001-attachment-xss-fix.patch:
      - Dropped this patch. It's now in upstream's distribution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
For running moin in corporate environments this is often no option as access restrictions have to be enforced reliably. Starting with 1.3 moin could also use HTTP basic auth based authentication, when being run with some web servers (like Apache) supporting it. 
13
13
 
14
 
Starting with 1.5 moin now has freely configurable and kind of modular authentication. You use the `auth` configuration value to set up a list of authentication methods that is processed in exactly that order.
 
14
Starting with 1.5 moin now has freely configurable and kind of modular authentication. You use the `auth` configuration value to set up a list of authentication methods that are processed in exactly that order.
15
15
 
16
16
When an external user database is used you do not want to recreate all users in moin. For this case the configuration option `user_autocreate` was added to moin 1.5. If you set it to True a new user profile will be created automatically when a new user has passed authentication (and the auth method supports auto creation).
17
17
 
21
21
 ||<|2 (> All || by moin via own cookie || `MoinMoin.auth.moin_cookie` ||
22
22
 || by moin via external cookie || see contrib/auth_externalcookie/ ||
23
23
 ||<|2 (> Apache with CGI, modpy or Fast``Cgi || by Apache modules: HTTP Basic, HTTP Digest, SSPI (aka NTLM) or LDAP || `MoinMoin.auth.http` ||
24
 
 || by moin via LDAP || ldap (contributed module)? ||
 
24
 || by moin via LDAP || `MoinMoin.auth.ldap_login` (must combine with moin_cookie to keep the session) ||
25
25
 || Apache+SSL with CGI, modpy or Fast``Cgi || by Apache via SSL client certificate || `MoinMoin.auth.sslclientcert` ||
26
26
 || Twisted || HTTP Basic (but does not request authentication by header, so this is currently only useful for automated stuff, not for browser use) || `MoinMoin.auth.http` ||
27
27
 || IIS || (?) || (?) ||
28
28
 
 
29
== Other "auth" methods ==
 
30
These are not strictly auth methods, as they don't authenticate users, but use auth information for other purposes:
 
31
 
 
32
 || `MoinMoin.auth.log` || will just log login/logout/name, nothing else ||
 
33
 || `MoinMoin.auth.smb_mount` || mount some smb share using user/password from login, umount on logout ||
 
34
 
 
35
`MoinMoin.auth.interwiki` is unfinished, experimental code - don't use.
 
36
 
29
37
== Shipped plugins ==
30
38
=== moin_cookie auth (default) ===
31
39
{{{#!python
36
44
This is the default auth list moin uses (so if you just want that, you don't need to configure it). It means that moin just tries to use the MOIN_ID cookie as it ever did.
37
45
 
38
46
For doing that, moin will just call the `MoinMoin.auth.moin_cookie` function. This function will look if there is a valid cookie:
39
 
 * if yes, it will use it to make and return a valid user object. It will also return a flag that tells "we don't need to continue trying other auth methods" (`continue_flag=False`). So we are done for that case and we have a valid user.
40
 
 * if no, the function does not return a user object, but returns `continue_flag=True` to tell "we need to continue trying other auth methods to authenticate the user". But as moin_cookie is the only auth method in the list, there is no other auth method to try and the user will stay unknown for that case.
 
47
 * if yes, it will use it to make and return a valid user object. The user is known now.
 
48
 * if no, the function does not return a user object. As as moin_cookie is the only auth method in the list, there is no other auth method to try and the user will stay unknown for that case.
41
49
 
42
50
=== http auth ===
43
51
 
50
58
For HTTP basic auth used with a web server like Apache, the web server handles authentication before moin gets called. You either enter a valid username and password or your access will be denied by the web server.
51
59
 
52
60
So moin's http auth method will just check if user authentication happened:
53
 
 * if yes, it will return a user object based on the authenticated user name and `continue_flag=False`.
54
 
 * if no, it will not return a user object, but `continue_flag=True` to try other auth methods. In this example, there are no other auth methods, so the user will stay unknown.
 
61
 * if yes, it will return a user object based on the authenticated user name.
 
62
 * if no, it will not return a user object. In this example, there are no other auth methods, so the user will stay unknown.
55
63
 
56
64
Well, in reality, it is a bit more complicated indeed:
57
65
 * For Twisted we use the username and password stored in the moin user profile. Except wiki xmlrpc usage this is currently not used.
58
 
 * For NTLM and Negotiate, we split off everything befor the last "\" (usually it is "Domain\username") and we also use title() to normalize "username" to "Username".
 
66
 * For NTLM and Negotiate, we split off everything before the last "\" (usually it is "Domain\username") and we also use title() to normalize "username" to "Username".
59
67
 
60
68
 (!) You usually do want to set `user_autocreate = True` for this auth method. moin will then auto create a user profile if the authenticated user does not already have one. So the user does not need to create the moin profile himself.
61
69
 
69
77
For SSL client certificate auth used with a web server like Apache, the web server handles authentication before moin gets called. You either have a valid SSL client certificate or your access will be denied by the web server.
70
78
 
71
79
So moin's sslclientcert auth method will just check if user authentication happened:
72
 
 * if yes, it will return a user object based on the email address or user name in the certificate and `continue_flag=False`.
73
 
 * if no, it will not return a user object, but `continue_flag=True` to try other auth methods. In this example, there are no other auth methods, so the user will stay unknown.
 
80
 * if yes, it will return a user object based on the email address or user name in the certificate.
 
81
 * if no, it will not return a user object. In this example, there are no other auth methods, so the user will stay unknown.
74
82
 
75
83
 (!) You usually do want to set `user_autocreate = True` for this auth method. moin will then auto create a user profile if the authenticated user does not already have one. So the user does not need to create the moin profile himself.
76
84
 
98
106
    auth = [http, moin_cookie]
99
107
}}}
100
108
 
101
 
In this example, moin will first check if the http auth method gives a valid user. If yes, it will use just that. If not and `continue_flag` returned by http auth method is True, it will continue checking other auth list method - `moin_cookie` in this case...
 
109
In this example, moin will first check if the http auth method gives a valid user. If yes, it will use just that. If not and `continue_flag` returned by http auth method is True, it will continue checking other auth list method - `moin_cookie` in this case... ( /!\ needs update /!\ )
102
110
 
103
111
 (!) Not all combinations make sense, of course.
104
112