Renamed some config features/elements.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 17 Mar 2005 05:11:07 +0000 (05:11 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 17 Mar 2005 05:11:07 +0000 (05:11 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1400 cb58f699-b61c-0410-a6fe-9272a202ed29

apache/mod_apache.cpp
isapi_shib/isapi_shib.cpp
shar/shar.cpp
shib-target/XML.cpp
shib-target/shib-target.cpp
test/shibtest.cpp

index 5f423df..25ae2a5 100644 (file)
@@ -1388,7 +1388,7 @@ extern "C" void shib_child_init(apr_pool_t* p, server_rec* s)
             ShibTargetConfig::Metadata |
             ShibTargetConfig::AAP |
             ShibTargetConfig::RequestMapper |
-            ShibTargetConfig::SHIREExtensions |
+            ShibTargetConfig::LocalExtensions |
             ShibTargetConfig::Logging
             );
         if (!g_Config->init(g_szSchemaDir,g_szSHIBConfig)) {
index 82b439b..1e54a37 100644 (file)
@@ -164,8 +164,10 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
         return TRUE;
     }
 
+#ifndef _DEBUG
     try
     {
+#endif
         LPCSTR schemadir=getenv("SHIBSCHEMAS");
         if (!schemadir)
             schemadir=SHIB_SCHEMAS;
@@ -178,7 +180,7 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
             ShibTargetConfig::Metadata |
             ShibTargetConfig::AAP |
             ShibTargetConfig::RequestMapper |
-            ShibTargetConfig::SHIREExtensions |
+            ShibTargetConfig::LocalExtensions |
             ShibTargetConfig::Logging
             );
         if (!g_Config->init(schemadir,config)) {
@@ -208,15 +210,14 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
                 }
             }
         }
+#ifndef _DEBUG
     }
     catch (...)
     {
         LogEvent(NULL, EVENTLOG_ERROR_TYPE, 2100, NULL, "Filter startup failed with an exception.");
-#ifdef _DEBUG
-        throw;
-#endif
         return FALSE;
     }
+#endif
 
     pVer->dwFilterVersion=HTTP_FILTER_REVISION;
     strncpy(pVer->lpszFilterDesc,"Shibboleth ISAPI Filter",SF_MAX_FILTER_DESC_LEN);
@@ -382,6 +383,8 @@ public:
 
     // XXX: How do I get the content type and HTTP Method from this context?
 
+    // TODO: Need to allow for use of SERVER_NAME
+
     init(g_Config, string(scheme), site.m_name, atoi(port),
         string(url), string(""), // XXX: content type
         string(remote_addr), string("") // XXX: http method
index 1550339..298072f 100644 (file)
@@ -168,8 +168,8 @@ int real_main(int preinit)
             ShibTargetConfig::Trust |
             ShibTargetConfig::Credentials |
             ShibTargetConfig::AAP |
-            ShibTargetConfig::SHARExtensions |
-            (shar_checkonly ? (ShibTargetConfig::SHIREExtensions | ShibTargetConfig::RequestMapper) : ShibTargetConfig::Logging)
+            ShibTargetConfig::GlobalExtensions |
+            (shar_checkonly ? (ShibTargetConfig::LocalExtensions | ShibTargetConfig::RequestMapper) : ShibTargetConfig::Logging)
             );
         if (!shar_config)
             shar_config=getenv("SHIBCONFIG");
@@ -180,13 +180,13 @@ int real_main(int preinit)
         if (!shar_config)
             shar_config=SHIB_CONFIG;
         if (!conf.init(shar_schemadir,shar_config)) {
-            fprintf(stderr, "configuration is invalid, check log for specific problems\n");
+            fprintf(stderr, "configuration is invalid, see console for specific problems\n");
             return -2;
         }
 
         // If just a test run, bail.
         if (shar_checkonly) {
-            fprintf(stdout, "overall configuration is loadable, check log for non-fatal problems\n");
+            fprintf(stdout, "overall configuration is loadable, check console for non-fatal problems\n");
             return 0;
         }
 
@@ -331,16 +331,16 @@ int main(int argc, char *argv[])
         ShibTargetConfig::Trust |
         ShibTargetConfig::Credentials |
         ShibTargetConfig::AAP |
-        ShibTargetConfig::SHARExtensions |
-        (shar_checkonly ? (ShibTargetConfig::SHIREExtensions | ShibTargetConfig::RequestMapper) : ShibTargetConfig::Logging)
+        ShibTargetConfig::GlobalExtensions |
+        (shar_checkonly ? (ShibTargetConfig::LocalExtensions | ShibTargetConfig::RequestMapper) : ShibTargetConfig::Logging)
         );
     if (!conf.init(shar_schemadir,shar_config)) {
-        fprintf(stderr, "configuration is invalid, check log for specific problems\n");
+        fprintf(stderr, "configuration is invalid, check console for specific problems\n");
         return -2;
     }
 
     if (shar_checkonly)
-        fprintf(stderr, "overall configuration is loadable, check log for non-fatal problems\n");
+        fprintf(stderr, "overall configuration is loadable, check console for non-fatal problems\n");
     else {
         const IListener* listener=conf.getINI()->getListener();
         
index 6bcc5d7..4cb75ee 100644 (file)
 
 using namespace shibtarget;
 
-const char XML::htaccessType[] =            "edu.internet2.middleware.shibboleth.target.provider.htaccess";
-const char XML::MemorySessionCacheType[] =  "edu.internet2.middleware.shibboleth.target.provider.MemorySessionCache";
-const char XML::MySQLSessionCacheType[] =   "edu.internet2.middleware.shibboleth.target.provider.MySQLSessionCache";
-const char XML::RequestMapType[] =          "edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap";
-const char XML::TCPListenerType[] =         "edu.internet2.middleware.shibboleth.target.provider.TCPListener";
-const char XML::UnixListenerType[] =        "edu.internet2.middleware.shibboleth.target.provider.UnixListener";
+const char XML::htaccessType[] =            "edu.internet2.middleware.shibboleth.sp.provider.htaccess";
+const char XML::MemorySessionCacheType[] =  "edu.internet2.middleware.shibboleth.sp.provider.MemorySessionCacheProvider";
+const char XML::MySQLSessionCacheType[] =   "edu.internet2.middleware.shibboleth.sp.provider.MySQLSessionCacheProvider";
+const char XML::MySQLReplayCacheType[] =    "edu.internet2.middleware.shibboleth.sp.provider.MySQLReplayCacheProvider";
+const char XML::LegacyRequestMapType[] =    "edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap";
+const char XML::RequestMapType[] =          "edu.internet2.middleware.shibboleth.sp.provider.XMLRequestMapProvider";
+const char XML::TCPListenerType[] =         "edu.internet2.middleware.shibboleth.sp.provider.TCPListener";
+const char XML::UnixListenerType[] =        "edu.internet2.middleware.shibboleth.sp.provider.UnixListener";
 
 const XMLCh XML::SHIBTARGET_SCHEMA_ID[] = // shibboleth-targetconfig-1.0.xsd
 { chLatin_s, chLatin_h, chLatin_i, chLatin_b, chLatin_b, chLatin_o, chLatin_l, chLatin_e, chLatin_t, chLatin_h, chDash,
@@ -113,6 +115,9 @@ const XMLCh XML::Literals::FederationProvider[] =
   chLatin_P, chLatin_r, chLatin_o, chLatin_v, chLatin_i, chLatin_d, chLatin_e, chLatin_r, chNull
 };
 
+const XMLCh XML::Literals::Global[] =
+{ chLatin_G, chLatin_l, chLatin_o, chLatin_b, chLatin_a, chLatin_l, chNull };
+
 const XMLCh XML::Literals::Host[]= { chLatin_H, chLatin_o, chLatin_s, chLatin_t, chNull };
 
 const XMLCh XML::Literals::htaccess[]=
@@ -127,7 +132,11 @@ const XMLCh XML::Literals::Library[] =
 const XMLCh XML::Literals::Listener[] =
 { chLatin_L, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_e, chLatin_r, chNull };
 
-const XMLCh XML::Literals::logger[] = { chLatin_l, chLatin_o, chLatin_g, chLatin_g, chLatin_e, chLatin_r, chNull };
+const XMLCh XML::Literals::Local[] =
+{ chLatin_L, chLatin_o, chLatin_c, chLatin_a, chLatin_l, chNull };
+
+const XMLCh XML::Literals::logger[] =
+{ chLatin_l, chLatin_o, chLatin_g, chLatin_g, chLatin_e, chLatin_r, chNull };
 
 const XMLCh XML::Literals::MemorySessionCache[] =
 { chLatin_M, chLatin_e, chLatin_m, chLatin_o, chLatin_r, chLatin_y,
@@ -135,6 +144,12 @@ const XMLCh XML::Literals::MemorySessionCache[] =
   chLatin_C, chLatin_a, chLatin_c, chLatin_h, chLatin_e, chNull
 };
 
+const XMLCh XML::Literals::MySQLReplayCache[] =
+{ chLatin_M, chLatin_y, chLatin_S, chLatin_Q, chLatin_L,
+  chLatin_R, chLatin_e, chLatin_p, chLatin_l, chLatin_a, chLatin_y,
+  chLatin_C, chLatin_a, chLatin_c, chLatin_h, chLatin_e, chNull
+};
+
 const XMLCh XML::Literals::MySQLSessionCache[] =
 { chLatin_M, chLatin_y, chLatin_S, chLatin_Q, chLatin_L,
   chLatin_S, chLatin_e, chLatin_s, chLatin_s, chLatin_i, chLatin_o, chLatin_n,
@@ -152,6 +167,9 @@ const XMLCh XML::Literals::path[]= { chLatin_p, chLatin_a, chLatin_t, chLatin_h,
 const XMLCh XML::Literals::RelyingParty[] =
 { chLatin_R, chLatin_e, chLatin_l, chLatin_y, chLatin_i, chLatin_n, chLatin_g, chLatin_P, chLatin_a, chLatin_r, chLatin_t, chLatin_y, chNull };
 
+const XMLCh XML::Literals::ReplayCache[] =
+{ chLatin_R, chLatin_e, chLatin_p, chLatin_l, chLatin_a, chLatin_y, chLatin_C, chLatin_a, chLatin_c, chLatin_h, chLatin_e, chNull };
+
 const XMLCh XML::Literals::RequestMap[] =
 { chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, chLatin_M, chLatin_a, chLatin_p, chNull };
 
@@ -182,6 +200,9 @@ const XMLCh XML::Literals::SHIRE[]= { chLatin_S, chLatin_H, chLatin_I, chLatin_R
 
 const XMLCh XML::Literals::Signing[] = { chLatin_S, chLatin_i, chLatin_g, chLatin_n, chLatin_i, chLatin_n, chLatin_g, chNull };
 
+const XMLCh XML::Literals::SPConfig[] =
+{ chLatin_S, chLatin_P, chLatin_C, chLatin_o, chLatin_n, chLatin_f, chLatin_i, chLatin_g, chNull };
+
 const XMLCh XML::Literals::TCPListener[] =
 { chLatin_T, chLatin_C, chLatin_P, chLatin_L, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_e, chLatin_r, chNull };
 
index 6ccb894..065941e 100644 (file)
@@ -284,7 +284,7 @@ ShibTarget::doCheckAuthN(bool requireSessionFlag, bool handleProfile)
   if (targetURL)
     mlp.insert("requestURL", targetURL);
 
-  return pair<bool,void*>(true,m_priv->sendError(this, "shire", mlp));
+  return pair<bool,void*>(true,m_priv->sendError(this, "session", mlp));
 }
 
 pair<bool,void*>
@@ -399,7 +399,7 @@ ShibTarget::doHandleProfile(void)
   if (targetURL)
     mlp.insert("requestURL", targetURL);
 
-  return pair<bool,void*>(true,m_priv->sendError(this, "shire", mlp));
+  return pair<bool,void*>(true,m_priv->sendError(this, "session", mlp));
 }
 
 pair<bool,void*>
index 1caf218..a840be7 100644 (file)
@@ -101,7 +101,7 @@ int main(int argc,char* argv[])
         ShibTargetConfig::Trust |
         ShibTargetConfig::Credentials |
         ShibTargetConfig::AAP |
-        ShibTargetConfig::SHARExtensions |
+        ShibTargetConfig::GlobalExtensions |
         ShibTargetConfig::SessionCache
         );
     if (!conf.init(path,config))
@@ -143,7 +143,7 @@ int main(int argc,char* argv[])
         if (!AA)
             throw SAMLException("Unable to locate metadata for origin site's Attribute Authority.");
 
-        ShibHTTPHook::ShibHTTPHookCallContext ctx(app->getTLSCred(site),AA);
+        ShibHTTPHook::ShibHTTPHookCallContext ctx(app->getCredentialUse(site)->getString("TLS").second,AA);
         Trust t(app->getTrustProviders());
 
         SAMLResponse* response=NULL;