Project

General

Profile

Actions

Feature #4640

open

Change password hash to be compatible with Apache

Added by Jerry Van Baren over 14 years ago. Updated about 13 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
SCM extra
Target version:
-
Start date:
2010-01-23
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

By changing the password hash to be Base64 encoded and prefixing it with '{SHA}', Apache can authenticate directly using the database using mod_authn_dbd. This eliminates the need for the Redmine.pm perl module, at least for Apache-supported databases.

http://httpd.apache.org/docs/2.2/mod/mod_dbd.html

In the general Apache configuration (note the host=127.0.0.1 is probably necessary, the port=5432 should be optional):

        # mod_dbd configuration
        DBDriver pgsql
        DBDParams "host=127.0.0.1 port=5432 dbname=redmine user=redmine password=[secret]" 
        DBDMin  4
        DBDKeep 8
        DBDMax  20
        DBDExptime 300

In the Location section that you wish to require authentication for access:

                AuthType Basic
                Authname "Enter your Redmine user name and password" 
                AuthBasicProvider dbd
                Require valid-user
                # mod_authn_dbd SQL query to authenticate a user
                AuthDBDUserPWQuery "SELECT hashed_password FROM users WHERE login = %s" 


Files

base64_hash.patch (2.42 KB) base64_hash.patch Patch created against r3319 Jerry Van Baren, 2010-01-23 20:04
base64_hash.patch (2.43 KB) base64_hash.patch Patch against version 1.0.4 Jerry Van Baren, 2010-12-16 02:47
Actions

Also available in: Atom PDF