summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/basic-auth-conf
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-07-16 06:47:49 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-07-16 06:47:49 +0000
commit11522a4b90a4056319cdbc204fffc63780cbfa51 (patch)
treefde77f10429bc13b042d6ac779f0b89149c8334d /sca-cpp/trunk/modules/http/basic-auth-conf
parentf82576588fc9672a011655e709179eb43e5ab5b4 (diff)
Add an HTTPD auth provider allowing the authentication logic to be implemented by a component, and cleanup the SSL and mod-security config a bit.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/http/basic-auth-conf')
-rwxr-xr-xsca-cpp/trunk/modules/http/basic-auth-conf15
1 files changed, 12 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/http/basic-auth-conf b/sca-cpp/trunk/modules/http/basic-auth-conf
index 39dde90b50..8710d1fdf7 100755
--- a/sca-cpp/trunk/modules/http/basic-auth-conf
+++ b/sca-cpp/trunk/modules/http/basic-auth-conf
@@ -25,9 +25,16 @@ root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
-loc=$2
-if [ "$loc" = "" ]; then
+if [ "$2" = "" ]; then
+ providers="file"
+else
+ providers="$2 file"
+fi
+
+if [ "$3" = "" ]; then
loc="/"
+else
+ loc="$3"
fi
sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"`
@@ -52,7 +59,9 @@ cat >>$root/conf/locauth$sslsuffix.conf <<EOF
<Location $loc>
AuthType Basic
AuthName "$host"
-AuthBasicProvider file
+AuthBasicProvider socache $providers
+AuthnCacheProvideFor $providers
+AuthnCacheContext /
Require valid-user
</Location>