Drupalの認証にActiveDirectoryを(前編)

 以前は導入を書いていたな、と今更思い返す。
 ちゃんとまとめたらDrupal構築例サイトができそう,と思ったり。

 DrupalのモジュールページへアクセスしActiveDirectoryと検索した所,Webserver AuthというモジュールがHIT。早速入れてみる。ちなみに現時点でのDrupalの最新バージョンは4.7.3.私の環境は4.7.2.DrupalのUpdateとどちらを先にやろうか悩んだ。

入手

  • 下記URLにアクセスし,View other releasesから*14.7.x系のモジュールをダウンロード

 http://drupal.org/project/webserver_auth

解凍

  • webserver_auth-4.7.0.tar.gzを解凍*2

INSTALL
LICENSE.txt
README.txt
webserver_auth.module

  • 情報収集

 INSTALLやREADME.txtを見てみるも、あまり親切ではなかった。

インストール

  • 転送&有効化

 WinSCP3を使って下記のようになるように転送。

/usr/local/apache2/htdocs/drupal-4.7.2/modules/webserver_auth.module


 ※私が今まで経験してきたモジュールはモジュール名のDirectoryを作り,その下に転送、だったのでここが違う。

設定

  • モジュール有効化

 管理セクションの「モジュール」でチェックをつけて保存。

  • 環境設定

 管理セクションの「環境設定」の「webserver_auth」

Email Domain:
Append this domain name to each new user in order generate his email address.


 自分の環境の@以降を入力。

それだけ?

 ActiveDirectoryのサーバIPを入力してどうのこうの、となるわけではないらしい。
 Drupalにアクセスする以前に認証をかけていると,それをDrupalの認証と見なしてくれるモジュールだった。*3

If you are running an LDAP server, or Microsoft Active Directory, use UNIX authentication, this is likely a good module for you.


 'LDAP server','Active Directory'

 ここだけワードスポッティングして勘違いしていた様子。恥ずかしい。

 と言うわけでApacheの認証にActive Direcotryを使う方法を調査。
 そちらの設定は後編で(と言うかこれから調査)。

 一応モジュール紹介全文掲載。

Admins can now enable access control their drupal directory via their webserver (e.g. http auth, NTLM, .htaccess) and with this module, Drupal honor's the web server's authentication. That means that your users don't maintain separate passwords for Drupal, and that terminated users automatically become inaccessible in Drupal. If you are running an LDAP server, or Microsoft Active Directory, use UNIX authentication, this is likely a good module for you.

 ……"use UNIX authentication"が気になるけど、Apache2.2の認証でいける…と思っています。

*1:同時期に4.6.x系もUpdateしたらしく,latest releaseは4.6.xとなっている

*2:私は横着にWindows上でLhaplusを使用

*3:ここでようやくモジュールの解説をちゃんと読んだ