~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/underlay/pages/HelpOnInstalling(2f)ApacheOnWin32withDomainAuthentication/revisions/00000001

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Please edit system and help pages ONLY in the master wiki!
 
2
## For more information, please see MoinMoin:MoinDev/Translation.
 
3
##master-page:Unknown-Page
 
4
##master-date:Unknown-Date
 
5
#acl -All:write Default
 
6
#format wiki
 
7
#language en
 
8
= Authenticating against Windows-Domain using SSPI =
 
9
<<TableOfContents>>
 
10
 
 
11
For running moin in corporate environment access restrictions has to be enforced reliably. Generally, in these environments, centralized domain authentication is the preferred method.  Fortunately, this is easy to set up with moin 1.5 with the help of the SSPI-plugin for Apache.   This document will take you through the step-by-step for setting this up.
 
12
 
 
13
 . For general information, see MoinMaster:HelpOnAuthentication
 
14
== System Requirements ==
 
15
 * '''Windows 2000, XP, or greater (including server).'''
 
16
  * Apache doesn't require Windows Server (unlike IIS), so it's a great way to use an old desktop without requiring a Server license!
 
17
  * mod_auth_sspi.so requires Apache on Windows, it will not work with a Linux/Unix install (sadly).
 
18
 * '''Apache 2.0.xx.''' <<BR>>
 
19
 . According to Apache.org, the Apache 1.3 series is not recommended for Windows installs, as it was developed primarily towards unix systems. Apache 2.0.x series is much more Windows-aware and friendly. Also, the mod_auth_sspi plugin requires Apache 2.0.x or later.
 
20
 * '''a working install of a !MoinMoin wiki''' <<BR>>
 
21
 . These instructions assume you've successfully set up a working moin configuration (based on MoinMaster:HelpOnInstalling/ApacheOnWin32) and you're expanding to include Domain Authentication.
 
22
 * '''a Domain Controller ''' ;-)
 
23
''note:'' Older versions of Windows is ''__not__'' recommended (including Win98, WinME, perhaps even WinNT) due to their obsolete process-handling methods.
 
24
 
 
25
== Installing & Configuring ==
 
26
The following section is broken into:
 
27
 
 
28
 * downloading & installing the sspi module
 
29
 * Configuring Apache http.conf file
 
30
 * Configuring Moin wikiconfig.py file
 
31
 * changing the user preference so it's more logical and relevant to domain authentication
 
32
 
 
33
=== Download & Install mod_auth_sspi ===
 
34
Before proceeding, make sure that you have a working and tested MoinMoin installation.  The last thing you want is to install it all at once, have something not working, and try to reverse-diagnose what went wrong and where.
 
35
 
 
36
__Download SSPI__
 
37
 
 
38
 1. http://www.gknw.at/development/apache/httpd-2.0/win32/modules/
 
39
  * Download the version that's appropriate to your server.  For example, the file  {{{mod_auth_sspi-1.0.4-2.0.58.zip}}} is SSPI version 1.0.4 built against Apache version 2.0.58.
 
40
 1. Unzip the sspi file, copy the mod_auth_sspi.so file into the Apache {{{modules}}} folder (generally located here: {{{c:\Program Files\Apache Group\Apache2\modules\}}}
 
41
 
 
42
=== Apache Configuration ===
 
43
Edit your {{{http.conf}}} file (usually found in {{{c:\Program Files\Apache Group\Apache2\conf\}}}). Use an appropriate text editor (such as [[http://www.textpad.com|TextPad]]), avoid using !NotePad.
 
44
 
 
45
Scroll down to the {{{LoadModule}}} section, and add the line at the bottom of this section (this tells Apache to load the mod_auth_sspi.so module):
 
46
 
 
47
{{{
 
48
    LoadModule sspi_auth_module modules/mod_auth_sspi.so
 
49
}}}
 
50
 
 
51
Now, scroll down to the bottom of the {{{http.conf}}} file, and add the following:
 
52
 
 
53
{{{
 
54
#
 
55
## Domain authentication using mod_auth_sspi.so
 
56
#
 
57
<IfModule !mod_auth_sspi.c>
 
58
    LoadModule sspi_auth_module modules/mod_auth_sspi.so
 
59
</IfModule>
 
60
# Change /mywiki in the line below to match what you have in the separate ScriptAlias line.
 
61
# If you explicitly followed the directions on ApacheOnWin32, this will be /mywiki
 
62
<Location /mywiki>
 
63
AuthType SSPI
 
64
AuthName "Company Internal Wiki - Login using your DOMAIN username and password"
 
65
Require valid-user
 
66
SSPIAuth On
 
67
SSPIAuthoritative On
 
68
# replace the IP address below with the IP of your domain controller:
 
69
SSPIDomain 192.168.1.15
 
70
SSPIOmitDomain On
 
71
SSPIOfferBasic On
 
72
SSPIBasicPreferred On
 
73
SSPIofferSSPI off
 
74
</Location>
 
75
}}}
 
76
 
 
77
 
 
78
=== Wiki Configuration ===
 
79
Now you will need to modify your Moin configuration so that user accounts are automatically created based on their domain authentication. Using an appropriate text editor, open the {{{wikiconfig.py}}} configuration file in the root of your moin install (if you followed the instructions on MoinMaster:HelpOnInstalling/ApacheOnWin32 explicitly, this file will be here {{{C:\Moin\mywiki\wikiconfig.py}}}).
 
80
 
 
81
{{{
 
82
    ## Domain Authentication using mod_auth_sspi.so
 
83
    from MoinMoin.auth.http import http
 
84
    from MoinMoin.auth import moin_session
 
85
    auth = [http, moin_session]
 
86
    user_autocreate = True
 
87
}}}
 
88
 
 
89
At this point, test your wiki and make sure you can successfully login (see the ''Logging in'' section below).  Congratulations if all is well!
 
90
 
 
91
Optionally, you may want to add further modifications now that you are successfully using domain authentication.  These directives remove links and fields that are no longer relevant with domain authentication.  Back in the {{{wikiconfig.py}}} add following in the ''User Preferences'' section:
 
92
 
 
93
{{{
 
94
    # Remove the 'logout' link at the top of every page, since it no longer works with domain authentication:
 
95
    show_login = 0
 
96
    #
 
97
    # Remove irrelevant fields from the user preferences:
 
98
    user_form_remove = ['password', 'password2', 'logout',]
 
99
    #
 
100
    # Remove irrelevant checkboxes from the user preferences (disable at Domain Server instead):
 
101
    user_checkbox_remove = [ 'disabled', ]
 
102
}}}
 
103
 
 
104
=== Customize user preferences ===
 
105
As administrator (you did add yourself as superuser in {{{wikiconfig.py}}}, right?! ;-) ), you will want to customize the user preferences dialogues, since most of them is no longer relevant.
 
106
 
 
107
In the dist archive under `wiki/config/more_samples` is a config snippet that shows how to customize user preferences, please see there!
 
108
 
 
109
=== Auto-email completion ===
 
110
 
 
111
Because we're on a domain (and presumably everyone has the same email domain), wouldn't it be neat to auto-fill in the email address for our users?
 
112
 
 
113
See MoinMoin:MoinMoinPatch/HttpAuthAutoEmail for a patch!
 
114
 
 
115
== Logging in ==
 
116
With normal browsers like mozilla or firefox you have to enter 'domain\username' as username and your password. Only IE shows a dialog with three fields (sometimes) instead of two: name, domain, password.