diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-07-16 06:47:49 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-07-16 06:47:49 +0000 |
commit | 11522a4b90a4056319cdbc204fffc63780cbfa51 (patch) | |
tree | fde77f10429bc13b042d6ac779f0b89149c8334d /sca-cpp/trunk/modules/http/open-auth-conf | |
parent | f82576588fc9672a011655e709179eb43e5ab5b4 (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/open-auth-conf')
-rwxr-xr-x | sca-cpp/trunk/modules/http/open-auth-conf | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sca-cpp/trunk/modules/http/open-auth-conf b/sca-cpp/trunk/modules/http/open-auth-conf index 5226622058..f4715b3a1c 100755 --- a/sca-cpp/trunk/modules/http/open-auth-conf +++ b/sca-cpp/trunk/modules/http/open-auth-conf @@ -40,14 +40,20 @@ else fi if [ "$2" = "" ]; then + providers="file" +else + providers="$2 file" +fi + +if [ "$3" = "" ]; then pw=`cat $root/cert/ca.key | head -2 | tail -1` else - pw="$2" + pw="$3" fi # Configure HTTPD mod_tuscany_openauth module cat >>$root/conf/modules.conf <<EOF -# Generated by: openauth-conf $* +# Generated by: open-auth-conf $* # Load support for Open authentication LoadModule mod_tuscany_openauth $here/libmod_tuscany_openauth$libsuffix @@ -67,11 +73,13 @@ cat >>$root/conf/locauth$sslsuffix.conf <<EOF <Location /> AuthType Open AuthName "$host" +AuthOpenAuthProvider socache $providers +AuthnCacheProvideFor $providers +AuthnCacheContext / Session On -SessionCookieName TuscanyOpenAuth domain=.$host; path=/ SessionCryptoPassphrase $pw AuthOpenAuth On -AuthOpenAuthLoginPage /login +AuthOpenAuthLoginPage /login/ Require valid-user </Location> @@ -79,8 +87,10 @@ Require valid-user <Location /login/dologin> AuthType Form AuthName "$host" -AuthFormProvider file -AuthFormLoginRequiredLocation /login +AuthFormProvider socache $providers +AuthnCacheProvideFor $providers +AuthnCacheContext / +AuthFormLoginRequiredLocation /login/?openauth_attempt=1 AuthFormLogoutLocation / Require valid-user SetHandler form-login-handler |