summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/openid
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-02-20 07:20:15 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-02-20 07:20:15 +0000
commit8fdc6a6dc4b2b23b923d8cbfba5190933155e95d (patch)
tree2d446c4c3f20ce56d2669ffc29d07c17a4e96ed2 /sca-cpp/trunk/modules/openid
parent08adcf2e783e4733e0fd646d353db3592c62140d (diff)
Refactor auth configuration to allow HTTP and HTTPS virtual hosts to use different auth mechanisms, and refactor log configuration to make it easier to use.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1291133 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/openid')
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-conf26
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-step2-conf11
2 files changed, 26 insertions, 11 deletions
diff --git a/sca-cpp/trunk/modules/openid/openid-conf b/sca-cpp/trunk/modules/openid/openid-conf
index c9e2d85586..f4f715ce99 100755
--- a/sca-cpp/trunk/modules/openid/openid-conf
+++ b/sca-cpp/trunk/modules/openid/openid-conf
@@ -26,14 +26,14 @@ conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
openid_prefix=`cat $here/openid.prefix`
-# Disallow public access to server resources
-cat >$root/conf/noauth.conf <<EOF
-# Generated by: openid-auth-conf $*
-# Disallow public access to server resources
+sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"`
+if [ "$sslconf" = "" ]; then
+ sslsuffix=""
+else
+ sslsuffix="-ssl"
+fi
-EOF
-
-# Configure OpenID authentication
+# Configure HTTPD mod_auth_openid module
cat >>$root/conf/modules.conf <<EOF
# Generated by: openid-conf $*
# Load support for OpenID authentication
@@ -41,7 +41,15 @@ LoadModule authopenid_module $openid_prefix/modules/mod_auth_openid.so
EOF
-cat >>$root/conf/auth.conf <<EOF
+# Disallow public access to server resources
+cat >$root/conf/noauth$sslsuffix.conf <<EOF
+# Generated by: openid-auth-conf $*
+# Disallow public access to server resources
+
+EOF
+
+# Configure OpenID authentication
+cat >>$root/conf/locauth$sslsuffix.conf <<EOF
# Generated by: openid-conf $*
# Enable OpenID authentication
<Location />
@@ -62,7 +70,7 @@ AuthOpenIDAXAdd LASTNAME http://axschema.org/namePerson/last
EOF
-cat >>$root/conf/pubauth.conf <<EOF
+cat >>$root/conf/pubauth$sslsuffix.conf <<EOF
# Generated by: openid-conf $*
# Allow public access to /openid location
<Location /openid>
diff --git a/sca-cpp/trunk/modules/openid/openid-step2-conf b/sca-cpp/trunk/modules/openid/openid-step2-conf
index e9144b873a..f6ac968bfc 100755
--- a/sca-cpp/trunk/modules/openid/openid-step2-conf
+++ b/sca-cpp/trunk/modules/openid/openid-step2-conf
@@ -25,8 +25,15 @@ 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 }'`
+sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"`
+if [ "$sslconf" = "" ]; then
+ sslsuffix=""
+else
+ sslsuffix="-ssl"
+fi
+
# Configure HTTPD to serve OpenID XRDS and LRDD documents
-cat >>$root/conf/auth.conf <<EOF
+cat >>$root/conf/locauth$sslsuffix.conf <<EOF
# Generated by: openid-step2-conf $*
# Serve OpenID XRDS document
Alias /openid $root/conf/openid.xrds
@@ -42,7 +49,7 @@ ForceType text/plain
EOF
-cat >>$root/conf/pubauth.conf <<EOF
+cat >>$root/conf/pubauth$sslsuffix.conf <<EOF
# Generated by: openid-step2-conf $*
# Allow access to /.well-known/host-meta location
<Location /.well-known/host-meta>