diff --git a/config/filter.d/apache-auth.conf b/config/filter.d/apache-auth.conf index 366e25ab..34089abb 100644 --- a/config/filter.d/apache-auth.conf +++ b/config/filter.d/apache-auth.conf @@ -29,6 +29,7 @@ before = apache-common.conf failregex = ^%(_apache_error_client)s user .* authentication failure for "\S*": Password Mismatch$ ^%(_apache_error_client)s user .* not found: \S*\s*$ ^%(_apache_error_client)s client used wrong authentication scheme: \S*\s*$ + ^%(_apache_error_client)s Authorization of user \S+ to access \S* failed, reason: file owner \S+ does not match.\s*$ ^%(_apache_error_client)s authorization failure \(no authenticated user\): \S*\s*$ ^%(_apache_error_client)s client denied by server configuration: (uri )?\S*\s*$ ^%(_apache_error_client)s user .* authorization failure: \S*\s*$ diff --git a/testcases/files/config/apache-auth/basic/authz_owner/.htaccess b/testcases/files/config/apache-auth/basic/authz_owner/.htaccess new file mode 100644 index 00000000..583e5422 --- /dev/null +++ b/testcases/files/config/apache-auth/basic/authz_owner/.htaccess @@ -0,0 +1,5 @@ +AuthType basic +AuthName "private area" +AuthBasicProvider file +AuthUserFile /var/www/html/basic/authz_owner/.htpasswd +Require file-owner diff --git a/testcases/files/config/apache-auth/basic/authz_owner/.htpasswd b/testcases/files/config/apache-auth/basic/authz_owner/.htpasswd new file mode 100644 index 00000000..d9de6185 --- /dev/null +++ b/testcases/files/config/apache-auth/basic/authz_owner/.htpasswd @@ -0,0 +1 @@ +username:$apr1$1f5oQUl4$21lLXSN7xQOPtNsj5s4Nk/ diff --git a/testcases/files/config/apache-auth/basic/authz_owner/cant_get_me.html b/testcases/files/config/apache-auth/basic/authz_owner/cant_get_me.html new file mode 100644 index 00000000..e69de29b diff --git a/testcases/files/logs/apache-auth b/testcases/files/logs/apache-auth index 37fff9eb..2c1b6a73 100644 --- a/testcases/files/logs/apache-auth +++ b/testcases/files/logs/apache-auth @@ -20,3 +20,6 @@ # failJSON: { "time": "2013-07-17T22:39:55", "match": true , "host": "127.0.0.1" } [Wed Jul 17 22:39:55 2013] [error] [client 127.0.0.1] client used wrong authentication scheme: /basic/file +# wget --http-user=username --http-password=password http://localhost/basic/authz_owner/cant_get_me.html -O /dev/null +# failJSON: { "time": "2013-07-17T22:54:32", "match": true , "host": "127.0.0.1" } +[Wed Jul 17 22:54:32 2013] [error] [client 127.0.0.1] Authorization of user username to access /basic/authz_owner/cant_get_me.html failed, reason: file owner dan does not match.