May 172007
 

mod_auth_mysqlモジュールではテーブル名やカラム名を細かく指定することができます。
以下Mantis Bug Tracker 1.1.0a2のユーザ情報を使ってHTTP認証を仕掛ける設定です。ユーザのパスワード忘れ対応やパスワード変更にMantisの機能でそのまま対応できちゃうので結構便利だと思ってます。

AuthType                  Basic
AuthName                  "Mantis username and password"
AuthMySQLHost             localhost
AuthMySQLDB               mysql_database
AuthMySQLUser             mysql_username
AuthMySQLPassword         mysql_password
AuthMySQLUserTable        mantis_user_table
AuthMySQLNameField        username
AuthMySQLPasswordField    password
AuthMySQLCryptedPasswords Off
AuthMySQLMD5Passwords     On
require valid-user

Apacheとmod_auth_mysqlモジュールはCentOS 3.8のパッケージを利用しています。

mod_auth_mysqlのディレクティブとMantis設定項目の対応は以下です。

ディレクティブ Mantis設定項目
AuthMySQLHost $g_hostname
AuthMySQLDB $g_database_name
AuthMySQLUser $g_db_username
AuthMySQLPassword $g_db_password
AuthMySQLUserTable $g_mantis_user_table
AuthMySQLNameField username固定
AuthMySQLPasswordField password固定
AuthMySQLCryptedPasswords Off
AuthMySQLMD5Passwords On
$g_login_method = MD5
AuthMySQLCryptedPasswords On
AuthMySQLMD5Passwords Off
$g_login_method = CRYPT

Mantisの設定値がどうなっているのかは、config_inc.phpやconfig_default_inc.phpをみればわかるはずです。
AuthMySQLNameFieldとAuthMySQLPasswordFieldは「固定」と書きましたが、ここらへんをMantis側で変更できる人には、そもそも「どの設定項目が対応するのか」なんて説明不要でしょう 😉

Sorry, the comment form is closed at this time.