[cpp-sp] branch main updated: Excise ProtocolProvider code.

Scott Cantor cantor.2 at osu.edu
Fri Nov 1 16:42:56 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=4baf7f2923530f8d4a6be5b60180f47795c9b0ae

The following commit(s) were added to refs/heads/main by this push:
     new 4baf7f29 Excise ProtocolProvider code.
4baf7f29 is described below

commit 4baf7f2923530f8d4a6be5b60180f47795c9b0ae
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Nov 1 12:42:52 2024 -0400

    Excise ProtocolProvider code.
---
 Projects/vc15/shibsp/shibsp.vcxproj         |   5 +-
 shibsp/Application.h                        |  73 ----
 shibsp/Makefile.am                          |   6 -
 shibsp/SPConfig.cpp                         |  16 -
 shibsp/SPConfig.h                           |   6 -
 shibsp/binding/ProtocolProvider.h           |  78 ----
 shibsp/binding/impl/XMLProtocolProvider.cpp | 210 ----------
 shibsp/impl/XMLApplication.cpp              | 596 +---------------------------
 shibsp/impl/XMLApplication.h                |  66 +--
 shibsp/impl/XMLServiceProvider.cpp          | 288 +-------------
 shibsp/impl/XMLServiceProvider.h            |  47 +--
 11 files changed, 27 insertions(+), 1364 deletions(-)

diff --git a/Projects/vc15/shibsp/shibsp.vcxproj b/Projects/vc15/shibsp/shibsp.vcxproj
index df42b971..87da8553 100644
--- a/Projects/vc15/shibsp/shibsp.vcxproj
+++ b/Projects/vc15/shibsp/shibsp.vcxproj
@@ -199,7 +199,6 @@
   <ItemGroup>
     <ClCompile Include="..\..\..\shibsp\AbstractSPRequest.cpp" />
     <ClCompile Include="..\..\..\shibsp\Application.cpp" />
-    <ClCompile Include="..\..\..\shibsp\binding\impl\XMLProtocolProvider.cpp" />
     <ClCompile Include="..\..\..\shibsp\handler\impl\AdminLogoutInitiator.cpp" />
     <ClCompile Include="..\..\..\shibsp\handler\impl\AttributeCheckerHandler.cpp" />
     <ClCompile Include="..\..\..\shibsp\handler\impl\DiscoveryFeed.cpp" />
@@ -258,8 +257,6 @@
     <ClCompile Include="..\..\..\shibsp\version.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\..\..\shibsp\binding\ProtocolProvider.h" />
-    <ClInclude Include="..\..\..\shibsp\GSSRequest.h" />
     <ClInclude Include="..\..\..\shibsp\handler\LogoutInitiator.h" />
     <ClInclude Include="..\..\..\shibsp\handler\SecuredHandler.h" />
     <ClInclude Include="..\..\..\shibsp\impl\StorageServiceSessionCache.h" />
@@ -316,4 +313,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/shibsp/Application.h b/shibsp/Application.h
index 7b6a510e..5e80059d 100644
--- a/shibsp/Application.h
+++ b/shibsp/Application.h
@@ -31,9 +31,6 @@
 
 #include <string>
 #include <vector>
-#ifndef SHIBSP_LITE
-# include <saml/binding/MessageEncoder.h>
-#endif
 
 namespace xmltooling {
     class XMLTOOL_API CredentialResolver;
@@ -43,23 +40,8 @@ namespace xmltooling {
     class XMLTOOL_API StorageService;
     class XMLTOOL_API TrustEngine;
 };
-
-#ifndef SHIBSP_LITE
-namespace opensaml {
-    class SAML_API SecurityPolicyRule;
-    namespace saml2md {
-        class SAML_API MetadataProvider;
-    };
-};
-#endif
-
 namespace shibsp {
 
-#ifndef SHIBSP_LITE
-    class SHIBSP_API AttributeExtractor;
-    class SHIBSP_API AttributeFilter;
-    class SHIBSP_API AttributeResolver;
-#endif
     class SHIBSP_API Attribute;
     class SHIBSP_API Handler;
     class SHIBSP_API ServiceProvider;
@@ -78,9 +60,6 @@ namespace shibsp {
      * of session management and policy.
      */
     class SHIBSP_API Application : public virtual PropertySet
-#ifndef SHIBSP_LITE
-        ,public virtual opensaml::MessageEncoder::ArtifactGenerator
-#endif
     {
         MAKE_NONCOPYABLE(Application);
     protected:
@@ -147,50 +126,6 @@ namespace shibsp {
         virtual std::pair<std::string,const char*> getCookieNameProps(const char* prefix, time_t* lifetime=nullptr) const;
 
 #ifndef SHIBSP_LITE
-        /**
-         * Returns a MetadataProvider for use with this Application.
-         *
-         * @param required  true iff an exception should be thrown if no MetadataProvider is available
-         * @return  a MetadataProvider instance, or nullptr
-         */
-        virtual opensaml::saml2md::MetadataProvider* getMetadataProvider(bool required=true) const=0;
-
-        /**
-         * Returns a TrustEngine for use with this Application.
-         *
-         * @param required  true iff an exception should be thrown if no TrustEngine is available
-         * @return  a TrustEngine instance, or nullptr
-         */
-        virtual xmltooling::TrustEngine* getTrustEngine(bool required=true) const=0;
-
-        /**
-         * Returns an AttributeExtractor for use with this Application.
-         *
-         * @return  an AttributeExtractor, or nullptr
-         */
-        virtual AttributeExtractor* getAttributeExtractor() const=0;
-
-        /**
-         * Returns an AttributeFilter for use with this Application.
-         *
-         * @return  an AttributeFilter, or nullptr
-         */
-        virtual AttributeFilter* getAttributeFilter() const=0;
-
-        /**
-         * Returns an AttributeResolver for use with this Application.
-         *
-         * @return  an AttributeResolver, or nullptr
-         */
-        virtual AttributeResolver* getAttributeResolver() const=0;
-
-        /**
-         * Returns the CredentialResolver instance associated with this Application.
-         *
-         * @return  a CredentialResolver, or nullptr
-         */
-        virtual xmltooling::CredentialResolver* getCredentialResolver() const=0;
-
         /**
          * Returns configuration properties governing security interactions with a peer.
          *
@@ -206,14 +141,6 @@ namespace shibsp {
          * @return  the applicable PropertySet
          */
         virtual const PropertySet* getRelyingParty(const XMLCh* entityID) const=0;
-
-        /**
-         * @deprecated
-         * Returns any additional audience values associated with this Application.
-         *
-         * @return additional audience values associated with the Application, or nullptr
-         */
-        virtual const std::vector<const XMLCh*>* getAudiences() const=0;
 #endif
 
         /**
diff --git a/shibsp/Makefile.am b/shibsp/Makefile.am
index dd0dfed5..c81d6911 100644
--- a/shibsp/Makefile.am
+++ b/shibsp/Makefile.am
@@ -6,8 +6,6 @@ libshibspincludedir = $(includedir)/shibsp
 
 attrincludedir = $(includedir)/shibsp/attribute
 
-bindincludedir = $(includedir)/shibsp/binding
-
 handincludedir = $(includedir)/shibsp/handler
 
 liteincludedir = $(includedir)/shibsp/lite
@@ -39,9 +37,6 @@ attrinclude_HEADERS = \
 	attribute/ScopedAttribute.h \
 	attribute/SimpleAttribute.h
 
-bindinclude_HEADERS = \
-	binding/ProtocolProvider.h
-
 handinclude_HEADERS = \
 	handler/AbstractHandler.h \
 	handler/AssertionConsumerService.h \
@@ -86,7 +81,6 @@ libshibsp_la_SOURCES = \
 	attribute/BinaryAttribute.cpp \
 	attribute/SimpleAttribute.cpp \
 	attribute/ScopedAttribute.cpp \
-	binding/impl/XMLProtocolProvider.cpp \
 	handler/impl/AbstractHandler.cpp \
 	handler/impl/AdminLogoutInitiator.cpp \
 	handler/impl/AssertionConsumerService.cpp \
diff --git a/shibsp/SPConfig.cpp b/shibsp/SPConfig.cpp
index 8d1da081..f7afebe0 100644
--- a/shibsp/SPConfig.cpp
+++ b/shibsp/SPConfig.cpp
@@ -46,24 +46,10 @@
 #include "SessionCache.h"
 #include "SPConfig.h"
 #include "attribute/Attribute.h"
-#include "binding/ProtocolProvider.h"
 #include "handler/LogoutInitiator.h"
 #include "handler/SessionInitiator.h"
 #include "remoting/ListenerService.h"
 
-#ifndef SHIBSP_LITE
-# include "attribute/AttributeDecoder.h"
-# include "attribute/filtering/AttributeFilter.h"
-# include "attribute/filtering/MatchFunctor.h"
-# include "attribute/resolver/AttributeExtractor.h"
-# include "attribute/resolver/AttributeResolver.h"
-# include "binding/ArtifactResolver.h"
-# include "metadata/MetadataExt.h"
-# include "security/SecurityPolicyProvider.h"
-# include <saml/version.h>
-# include <saml/SAMLConfig.h>
-#endif
-
 #include <ctime>
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xmltooling/version.h>
@@ -246,7 +232,6 @@ bool SPConfig::init(const char* catalog_path, const char* inst_prefix)
         registerHandlers();
         registerLogoutInitiators();
         registerSessionInitiators();
-        registerProtocolProviders();
     }
 
     registerServiceProviders();
@@ -288,7 +273,6 @@ void SPConfig::term()
         SessionInitiatorManager.deregisterFactories();
         SingleLogoutServiceManager.deregisterFactories();
         HandlerManager.deregisterFactories();
-        ProtocolProviderManager.deregisterFactories();
     }
 
     ServiceProviderManager.deregisterFactories();
diff --git a/shibsp/SPConfig.h b/shibsp/SPConfig.h
index df821803..5ec1f167 100644
--- a/shibsp/SPConfig.h
+++ b/shibsp/SPConfig.h
@@ -45,7 +45,6 @@ namespace shibsp {
     class SHIBSP_API Handler;
     class SHIBSP_API ListenerService;
     class SHIBSP_API RequestMapper;
-    class SHIBSP_API ProtocolProvider;
     class SHIBSP_API ServiceProvider;
     class SHIBSP_API SessionCache;
     class SHIBSP_API SessionInitiator;
@@ -199,11 +198,6 @@ namespace shibsp {
          */
         xmltooling::PluginManager< Handler,std::string,std::pair<const xercesc::DOMElement*,const char*> > ManageNameIDServiceManager;
 
-        /**
-         * Manages factories for ProtocolProvider plugins.
-         */
-        xmltooling::PluginManager<ProtocolProvider,std::string,const xercesc::DOMElement*> ProtocolProviderManager;
-
         /**
          * Manages factories for RequestMapper plugins.
          */
diff --git a/shibsp/binding/ProtocolProvider.h b/shibsp/binding/ProtocolProvider.h
deleted file mode 100644
index 69c5ad13..00000000
--- a/shibsp/binding/ProtocolProvider.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to the University Corporation for Advanced Internet
- * Development, Inc. (UCAID) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for
- * additional information regarding copyright ownership.
- *
- * UCAID licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the
- * License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific
- * language governing permissions and limitations under the License.
- */
-
-/**
- * @file shibsp/binding/ProtocolProvider.h
- * 
- * Interface to protocol, binding, and default endpoint information.
- */
-
-#ifndef __shibsp_protprov_h__
-#define __shibsp_protprov_h__
-
-#include <shibsp/base.h>
-
-#include <vector>
-#include <xmltooling/Lockable.h>
-
-namespace shibsp {
-
-    class SHIBSP_API PropertySet;
-
-    /**
-     * Interface to protocol, binding, and default endpoint information.
-     */
-	class SHIBSP_API ProtocolProvider : public virtual xmltooling::Lockable
-    {
-        MAKE_NONCOPYABLE(ProtocolProvider);
-    protected:
-        ProtocolProvider();
-    public:
-        virtual ~ProtocolProvider();
-    
-        /**
-         * Returns configuration details for initiating a protocol service, as a PropertySet.
-         *
-         * @param protocol  the name of a protocol
-         * @param service   the name of a service
-         * @return  a PropertySet associated with initiation/request of a service
-         */
-        virtual const PropertySet* getInitiator(const char* protocol, const char* service) const=0;
-
-        /**
-         * Returns an ordered array of protocol bindings available for a specified service.
-         *
-         * @param protocol  the name of a protocol
-         * @param service   name of the protocol service
-         * @return  the array of bindings, each represented as a PropertySet
-         */
-        virtual const std::vector<const PropertySet*>& getBindings(const char* protocol, const char* service) const=0;
-    };
-
-    /**
-     * Registers ProtocolProvider classes into the runtime.
-     */
-    void SHIBSP_API registerProtocolProviders();
-
-    /** ProtocolProvider based on an XML configuration format. */
-    #define XML_PROTOCOL_PROVIDER "XML"
-};
-
-#endif /* __shibsp_protprov_h__ */
diff --git a/shibsp/binding/impl/XMLProtocolProvider.cpp b/shibsp/binding/impl/XMLProtocolProvider.cpp
deleted file mode 100644
index 1e6679e8..00000000
--- a/shibsp/binding/impl/XMLProtocolProvider.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * Licensed to the University Corporation for Advanced Internet
- * Development, Inc. (UCAID) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for
- * additional information regarding copyright ownership.
- *
- * UCAID licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the
- * License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific
- * language governing permissions and limitations under the License.
- */
-
-/**
- * XMLProtocolProvider.cpp
- *
- * XML-based protocol provider.
- */
-
-#include "internal.h"
-#include "exceptions.h"
-#include "binding/ProtocolProvider.h"
-#include "util/DOMPropertySet.h"
-#include "util/SPConstants.h"
-
-#include <map>
-#include <fstream>
-#include <boost/shared_ptr.hpp>
-#include <xmltooling/io/HTTPResponse.h>
-#include <xmltooling/util/NDC.h>
-#include <xmltooling/util/ReloadableXMLFile.h>
-#include <xmltooling/util/Threads.h>
-#include <xmltooling/util/XMLHelper.h>
-#include <xercesc/util/XMLUniDefs.hpp>
-
-using shibspconstants::SHIB2SPPROTOCOLS_NS;
-using namespace shibsp;
-using namespace xmltooling;
-using namespace boost;
-using namespace std;
-
-namespace shibsp {
-    static const XMLCh _id[] =          UNICODE_LITERAL_2(i,d);
-    static const XMLCh Binding[] =      UNICODE_LITERAL_7(B,i,n,d,i,n,g);
-    static const XMLCh Initiator[] =    UNICODE_LITERAL_9(I,n,i,t,i,a,t,o,r);
-    static const XMLCh Protocol[] =     UNICODE_LITERAL_8(P,r,o,t,o,c,o,l);
-    static const XMLCh Protocols[] =    UNICODE_LITERAL_9(P,r,o,t,o,c,o,l,s);
-    static const XMLCh Service[] =      UNICODE_LITERAL_7(S,e,r,v,i,c,e);
-
-#if defined (_MSC_VER)
-    #pragma warning( push )
-    #pragma warning( disable : 4250 )
-#endif
-
-    class SHIBSP_DLLLOCAL XMLProtocolProviderImpl : public DOMNodeFilter, DOMPropertySet
-    {
-    public:
-        XMLProtocolProviderImpl(const DOMElement* e, Category& log);
-        ~XMLProtocolProviderImpl() {
-            if (m_document)
-                m_document->release();
-        }
-
-        void setDocument(DOMDocument* doc) {
-            m_document = doc;
-        }
-
-        FilterAction acceptNode(const DOMNode* node) const {
-            return FILTER_REJECT;
-        }
-
-    private:
-        DOMDocument* m_document;
-        // Map of protocol/service pair to an Initiator propset plus an array of Binding propsets.
-        typedef map< pair<string,string>, pair< const PropertySet*,vector<const PropertySet*> > > protmap_t;
-        protmap_t m_map;
-        vector< boost::shared_ptr<PropertySet> > m_propsetJanitor;  // needed to maintain vector API
-
-        friend class SHIBSP_DLLLOCAL XMLProtocolProvider;
-    };
-
-    class XMLProtocolProvider : public ProtocolProvider, public ReloadableXMLFile
-    {
-    public:
-        XMLProtocolProvider(const DOMElement* e, bool deprecationSupport=true)
-                : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".ProtocolProvider.XML"), true, deprecationSupport) {
-            background_load(); // guarantees an exception or the policy is loaded
-        }
-
-        ~XMLProtocolProvider() {
-            shutdown();
-        }
-
-        const PropertySet* getInitiator(const char* protocol, const char* service) const {
-            XMLProtocolProviderImpl::protmap_t::const_iterator i = m_impl->m_map.find(pair<string,string>(protocol,service));
-            return (i != m_impl->m_map.end()) ? i->second.first : nullptr;
-        }
-
-        const vector<const PropertySet*>& getBindings(const char* protocol, const char* service) const {
-            XMLProtocolProviderImpl::protmap_t::const_iterator i = m_impl->m_map.find(pair<string,string>(protocol,service));
-            return (i != m_impl->m_map.end()) ? i->second.second : m_noBindings;
-        }
-
-    protected:
-        pair<bool,DOMElement*> background_load();
-
-    private:
-        static vector<const PropertySet*> m_noBindings;
-        scoped_ptr<XMLProtocolProviderImpl> m_impl;
-    };
-
-#if defined (_MSC_VER)
-    #pragma warning( pop )
-#endif
-
-    ProtocolProvider* SHIBSP_DLLLOCAL XMLProtocolProviderFactory(const DOMElement* const & e, bool deprecationSupport)
-    {
-        return new XMLProtocolProvider(e, deprecationSupport);
-    }
-}
-
-void SHIBSP_API shibsp::registerProtocolProviders()
-{
-    SPConfig::getConfig().ProtocolProviderManager.registerFactory(XML_PROTOCOL_PROVIDER, XMLProtocolProviderFactory);
-}
-
-ProtocolProvider::ProtocolProvider()
-{
-}
-
-ProtocolProvider::~ProtocolProvider()
-{
-}
-
-vector<const PropertySet*> XMLProtocolProvider::m_noBindings;
-
-XMLProtocolProviderImpl::XMLProtocolProviderImpl(const DOMElement* e, Category& log) : m_document(nullptr)
-{
-#ifdef _DEBUG
-    xmltooling::NDC ndc("XMLProtocolProviderImpl");
-#endif
-    if (!XMLHelper::isNodeNamed(e, SHIB2SPPROTOCOLS_NS, Protocols))
-        throw ConfigurationException("XML ProtocolProvider requires prot:Protocols at root of configuration.");
-
-    e = XMLHelper::getFirstChildElement(e, SHIB2SPPROTOCOLS_NS, Protocol);
-    while (e) {
-        string id = XMLHelper::getAttrString(e, nullptr, _id);
-        if (!id.empty()) {
-            const DOMElement* svc = XMLHelper::getFirstChildElement(e, SHIB2SPPROTOCOLS_NS, Service);
-            while (svc) {
-                string svcid = XMLHelper::getAttrString(svc, nullptr, _id);
-                if (!svcid.empty() && m_map.count(make_pair(id,svcid)) == 0) {
-                    pair< const PropertySet*,vector<const PropertySet*> >& entry = m_map[make_pair(id,svcid)];
-                    // Wrap the Initiator in a propset, if any.
-                    const DOMElement* child = XMLHelper::getFirstChildElement(svc, SHIB2SPPROTOCOLS_NS, Initiator);
-                    if (child) {
-                        boost::shared_ptr<DOMPropertySet> initprop(new DOMPropertySet());
-                        initprop->load(child, nullptr, this);
-                        m_propsetJanitor.push_back(initprop);
-                        entry.first = initprop.get();
-                    }
-                    else {
-                        entry.first = nullptr;
-                    }
-
-                    // Walk the Bindings.
-                    child = XMLHelper::getFirstChildElement(svc, SHIB2SPPROTOCOLS_NS, Binding);
-                    while (child) {
-                        boost::shared_ptr<DOMPropertySet> bindprop(new DOMPropertySet());
-                        bindprop->load(child, nullptr, this);
-                        m_propsetJanitor.push_back(bindprop);
-                        entry.second.push_back(bindprop.get());
-                        child = XMLHelper::getNextSiblingElement(child, SHIB2SPPROTOCOLS_NS, Binding);
-                    }
-                }
-                svc = XMLHelper::getNextSiblingElement(svc, SHIB2SPPROTOCOLS_NS, Service);
-            }
-        }
-        e = XMLHelper::getNextSiblingElement(e, SHIB2SPPROTOCOLS_NS, Protocol);
-    }
-}
-
-pair<bool,DOMElement*> XMLProtocolProvider::background_load()
-{
-    // Load from source using base class.
-    pair<bool,DOMElement*> raw = ReloadableXMLFile::load();
-
-    // If we own it, wrap it.
-    XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
-
-    scoped_ptr<XMLProtocolProviderImpl> impl(new XMLProtocolProviderImpl(raw.second, m_log));
-
-    // If we held the document, transfer it to the impl. If we didn't, it's a no-op.
-    impl->setDocument(docjanitor.release());
-
-    // Perform the swap inside a lock.
-    if (m_lock)
-        m_lock->wrlock();
-    SharedLock locker(m_lock, false);
-    m_impl.swap(impl);
-
-    return make_pair(false,(DOMElement*)nullptr);
-}
diff --git a/shibsp/impl/XMLApplication.cpp b/shibsp/impl/XMLApplication.cpp
index c3a97c1d..9eb5fd1b 100644
--- a/shibsp/impl/XMLApplication.cpp
+++ b/shibsp/impl/XMLApplication.cpp
@@ -27,7 +27,6 @@
 #include "internal.h"
 #include "ServiceProvider.h"
 #include "SPConfig.h"
-#include "binding/ProtocolProvider.h"
 #include "handler/LogoutInitiator.h"
 #include "handler/SessionInitiator.h"
 #include "impl/XMLApplication.h"
@@ -42,30 +41,11 @@
 #include <xmltooling/util/XMLConstants.h>
 #include <xmltooling/util/XMLHelper.h>
 
-#ifndef SHIBSP_LITE
-# include "attribute/filtering/AttributeFilter.h"
-# include "attribute/resolver/AttributeExtractor.h"
-# include "attribute/resolver/AttributeResolver.h"
-# include <saml/exceptions.h>
-# include <saml/SAMLConfig.h>
-# include <saml/binding/SAMLArtifact.h>
-# include <saml/saml2/binding/SAML2ArtifactType0004.h>
-# include <saml/saml2/metadata/EntityMatcher.h>
-# include <saml/saml2/metadata/Metadata.h>
-# include <saml/saml2/metadata/MetadataProvider.h>
-# include <xmltooling/security/ChainingTrustEngine.h>
-# include <xmltooling/security/CredentialResolver.h>
-# include <xmltooling/security/SecurityHelper.h>
-using namespace opensaml::saml2;
-using namespace opensaml::saml2p;
-using namespace opensaml::saml2md;
-using namespace opensaml;
-#else
-# include "lite/SAMLConstants.h"
-#endif
+#include "lite/SAMLConstants.h"
 
 using namespace shibsp;
 using namespace xmltooling;
+using namespace boost::algorithm;
 using namespace boost;
 using namespace std;
 
@@ -107,7 +87,6 @@ namespace {
 
 XMLApplication::XMLApplication(
     const ServiceProvider* sp,
-    const ProtocolProvider* pp,
     DOMElement* e,
     bool deprecationSupport,
     const XMLApplication* base,
@@ -115,9 +94,6 @@ XMLApplication::XMLApplication(
     ) : Application(sp), m_base(base), m_acsDefault(nullptr), m_sessionInitDefault(nullptr), m_artifactResolutionDefault(nullptr),
         m_deprecationSupport(deprecationSupport), m_doc(doc)
 {
-#ifdef _DEBUG
-    xmltooling::NDC ndc("XMLApplication");
-#endif
     Category& log = Category::getInstance(SHIBSP_LOGCAT ".Application");
 
     // First load any property sets.
@@ -215,9 +191,6 @@ XMLApplication::XMLApplication(
         setParent(base);
 
     SPConfig& conf=SPConfig::getConfig();
-#ifndef SHIBSP_LITE
-    XMLToolingConfig& xmlConf=XMLToolingConfig::getConfig();
-#endif
 
     // This used to be an actual hash, but now it's just a hex-encode to avoid xmlsec dependency.
     static char DIGITS[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
@@ -231,7 +204,7 @@ XMLApplication::XMLApplication(
     doAttributeInfo(log);
 
     if (conf.isEnabled(SPConfig::Handlers))
-        doHandlers(pp, e, log);
+        doHandlers(e, log);
 
     // Notification.
     const DOMNodeList* nlist = e->getElementsByTagNameNS(e->getNamespaceURI(), Notify);
@@ -249,49 +222,6 @@ XMLApplication::XMLApplication(
     }
 
 #ifndef SHIBSP_LITE
-    nlist = e->getElementsByTagNameNS(samlconstants::SAML20_NS, Audience::LOCAL_NAME);
-    if (nlist && nlist->getLength()) {
-        SPConfig::getConfig().deprecation().warn("use of <saml:Audience> elements outside of a Security Policy Rule");
-        for (XMLSize_t i = 0; i < nlist->getLength(); ++i)
-            if (nlist->item(i)->getParentNode()->isSameNode(e) && nlist->item(i)->hasChildNodes())
-                m_audiences.push_back(nlist->item(i)->getFirstChild()->getNodeValue());
-    }
-
-    if (conf.isEnabled(SPConfig::Metadata)) {
-        m_metadata.reset(
-            doChainedPlugins(
-                SAMLConfig::getConfig().MetadataProviderManager, "MetadataProvider", CHAINING_METADATA_PROVIDER, _MetadataProvider, e, log
-                )
-            );
-        try {
-            if (m_metadata)
-                m_metadata->init();
-            else if (!m_base)
-                log.warn("no MetadataProvider available, configure at least one for standard SSO usage");
-        }
-        catch (const std::exception& ex) {
-            log.crit("error initializing MetadataProvider: %s", ex.what());
-        }
-    }
-
-    if (conf.isEnabled(SPConfig::Trust)) {
-        m_trust.reset(doChainedPlugins(xmlConf.TrustEngineManager, "TrustEngine", CHAINING_TRUSTENGINE, _TrustEngine, e, log));
-        if (!m_trust && !m_base) {
-            log.info("no TrustEngine specified or installed, using default of %s", EXPLICIT_KEY_TRUSTENGINE);
-            m_trust.reset(xmlConf.TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr, m_deprecationSupport));
-        }
-    }
-
-    if (conf.isEnabled(SPConfig::AttributeResolution)) {
-        doAttributePlugins(e, log);
-    }
-
-    if (conf.isEnabled(SPConfig::Credentials)) {
-        m_credResolver.reset(
-            doChainedPlugins(xmlConf.CredentialResolverManager, "CredentialResolver", CHAINING_CREDENTIAL_RESOLVER, _CredentialResolver, e, log)
-            );
-    }
-
     // Finally, load relying parties.
     const DOMElement* child = XMLHelper::getFirstChildElement(e, RelyingParty);
     while (child) {
@@ -469,7 +399,7 @@ void XMLApplication::doAttributeInfo(Category& log)
     }
 }
 
-void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e, Category& log)
+void XMLApplication::doHandlers(const DOMElement* e, Category& log)
 {
     SPConfig& conf = SPConfig::getConfig();
 
@@ -515,20 +445,20 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
     DOMElement* child = sessions ? XMLHelper::getFirstChildElement(sessions->getElement()) : nullptr;
     while (child) {
         if (XMLHelper::isNodeNamed(child, sessions->getElement()->getNamespaceURI(), SSO)) {
-            if (pp)
-                doSSO(*pp, protocols, child, log);
+            if (false)
+                doSSO(protocols, child, log);
             else
                 log.error("no ProtocolProvider, SSO auto-configure unsupported");
         }
         else if (XMLHelper::isNodeNamed(child, sessions->getElement()->getNamespaceURI(), Logout)) {
-            if (pp)
-                doLogout(*pp, protocols, child, log);
+            if (false)
+                doLogout(protocols, child, log);
             else
                 log.error("no ProtocolProvider, Logout auto-configure unsupported");
         }
         else if (XMLHelper::isNodeNamed(child, sessions->getElement()->getNamespaceURI(), NameIDMgmt)) {
-            if (pp)
-                doNameIDMgmt(*pp, protocols, child, log);
+            if (false)
+                doNameIDMgmt(protocols, child, log);
             else
                 log.error("no ProtocolProvider, NameIDMgmt auto-configure unsupported");
         }
@@ -703,519 +633,23 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
     }
 }
 
-void XMLApplication::doSSO(const ProtocolProvider& pp, set<string>& protocols, DOMElement* e, Category& log)
-{
-    if (!e->hasChildNodes())
-        return;
-
-    // This denotes whether the SSO element has been processed before or is specific to an override.
-    bool hasChildElements = e->getFirstElementChild() != nullptr;
-
-    const DOMNamedNodeMap* ssoprops = e->getAttributes();
-    XMLSize_t ssopropslen = ssoprops ? ssoprops->getLength() : 0;
-
-    const SPConfig& conf = SPConfig::getConfig();
-
-    int index = 0; // track ACS indexes globally across all protocols
-
-    // Tokenize the protocol list inside the element.
-    XMLStringTokenizer prottokens(XMLHelper::getTextContent(e));
-    while (prottokens.hasMoreTokens()) {
-        auto_ptr_char prot(prottokens.nextToken());
-
-        // Look for initiator.
-        const PropertySet* initiator = pp.getInitiator(prot.get(), "SSO");
-        if (initiator) {
-            log.info("auto-configuring SSO initiation for protocol (%s)", prot.get());
-            pair<bool,const XMLCh*> inittype = initiator->getXMLString("id");
-            if (inittype.first) {
-                if (!hasChildElements) {
-                    // Append a session initiator element of the designated type to the root element.
-                    DOMElement* sidom = e->getOwnerDocument()->createElementNS(e->getNamespaceURI(), _SessionInitiator);
-
-                    // Copy in any attributes from the <SSO> element so they can be accessed as properties in the SI handler
-                    // but more importantly the MessageEncoders, which are DOM-aware only, not SP property-aware.
-                    // The property-based lookups will walk up the DOM tree but the DOM-only code won't.
-                    for (XMLSize_t p = 0; p < ssopropslen; ++p) {
-                        DOMNode* ssoprop = ssoprops->item(p);
-                        if (ssoprop->getNodeType() == DOMNode::ATTRIBUTE_NODE) {
-                            sidom->setAttributeNS(
-                                ((DOMAttr*)ssoprop)->getNamespaceURI(),
-                                ((DOMAttr*)ssoprop)->getLocalName(),
-                                ((DOMAttr*)ssoprop)->getValue()
-                            );
-                        }
-                    }
-
-                    sidom->setAttributeNS(nullptr, _type, inittype.second);
-                    e->appendChild(sidom);
-                    log.info("adding SessionInitiator of type (%s) to chain (/Login)", initiator->getString("id").second);
-                }
-
-                doArtifactResolution(pp, prot.get(), e, log);
-                protocols.insert(prot.get());
-            }
-            else {
-                log.error("missing id property on Initiator element, check config for protocol (%s)", prot.get());
-            }
-        }
-
-        // Look for incoming bindings.
-        const vector<const PropertySet*>& bindings = pp.getBindings(prot.get(), "SSO");
-        if (!bindings.empty()) {
-            log.info("auto-configuring SSO endpoints for protocol (%s)", prot.get());
-            pair<bool,const XMLCh*> idprop,pathprop;
-            for (vector<const PropertySet*>::const_iterator b = bindings.begin(); b != bindings.end(); ++b, ++index) {
-                idprop = (*b)->getXMLString("id");
-                pathprop = (*b)->getXMLString("path");
-                if (idprop.first && pathprop.first) {
-                    DOMElement* acsdom = e->getOwnerDocument()->createElementNS(samlconstants::SAML20MD_NS, _AssertionConsumerService);
-
-                    // Copy in any attributes from the <SSO> element so they can be accessed as properties in the ACS handler,
-                    // since the handlers aren't attached to the SSO element.
-                    for (XMLSize_t p = 0; p < ssopropslen; ++p) {
-                        DOMNode* ssoprop = ssoprops->item(p);
-                        if (ssoprop->getNodeType() == DOMNode::ATTRIBUTE_NODE) {
-                            acsdom->setAttributeNS(
-                                ((DOMAttr*)ssoprop)->getNamespaceURI(),
-                                ((DOMAttr*)ssoprop)->getLocalName(),
-                                ((DOMAttr*)ssoprop)->getValue()
-                                );
-                        }
-                    }
-
-                    // Set necessary properties based on context.
-                    acsdom->setAttributeNS(nullptr, Binding, idprop.second);
-                    acsdom->setAttributeNS(nullptr, Location, pathprop.second);
-                    xstring indexbuf(1, chDigit_1 + (index % 10));
-                    if (index / 10)
-                        indexbuf = (XMLCh)(chDigit_1 + (index / 10)) + indexbuf;
-                    acsdom->setAttributeNS(nullptr, _index, indexbuf.c_str());
-
-                    log.info("adding AssertionConsumerService for Binding (%s) at (%s)", (*b)->getString("id").second, (*b)->getString("path").second);
-                    boost::shared_ptr<Handler> handler(
-                        conf.AssertionConsumerServiceManager.newPlugin(
-                            (*b)->getString("id").second, pair<const DOMElement*,const char*>(acsdom, getId()), m_deprecationSupport
-                            )
-                        );
-                    m_handlers.push_back(handler);
-
-                    // Setup maps and defaults.
-                    const XMLCh* protfamily = handler->getProtocolFamily();
-                    if (protfamily)
-                        m_acsProtocolMap[protfamily].push_back(handler.get());
-                    m_acsIndexMap[handler->getUnsignedInt("index").second] = handler.get();
-                    if (!m_acsDefault)
-                        m_acsDefault = handler.get();
-
-                    // Insert into location map.
-                    pair<bool,const char*> location = handler->getString("Location");
-                    if (location.first && *location.second == '/')
-                        m_handlerMap[location.second] = handler.get();
-                    else if (location.first)
-                        m_handlerMap[string("/") + location.second] = handler.get();
-                }
-                else {
-                    log.error("missing id or path property on Binding element, check config for protocol (%s)", prot.get());
-                }
-            }
-        }
-
-        if (!initiator && bindings.empty()) {
-            log.error("no SSO Initiator or Binding config for protocol (%s)", prot.get());
-        }
-    }
-
-    // Handle discovery.
-    static const XMLCh discoveryProtocol[] = UNICODE_LITERAL_17(d,i,s,c,o,v,e,r,y,P,r,o,t,o,c,o,l);
-    static const XMLCh discoveryURL[] = UNICODE_LITERAL_12(d,i,s,c,o,v,e,r,y,U,R,L);
-    static const XMLCh _URL[] = UNICODE_LITERAL_3(U,R,L);
-
-    if (!hasChildElements) {
-        const XMLCh* discop = e->getAttributeNS(nullptr, discoveryProtocol);
-        if (discop && *discop) {
-            const XMLCh* discou = e->getAttributeNS(nullptr, discoveryURL);
-            if (discou && *discou) {
-                // Append a session initiator element of the designated type to the root element.
-                DOMElement* sidom = e->getOwnerDocument()->createElementNS(e->getNamespaceURI(), _SessionInitiator);
-
-                // Copy in any attributes from the <SSO> element so they can be accessed as properties in the SI handler
-                // but more importantly the MessageEncoders, which are DOM-aware only, not SP property-aware.
-                // The property-based lookups will walk up the DOM tree but the DOM-only code won't.
-                for (XMLSize_t p = 0; p < ssopropslen; ++p) {
-                    DOMNode* ssoprop = ssoprops->item(p);
-                    if (ssoprop->getNodeType() == DOMNode::ATTRIBUTE_NODE) {
-                        sidom->setAttributeNS(
-                            ((DOMAttr*)ssoprop)->getNamespaceURI(),
-                            ((DOMAttr*)ssoprop)->getLocalName(),
-                            ((DOMAttr*)ssoprop)->getValue()
-                        );
-                    }
-                }
-
-                sidom->setAttributeNS(nullptr, _type, discop);
-                sidom->setAttributeNS(nullptr, _URL, discou);
-                e->appendChild(sidom);
-                if (log.isInfoEnabled()) {
-                    auto_ptr_char dp(discop);
-                    log.info("adding SessionInitiator of type (%s) to chain (/Login)", dp.get());
-                }
-            }
-            else {
-                log.error("SSO discoveryProtocol specified without discoveryURL");
-            }
-        }
-    }
-
-    if (!hasChildElements) {
-        // Attach default Location to SSO element.
-        static const XMLCh _loc[] = { chForwardSlash, chLatin_L, chLatin_o, chLatin_g, chLatin_i, chLatin_n, chNull };
-        e->setAttributeNS(nullptr, Location, _loc);
-    }
-
-    // Instantiate Chaining initiator around the SSO element.
-    boost::shared_ptr<SessionInitiator> chain(
-        conf.SessionInitiatorManager.newPlugin(CHAINING_SESSION_INITIATOR, pair<const DOMElement*,const char*>(e, getId()), m_deprecationSupport)
-        );
-    m_handlers.push_back(chain);
-    m_sessionInitDefault = chain.get();
-    m_sessionInitMap["Login"] = chain.get();
-    m_handlerMap["/Login"] = chain.get();
-}
-
-void XMLApplication::doLogout(const ProtocolProvider& pp, set<string>& protocols, DOMElement* e, Category& log)
-{
-    if (!e->hasChildNodes())
-        return;
-
-    // This denotes whether the Logout element has been processed before or is specific to an override.
-    bool hasChildElements = e->getFirstElementChild() != nullptr;
-
-    const DOMNamedNodeMap* sloprops = e->getAttributes();
-    XMLSize_t slopropslen = sloprops ? sloprops->getLength() : 0;
-
-    const SPConfig& conf = SPConfig::getConfig();
-
-    // Tokenize the protocol list inside the element.
-    XMLStringTokenizer prottokens(XMLHelper::getTextContent(e));
-    while (prottokens.hasMoreTokens()) {
-        auto_ptr_char prot(prottokens.nextToken());
-
-        // Look for initiator.
-        const PropertySet* initiator = pp.getInitiator(prot.get(), "Logout");
-        if (initiator) {
-            log.info("auto-configuring Logout initiation for protocol (%s)", prot.get());
-            pair<bool,const XMLCh*> inittype = initiator->getXMLString("id");
-            if (inittype.first) {
-                if (!hasChildElements) {
-                    // Append a logout initiator element of the designated type to the root element.
-                    DOMElement* lidom = e->getOwnerDocument()->createElementNS(e->getNamespaceURI(), _LogoutInitiator);
-
-                    // Copy in any attributes from the <Logout> element so they can be accessed as properties in the LI handler
-                    // but more importantly the MessageEncoders, which are DOM-aware only, not SP property-aware.
-                    // The property-based lookups will walk up the DOM tree but the DOM-only code won't.
-                    for (XMLSize_t p = 0; p < slopropslen; ++p) {
-                        DOMNode* sloprop = sloprops->item(p);
-                        if (sloprop->getNodeType() == DOMNode::ATTRIBUTE_NODE) {
-                            lidom->setAttributeNS(
-                                ((DOMAttr*)sloprop)->getNamespaceURI(),
-                                ((DOMAttr*)sloprop)->getLocalName(),
-                                ((DOMAttr*)sloprop)->getValue()
-                            );
-                        }
-                    }
-
-                    lidom->setAttributeNS(nullptr, _type, inittype.second);
-                    e->appendChild(lidom);
-                    log.info("adding LogoutInitiator of type (%s) to chain (/Logout)", initiator->getString("id").second);
-                }
-
-                if (protocols.count(prot.get()) == 0) {
-                    doArtifactResolution(pp, prot.get(), e, log);
-                    protocols.insert(prot.get());
-                }
-            }
-            else {
-                log.error("missing id property on Initiator element, check config for protocol (%s)", prot.get());
-            }
-        }
-
-        // Look for incoming bindings.
-        const vector<const PropertySet*>& bindings = pp.getBindings(prot.get(), "Logout");
-        if (!bindings.empty()) {
-            log.info("auto-configuring Logout endpoints for protocol (%s)", prot.get());
-            pair<bool,const XMLCh*> idprop,pathprop;
-            for (vector<const PropertySet*>::const_iterator b = bindings.begin(); b != bindings.end(); ++b) {
-                idprop = (*b)->getXMLString("id");
-                pathprop = (*b)->getXMLString("path");
-                if (idprop.first && pathprop.first) {
-                    DOMElement* slodom = e->getOwnerDocument()->createElementNS(samlconstants::SAML20MD_NS, _SingleLogoutService);
-
-                    // Copy in any attributes from the <Logout> element so they can be accessed as properties in the SLO handler.
-                    for (XMLSize_t p = 0; p < slopropslen; ++p) {
-                        DOMNode* sloprop = sloprops->item(p);
-                        if (sloprop->getNodeType() == DOMNode::ATTRIBUTE_NODE) {
-                            slodom->setAttributeNS(
-                                ((DOMAttr*)sloprop)->getNamespaceURI(),
-                                ((DOMAttr*)sloprop)->getLocalName(),
-                                ((DOMAttr*)sloprop)->getValue()
-                                );
-                        }
-                    }
-
-                    // Set necessary properties based on context.
-                    slodom->setAttributeNS(nullptr, Binding, idprop.second);
-                    slodom->setAttributeNS(nullptr, Location, pathprop.second);
-                    if (e->hasAttributeNS(nullptr, _policyId))
-                        slodom->setAttributeNS(e->getNamespaceURI(), _policyId, e->getAttributeNS(nullptr, _policyId));
-
-                    log.info("adding SingleLogoutService for Binding (%s) at (%s)", (*b)->getString("id").second, (*b)->getString("path").second);
-                    boost::shared_ptr<Handler> handler(
-                        conf.SingleLogoutServiceManager.newPlugin((*b)->getString("id").second, pair<const DOMElement*,const char*>(slodom, getId()), m_deprecationSupport)
-                        );
-                    m_handlers.push_back(handler);
-
-                    // Insert into location map.
-                    pair<bool,const char*> location = handler->getString("Location");
-                    if (location.first && *location.second == '/')
-                        m_handlerMap[location.second] = handler.get();
-                    else if (location.first)
-                        m_handlerMap[string("/") + location.second] = handler.get();
-                }
-                else {
-                    log.error("missing id or path property on Binding element, check config for protocol (%s)", prot.get());
-                }
-            }
-
-            if (protocols.count(prot.get()) == 0) {
-                doArtifactResolution(pp, prot.get(), e, log);
-                protocols.insert(prot.get());
-            }
-        }
-
-        if (!initiator && bindings.empty()) {
-            log.error("no Logout Initiator or Binding config for protocol (%s)", prot.get());
-        }
-    }
-
-    // Attach default Location to Logout element.
-    static const XMLCh _loc[] = { chForwardSlash, chLatin_L, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chNull };
-    e->setAttributeNS(nullptr, Location, _loc);
-
-    // Instantiate Chaining initiator around the SSO element.
-    boost::shared_ptr<Handler> chain(
-        conf.LogoutInitiatorManager.newPlugin(CHAINING_LOGOUT_INITIATOR, pair<const DOMElement*,const char*>(e, getId()), m_deprecationSupport)
-        );
-    m_handlers.push_back(chain);
-    m_handlerMap["/Logout"] = chain.get();
-}
-
-void XMLApplication::doNameIDMgmt(const ProtocolProvider& pp, set<string>& protocols, DOMElement* e, Category& log)
+void XMLApplication::doSSO(set<string>& protocols, DOMElement* e, Category& log)
 {
-    if (!e->hasChildNodes())
-        return;
-    const DOMNamedNodeMap* nimprops = e->getAttributes();
-    XMLSize_t nimpropslen = nimprops ? nimprops->getLength() : 0;
-
-    const SPConfig& conf = SPConfig::getConfig();
-
-    // Tokenize the protocol list inside the element.
-    XMLStringTokenizer prottokens(XMLHelper::getTextContent(e));
-    while (prottokens.hasMoreTokens()) {
-        auto_ptr_char prot(prottokens.nextToken());
-
-        // Look for incoming bindings.
-        const vector<const PropertySet*>& bindings = pp.getBindings(prot.get(), "NameIDMgmt");
-        if (!bindings.empty()) {
-            log.info("auto-configuring NameIDMgmt endpoints for protocol (%s)", prot.get());
-            pair<bool,const XMLCh*> idprop,pathprop;
-            for (vector<const PropertySet*>::const_iterator b = bindings.begin(); b != bindings.end(); ++b) {
-                idprop = (*b)->getXMLString("id");
-                pathprop = (*b)->getXMLString("path");
-                if (idprop.first && pathprop.first) {
-                    DOMElement* nimdom = e->getOwnerDocument()->createElementNS(samlconstants::SAML20MD_NS, _ManageNameIDService);
-
-                    // Copy in any attributes from the <NameIDMgmt> element so they can be accessed as properties in the NIM handler.
-                    for (XMLSize_t p = 0; p < nimpropslen; ++p) {
-                        DOMNode* nimprop = nimprops->item(p);
-                        if (nimprop->getNodeType() == DOMNode::ATTRIBUTE_NODE) {
-                            nimdom->setAttributeNS(
-                                ((DOMAttr*)nimprop)->getNamespaceURI(),
-                                ((DOMAttr*)nimprop)->getLocalName(),
-                                ((DOMAttr*)nimprop)->getValue()
-                                );
-                        }
-                    }
-
-                    // Set necessary properties based on context.
-                    nimdom->setAttributeNS(nullptr, Binding, idprop.second);
-                    nimdom->setAttributeNS(nullptr, Location, pathprop.second);
-                    if (e->hasAttributeNS(nullptr, _policyId))
-                        nimdom->setAttributeNS(e->getNamespaceURI(), _policyId, e->getAttributeNS(nullptr, _policyId));
-
-                    log.info("adding ManageNameIDService for Binding (%s) at (%s)", (*b)->getString("id").second, (*b)->getString("path").second);
-                    boost::shared_ptr<Handler> handler(
-                        conf.ManageNameIDServiceManager.newPlugin(
-                            (*b)->getString("id").second, pair<const DOMElement*,const char*>(nimdom, getId()), m_deprecationSupport
-                            )
-                        );
-                    m_handlers.push_back(handler);
-
-                    // Insert into location map.
-                    pair<bool,const char*> location = handler->getString("Location");
-                    if (location.first && *location.second == '/')
-                        m_handlerMap[location.second] = handler.get();
-                    else if (location.first)
-                        m_handlerMap[string("/") + location.second] = handler.get();
-                }
-                else {
-                    log.error("missing id or path property on Binding element, check config for protocol (%s)", prot.get());
-                }
-            }
-
-            if (protocols.count(prot.get()) == 0) {
-                doArtifactResolution(pp, prot.get(), e, log);
-                protocols.insert(prot.get());
-            }
-        }
-        else {
-            log.error("no NameIDMgmt Binding config for protocol (%s)", prot.get());
-        }
-    }
 }
 
-void XMLApplication::doArtifactResolution(const ProtocolProvider& pp, const char* protocol, DOMElement* e, Category& log)
+void XMLApplication::doLogout(set<string>& protocols, DOMElement* e, Category& log)
 {
-    const SPConfig& conf = SPConfig::getConfig();
-
-    int index = 0; // track indexes globally across all protocols
-
-    // Look for incoming bindings.
-    const vector<const PropertySet*>& bindings = pp.getBindings(protocol, "ArtifactResolution");
-    if (!bindings.empty()) {
-        log.info("auto-configuring ArtifactResolution endpoints for protocol (%s)", protocol);
-        pair<bool,const XMLCh*> idprop,pathprop;
-        for (vector<const PropertySet*>::const_iterator b = bindings.begin(); b != bindings.end(); ++b, ++index) {
-            idprop = (*b)->getXMLString("id");
-            pathprop = (*b)->getXMLString("path");
-            if (idprop.first && pathprop.first) {
-                DOMElement* artdom = e->getOwnerDocument()->createElementNS(samlconstants::SAML20MD_NS, _ArtifactResolutionService);
-                artdom->setAttributeNS(nullptr, Binding, idprop.second);
-                artdom->setAttributeNS(nullptr, Location, pathprop.second);
-                xstring indexbuf(1, chDigit_1 + (index % 10));
-                if (index / 10)
-                    indexbuf = (XMLCh)(chDigit_1 + (index / 10)) + indexbuf;
-                artdom->setAttributeNS(nullptr, _index, indexbuf.c_str());
-
-                log.info("adding ArtifactResolutionService for Binding (%s) at (%s)", (*b)->getString("id").second, (*b)->getString("path").second);
-                boost::shared_ptr<Handler> handler(
-                    conf.ArtifactResolutionServiceManager.newPlugin(
-                        (*b)->getString("id").second, pair<const DOMElement*,const char*>(artdom, getId()), m_deprecationSupport
-                        )
-                    );
-                m_handlers.push_back(handler);
-
-                if (!m_artifactResolutionDefault)
-                    m_artifactResolutionDefault = handler.get();
-
-                // Insert into location map.
-                pair<bool,const char*> location = handler->getString("Location");
-                if (location.first && *location.second == '/')
-                    m_handlerMap[location.second] = handler.get();
-                else if (location.first)
-                    m_handlerMap[string("/") + location.second] = handler.get();
-            }
-            else {
-                log.error("missing id or path property on Binding element, check config for protocol (%s)", protocol);
-            }
-        }
-    }
 }
 
-#ifndef SHIBSP_LITE
-
-void XMLApplication::doAttributePlugins(DOMElement* e, Category& log)
+void XMLApplication::doNameIDMgmt(set<string>& protocols, DOMElement* e, Category& log)
 {
-    const SPConfig& conf = SPConfig::getConfig();
-
-    m_attrExtractor.reset(
-        doChainedPlugins(conf.AttributeExtractorManager, "AttributeExtractor", CHAINING_ATTRIBUTE_EXTRACTOR, _AttributeExtractor, e, log)
-        );
-
-    m_attrFilter.reset(
-        doChainedPlugins(conf.AttributeFilterManager, "AttributeFilter", CHAINING_ATTRIBUTE_FILTER, _AttributeFilter, e, log, DUMMY_ATTRIBUTE_FILTER)
-        );
-
-    m_attrResolver.reset(
-        doChainedPlugins(conf.AttributeResolverManager, "AttributeResolver", CHAINING_ATTRIBUTE_RESOLVER, _AttributeResolver, e, log)
-        );
-
-    if (m_unsetHeaders.empty()) {
-        vector<string> unsetHeaders;
-        if (m_attrExtractor) {
-            Locker extlock(m_attrExtractor.get());
-            m_attrExtractor->getAttributeIds(unsetHeaders);
-        }
-        else if (m_base && m_base->m_attrExtractor) {
-            Locker extlock(m_base->m_attrExtractor.get());
-            m_base->m_attrExtractor->getAttributeIds(unsetHeaders);
-        }
-        if (m_attrResolver) {
-            Locker reslock(m_attrResolver.get());
-            m_attrResolver->getAttributeIds(unsetHeaders);
-        }
-        else if (m_base && m_base->m_attrResolver) {
-            Locker extlock(m_base->m_attrResolver.get());
-            m_base->m_attrResolver->getAttributeIds(unsetHeaders);
-        }
-        if (!unsetHeaders.empty()) {
-            string transformedprefix(m_attributePrefix.second);
-            const char* pch;
-            pair<bool,const char*> prefix = getString("metadataAttributePrefix");
-            if (prefix.first) {
-                pch = prefix.second;
-                while (*pch) {
-                    transformedprefix += (isalnum(*pch) ? toupper(*pch) : '_');
-                    pch++;
-                }
-            }
-            for (vector<string>::const_iterator hdr = unsetHeaders.begin(); hdr!=unsetHeaders.end(); ++hdr) {
-                string transformed;
-                pch = hdr->c_str();
-                while (*pch) {
-                    transformed += (isalnum(*pch) ? toupper(*pch) : '_');
-                    pch++;
-                }
-                m_unsetHeaders.push_back(make_pair(m_attributePrefix.first + *hdr, m_attributePrefix.second + transformed));
-                if (prefix.first)
-                    m_unsetHeaders.push_back(make_pair(m_attributePrefix.first + prefix.second + *hdr, transformedprefix + transformed));
-            }
-        }
-        m_unsetHeaders.push_back(make_pair(m_attributePrefix.first + "Shib-Application-ID", m_attributePrefix.second + "SHIB_APPLICATION_ID"));
-    }
 }
 
-SAMLArtifact* XMLApplication::generateSAML1Artifact(const opensaml::saml2md::EntityDescriptor* relyingParty) const
+void XMLApplication::doArtifactResolution(const char* protocol, DOMElement* e, Category& log)
 {
-    throw ConfigurationException("No support for SAML 1.x artifact generation.");
+ 
 }
 
-SAML2Artifact* XMLApplication::generateSAML2Artifact(const opensaml::saml2md::EntityDescriptor* relyingParty) const
-{
-    pair<bool, int> index = make_pair(false, 0);
-    const PropertySet* props = getRelyingParty(relyingParty);
-    index = props->getInt("artifactEndpointIndex");
-    if (!index.first)
-        index = getArtifactEndpointIndex();
-    pair<bool, const char*> entityID = props->getString("entityID");
-    return new SAML2ArtifactType0004(
-        SecurityHelper::doHash("SHA1", entityID.second, strlen(entityID.second), false),
-        index.first ? index.second : 1
-    );
-}
-
-#endif
-
 void XMLApplication::receive(DDF& in, ostream& out)
 {
     // Only current function is to return the headers to clear.
diff --git a/shibsp/impl/XMLApplication.h b/shibsp/impl/XMLApplication.h
index 2a455b33..d1bfe829 100644
--- a/shibsp/impl/XMLApplication.h
+++ b/shibsp/impl/XMLApplication.h
@@ -45,26 +45,9 @@ namespace xmltooling {
     class TrustEngine;
 };
 
-#ifndef SHIBSP_LITE
-namespace opensaml {
-    class SAMLArtifact;
-
-    namespace saml2p {
-        class SAML2Artifact;
-    };
-
-    namespace saml2md {
-        class EntityDescriptor;
-        class EntityMatcher;
-        class MetadataProvider;
-    };
-};
-#endif
-
 namespace shibsp {
 
     class LogoutInitiator;
-    class ProtocolProvider;
     class ServiceProvider;
     class SessionInitiator;
 
@@ -79,7 +62,6 @@ namespace shibsp {
     public:
         XMLApplication(
             const ServiceProvider*,
-            const ProtocolProvider*,
             xercesc::DOMElement*,
             bool deprecationSupport,
             const XMLApplication* base=nullptr,
@@ -91,38 +73,9 @@ namespace shibsp {
         }
 
 #ifndef SHIBSP_LITE
-        opensaml::SAMLArtifact* generateSAML1Artifact(const opensaml::saml2md::EntityDescriptor* relyingParty) const;
-        opensaml::saml2p::SAML2Artifact* generateSAML2Artifact(const opensaml::saml2md::EntityDescriptor* relyingParty) const;
-
-        opensaml::saml2md::MetadataProvider* getMetadataProvider(bool required=true) const {
-            if (required && !m_base && !m_metadata)
-                throw ConfigurationException("No MetadataProvider available.");
-            return (!m_metadata && m_base) ? m_base->getMetadataProvider(required) : m_metadata.get();
-        }
-        xmltooling::TrustEngine* getTrustEngine(bool required = true) const {
-            if (required && !m_base && !m_trust)
-                throw ConfigurationException("No TrustEngine available.");
-            return (!m_trust && m_base) ? m_base->getTrustEngine(required) : m_trust.get();
-        }
-        AttributeExtractor* getAttributeExtractor() const {
-            return (!m_attrExtractor && m_base) ? m_base->getAttributeExtractor() : m_attrExtractor.get();
-        }
-        AttributeFilter* getAttributeFilter() const {
-            return (!m_attrFilter && m_base) ? m_base->getAttributeFilter() : m_attrFilter.get();
-        }
-        AttributeResolver* getAttributeResolver() const {
-            return (!m_attrResolver && m_base) ? m_base->getAttributeResolver() : m_attrResolver.get();
-        }
-        xmltooling::CredentialResolver* getCredentialResolver() const {
-            return (!m_credResolver && m_base) ? m_base->getCredentialResolver() : m_credResolver.get();
-        }
         const PropertySet* getRelyingParty(const opensaml::saml2md::EntityDescriptor* provider) const;
         const PropertySet* getRelyingParty(const XMLCh* entityID) const;
 
-        const std::vector<const XMLCh*>* getAudiences() const {
-            return (m_audiences.empty() && m_base) ? m_base->getAudiences() : &m_audiences;
-        }
-
         // PropertySet overrides.
         std::pair<bool, const char*> getString(const char* name, const char* ns = nullptr) const;
         std::pair<bool, const XMLCh*> getXMLString(const char* name, const char* ns = nullptr) const;
@@ -162,24 +115,15 @@ namespace shibsp {
             const char* dummyType = nullptr
         );
         void doAttributeInfo(xmltooling::logging::Category&);
-        void doHandlers(const ProtocolProvider*, const xercesc::DOMElement*, xmltooling::logging::Category&);
-        void doSSO(const ProtocolProvider&, std::set<std::string>&, xercesc::DOMElement*, xmltooling::logging::Category&);
-        void doLogout(const ProtocolProvider&, std::set<std::string>&, xercesc::DOMElement*, xmltooling::logging::Category&);
-        void doNameIDMgmt(const ProtocolProvider&, std::set<std::string>&, xercesc::DOMElement*, xmltooling::logging::Category&);
-        void doArtifactResolution(const ProtocolProvider&, const char*, xercesc::DOMElement*, xmltooling::logging::Category&);
+        void doHandlers(const xercesc::DOMElement*, xmltooling::logging::Category&);
+        void doSSO(std::set<std::string>&, xercesc::DOMElement*, xmltooling::logging::Category&);
+        void doLogout(std::set<std::string>&, xercesc::DOMElement*, xmltooling::logging::Category&);
+        void doNameIDMgmt(std::set<std::string>&, xercesc::DOMElement*, xmltooling::logging::Category&);
+        void doArtifactResolution(const char*, xercesc::DOMElement*, xmltooling::logging::Category&);
         const XMLApplication* m_base;
         std::string m_hash;
         std::pair<std::string, std::string> m_attributePrefix;
 #ifndef SHIBSP_LITE
-        void doAttributePlugins(xercesc::DOMElement*, xmltooling::logging::Category&);
-        boost::scoped_ptr<opensaml::saml2md::MetadataProvider> m_metadata;
-        boost::scoped_ptr<xmltooling::TrustEngine> m_trust;
-        boost::scoped_ptr<AttributeExtractor> m_attrExtractor;
-        boost::scoped_ptr<AttributeFilter> m_attrFilter;
-        boost::scoped_ptr<AttributeResolver> m_attrResolver;
-        boost::scoped_ptr<xmltooling::CredentialResolver> m_credResolver;
-        std::vector<const XMLCh*> m_audiences;
-
         // RelyingParty properties
         std::map< xmltooling::xstring, boost::shared_ptr<PropertySet> > m_partyMap;   // name-based matching
         std::vector< std::pair< boost::shared_ptr<opensaml::saml2md::EntityMatcher>, boost::shared_ptr<PropertySet> > > m_partyVec;  // plugin-based matching
diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp
index 14a3a22a..530ab85e 100644
--- a/shibsp/impl/XMLServiceProvider.cpp
+++ b/shibsp/impl/XMLServiceProvider.cpp
@@ -30,7 +30,6 @@
 #include "SessionCache.h"
 #include "SPConfig.h"
 #include "SPRequest.h"
-#include "binding/ProtocolProvider.h"
 #include "impl/XMLApplication.h"
 #include "impl/XMLServiceProvider.h"
 
@@ -53,25 +52,7 @@
 #include <xmltooling/util/Threads.h>
 #include <xmltooling/util/XMLHelper.h>
 
-#ifndef SHIBSP_LITE
-# include "security/SecurityPolicyProvider.h"
-# include <saml/exceptions.h>
-# include <saml/version.h>
-# include <saml/SAMLConfig.h>
-# include <saml/binding/ArtifactMap.h>
-# include <saml/binding/SAMLArtifact.h>
-# include <xmltooling/security/DataSealer.h>
-# include <xmltooling/security/SecurityHelper.h>
-# include <xmltooling/util/ReplayCache.h>
-# include <xmltooling/util/StorageService.h>
-# include <xsec/utils/XSECPlatformUtils.hpp>
-using namespace opensaml::saml2;
-using namespace opensaml::saml2p;
-using namespace opensaml::saml2md;
-using namespace opensaml;
-#else
-# include "lite/SAMLConstants.h"
-#endif
+#include "lite/SAMLConstants.h"
 
 using namespace shibsp;
 using namespace xmltooling;
@@ -212,92 +193,8 @@ void XMLConfigImpl::doListener(const DOMElement* e, XMLConfig* conf, Category& l
 void XMLConfigImpl::doCaching(const DOMElement* e, XMLConfig* conf, Category& log)
 {
     const SPConfig& spConf = SPConfig::getConfig();
-#ifndef SHIBSP_LITE
-    SAMLConfig& samlConf = SAMLConfig::getConfig();
-#endif
-
-    DOMElement* child;
-#ifndef SHIBSP_LITE
-    if (spConf.isEnabled(SPConfig::OutOfProcess)) {
-        XMLToolingConfig& xmlConf = XMLToolingConfig::getConfig();
-        // First build any StorageServices.
-        child = XMLHelper::getFirstChildElement(e, _StorageService);
-        while (child) {
-            string id(XMLHelper::getAttrString(child, nullptr, _id));
-            string t(XMLHelper::getAttrString(child, nullptr, _type));
-            if (!t.empty()) {
-                try {
-                    log.info("building StorageService (%s) of type %s...", id.c_str(), t.c_str());
-                    conf->m_storage[id] =
-                        boost::shared_ptr<StorageService>(xmlConf.StorageServiceManager.newPlugin(t.c_str(), child, m_deprecationSupport));
-                }
-                catch (const std::exception& ex) {
-                    log.crit("failed to instantiate StorageService (%s): %s", id.c_str(), ex.what());
-                }
-            }
-            child = XMLHelper::getNextSiblingElement(child, _StorageService);
-        }
-
-        if (conf->m_storage.empty()) {
-            log.info("no StorageService plugin(s) installed, using (mem) in-memory instance");
-            conf->m_storage["mem"] = boost::shared_ptr<StorageService>(
-                xmlConf.StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, nullptr, m_deprecationSupport)
-                );
-        }
 
-        // Replay cache.
-        StorageService* replaySS = nullptr;
-        child = XMLHelper::getFirstChildElement(e, _ReplayCache);
-        if (child) {
-            string ssid(XMLHelper::getAttrString(child, nullptr, _StorageService));
-            if (!ssid.empty()) {
-                if (conf->m_storage.count(ssid)) {
-                    log.info("building ReplayCache on top of StorageService (%s)...", ssid.c_str());
-                    replaySS = conf->m_storage[ssid].get();
-                }
-                else {
-                    log.error("unable to locate StorageService (%s), using arbitrary instance for ReplayCache", ssid.c_str());
-                    replaySS = conf->m_storage.begin()->second.get();
-                }
-            }
-            else {
-                log.info("no StorageService specified for ReplayCache, using arbitrary instance");
-                replaySS = conf->m_storage.begin()->second.get();
-            }
-        }
-        else {
-            log.info("no ReplayCache specified, using arbitrary StorageService instance");
-            replaySS = conf->m_storage.begin()->second.get();
-        }
-        xmlConf.setReplayCache(new ReplayCache(replaySS));
-
-        // ArtifactMap
-        child = XMLHelper::getFirstChildElement(e, _ArtifactMap);
-        if (child) {
-            string ssid(XMLHelper::getAttrString(child, nullptr, _StorageService));
-            if (!ssid.empty()) {
-                if (conf->m_storage.count(ssid)) {
-                    log.info("building ArtifactMap on top of StorageService (%s)...", ssid.c_str());
-                    samlConf.setArtifactMap(new ArtifactMap(child, conf->m_storage[ssid].get()));
-                }
-                else {
-                    log.error("unable to locate StorageService (%s), using in-memory ArtifactMap", ssid.c_str());
-                    samlConf.setArtifactMap(new ArtifactMap(child));
-                }
-            }
-            else {
-                log.info("no StorageService specified, using in-memory ArtifactMap");
-                samlConf.setArtifactMap(new ArtifactMap(child));
-            }
-        }
-        else {
-            log.info("no ArtifactMap specified, building in-memory ArtifactMap...");
-            samlConf.setArtifactMap(new ArtifactMap(child));
-        }
-    }   // end of out of process caching components
-#endif
-
-    child = XMLHelper::getFirstChildElement(e, _SessionCache);
+    DOMElement* child = XMLHelper::getFirstChildElement(e, _SessionCache);
     if (child) {
         string t(XMLHelper::getAttrString(child, nullptr, _type));
         if (!t.empty()) {
@@ -342,32 +239,10 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
             if (!XMLToolingConfig::getConfig().log_config(logconf.c_str()))
                 log.crit("failed to load new logging configuration from (%s)", logconf.c_str());
         }
-
-#ifndef SHIBSP_LITE
-        outer->m_tranLog.reset(
-            new TransactionLog(
-                XMLHelper::getAttrString(SHAR, nullptr, tranLogFormat).c_str(),
-                XMLHelper::getAttrString(SHAR, nullptr, tranLogFiller).c_str()
-                )
-            );
-#endif
     }
 
     // Re-log library versions now that logging is set up.
     log.info("Shibboleth SP Version %s", PACKAGE_VERSION);
-#ifndef SHIBSP_LITE
-    log.info(
-        "Library versions: %s %s, Xerces-C %s, XML-Security-C %s, XMLTooling-C %s, OpenSAML-C %s, Shibboleth %s",
-# if defined(LOG4SHIB_VERSION)
-    "log4shib", LOG4SHIB_VERSION,
-# elif defined(LOG4CPP_VERSION)
-    "log4cpp", LOG4CPP_VERSION,
-# else
-    "", "",
-# endif
-        XERCES_FULLVERSIONDOT, XSEC_FULLVERSIONDOT, gXMLToolingDotVersionStr, gOpenSAMLDotVersionStr, gShibSPDotVersionStr
-        );
-#else
     log.info(
         "Library versions: %s %s, Xerces-C %s, XMLTooling-C %s, Shibboleth %s",
 # if defined(LOG4SHIB_VERSION)
@@ -379,7 +254,6 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
 # endif
         XERCES_FULLVERSIONDOT, gXMLToolingDotVersionStr, gShibSPDotVersionStr
         );
-#endif
 
     if (XMLString::equals(e->getNamespaceURI(), shibspconstants::SHIB2SPCONFIG_NS)) {
         SPConfig::getConfig().deprecation().warn("legacy V2 configuration");
@@ -415,12 +289,6 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
         pair<bool,const XMLCh*> langPriority = getXMLString("langPriority");
         GenericRequest::setLangDefaults(!langFromClient.first || langFromClient.second, langPriority.second);
 
-#ifndef SHIBSP_LITE
-        langPriority = getXMLString("contactPriority");
-        if (langPriority.first)
-            SAMLConfig::getConfig().setContactPriority(langPriority.second);
-#endif
-
         // Extensions
         doExtensions(e, "global", log);
         if (conf.isEnabled(SPConfig::OutOfProcess))
@@ -433,28 +301,6 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
         if (conf.isEnabled(SPConfig::Listener))
             doListener(e, outer, log);
 
-#ifndef SHIBSP_LITE
-        if (outer->m_listener && conf.isEnabled(SPConfig::OutOfProcess) && !conf.isEnabled(SPConfig::InProcess)) {
-            outer->m_listener->regListener("set::RelayState", outer);
-            outer->m_listener->regListener("get::RelayState", outer);
-            outer->m_listener->regListener("set::PostData", outer);
-            outer->m_listener->regListener("get::PostData", outer);
-        }
-
-        if (child = XMLHelper::getFirstChildElement(e, _DataSealer)) {
-            string t(XMLHelper::getAttrString(child, nullptr, _type));
-            if (!t.empty()) {
-                log.info("building DataSealer of type %s...", t.c_str());
-                auto_ptr<DataSealerKeyStrategy> strategy(
-                    XMLToolingConfig::getConfig().DataSealerKeyStrategyManager.newPlugin(t, child, m_deprecationSupport)
-                    );
-                auto_ptr<DataSealer> sealer(new DataSealer(strategy.get()));
-                strategy.release();
-                XMLToolingConfig::getConfig().setDataSealer(sealer.get());
-                sealer.release();
-            }
-        }
-#endif
         if (conf.isEnabled(SPConfig::Caching))
             doCaching(e, outer, log);
     } // end of first-time-only stuff
@@ -478,95 +324,20 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
         }
     }
 
-#ifndef SHIBSP_LITE
-    // Load security policies.
-    if (child = XMLHelper::getLastChildElement(e, _SecurityPolicyProvider)) {
-        string t(XMLHelper::getAttrString(child, nullptr, _type));
-        if (!t.empty()) {
-            log.info("building SecurityPolicyProvider of type %s...", t.c_str());
-            m_policy.reset(conf.SecurityPolicyProviderManager.newPlugin(t.c_str(), child, m_deprecationSupport));
-        }
-        else {
-            throw ConfigurationException("can't build SecurityPolicyProvider, no type specified");
-        }
-    }
-    else if (child = XMLHelper::getLastChildElement(e, SecurityPolicies)) {
-        // For backward compatibility, wrap in a plugin element.
-        DOMElement* polwrapper = e->getOwnerDocument()->createElementNS(nullptr, _SecurityPolicyProvider);
-        polwrapper->appendChild(child);
-        SPConfig::getConfig().deprecation().warn("inline SecurityPolicy configuration, externalize via <SecurityPolicyProvider>");
-        m_policy.reset(conf.SecurityPolicyProviderManager.newPlugin(XML_SECURITYPOLICY_PROVIDER, polwrapper, m_deprecationSupport));
-    }
-    else {
-        log.fatal("can't build SecurityPolicyProvider, missing conf:SecurityPolicyProvider element?");
-        throw ConfigurationException("Can't build SecurityPolicyProvider, missing conf:SecurityPolicyProvider element?");
-    }
-
-    if (first) {
-        if (!m_policy->getIncludedAlgorithms().empty()) {
-            for (vector<xstring>::const_iterator alg = m_policy->getIncludedAlgorithms().begin();
-                    alg != m_policy->getIncludedAlgorithms().end(); ++alg) {
-                XSECPlatformUtils::whitelistAlgorithm(alg->c_str());
-                auto_ptr_char includelog(alg->c_str());
-                log.info("explicitly including security algorithm (%s)", includelog.get());
-            }
-        }
-        else if (!m_policy->getDefaultExcludedAlgorithms().empty() || !m_policy->getExcludedAlgorithms().empty()) {
-            for (vector<xstring>::const_iterator alg = m_policy->getDefaultExcludedAlgorithms().begin();
-                    alg != m_policy->getDefaultExcludedAlgorithms().end(); ++alg) {
-                XSECPlatformUtils::blacklistAlgorithm(alg->c_str());
-                auto_ptr_char excludelog(alg->c_str());
-                log.info("automatically excluding security algorithm (%s)", excludelog.get());
-            }
-            for (vector<xstring>::const_iterator alg = m_policy->getExcludedAlgorithms().begin();
-                    alg != m_policy->getExcludedAlgorithms().end(); ++alg) {
-                XSECPlatformUtils::blacklistAlgorithm(alg->c_str());
-                auto_ptr_char excludelog(alg->c_str());
-                log.info("explicitly excluding security algorithm (%s)", excludelog.get());
-            }
-        }
-    }
-
-    // Process TransportOption elements.
-    child = XMLHelper::getLastChildElement(e, TransportOption);
-    while (child) {
-        if (child->hasChildNodes()) {
-            string provider(XMLHelper::getAttrString(child, nullptr, _provider));
-            string option(XMLHelper::getAttrString(child, nullptr, _option));
-            auto_ptr_char value(child->getFirstChild()->getNodeValue());
-            if (!provider.empty() && !option.empty() && value.get() && *value.get()) {
-                m_transportOptions.push_back(boost::make_tuple(provider, option, string(value.get())));
-            }
-        }
-        child = XMLHelper::getPreviousSiblingElement(child, TransportOption);
-    }
-#endif
-
-    if (conf.isEnabled(SPConfig::Handlers)) {
-        if (child = XMLHelper::getLastChildElement(e, _ProtocolProvider)) {
-            string t(XMLHelper::getAttrString(child, nullptr, _type));
-            if (!t.empty()) {
-                log.info("building ProtocolProvider of type %s...", t.c_str());
-                m_protocolProvider.reset(conf.ProtocolProviderManager.newPlugin(t.c_str(), child, m_deprecationSupport));
-            }
-        }
-    }
-    Locker pplocker(m_protocolProvider.get());
-
     // Load the default application.
     child = XMLHelper::getLastChildElement(e, ApplicationDefaults);
     if (!child) {
         log.fatal("can't build default Application object, missing conf:ApplicationDefaults element?");
         throw ConfigurationException("can't build default Application object, missing conf:ApplicationDefaults element?");
     }
-    boost::shared_ptr<XMLApplication> defapp(new XMLApplication(outer, m_protocolProvider.get(), child, m_deprecationSupport));
+    boost::shared_ptr<XMLApplication> defapp(new XMLApplication(outer, child, m_deprecationSupport));
     m_appmap[defapp->getId()] = defapp;
     m_defaultApplication = defapp.get();
 
     // Load any overrides.
     DOMElement* override = XMLHelper::getFirstChildElement(child, ApplicationOverride);
     while (override) {
-        boost::shared_ptr<XMLApplication> iapp(new XMLApplication(outer, m_protocolProvider.get(), override, m_deprecationSupport, m_defaultApplication));
+        boost::shared_ptr<XMLApplication> iapp(new XMLApplication(outer, override, m_deprecationSupport, m_defaultApplication));
         if (m_appmap.count(iapp->getId()))
             log.crit("found conf:ApplicationOverride element with duplicate id attribute (%s), skipping it", iapp->getId());
         else
@@ -608,8 +379,6 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
 
 boost::shared_ptr<Application> XMLConfigImpl::findExternalOverride(const char* id, const XMLConfig* config)
 {
-    Locker pplocker(m_protocolProvider.get());
-
     for (vector<string>::const_iterator i = m_externalAppPaths.begin(); i != m_externalAppPaths.end(); ++i) {
         string path(*i);
         if (!ends_with(path, "/"))
@@ -628,7 +397,7 @@ boost::shared_ptr<Application> XMLConfigImpl::findExternalOverride(const char* i
                     throw ConfigurationException("External override's id ($1) did not match the expected value", params(1, id2.c_str()));
 
                 boost::shared_ptr<XMLApplication> iapp(
-                    new XMLApplication(config, m_protocolProvider.get(), doc->getDocumentElement(), m_deprecationSupport, m_defaultApplication, doc)
+                    new XMLApplication(config, doc->getDocumentElement(), m_deprecationSupport, m_defaultApplication, doc)
                     );
                 return iapp;
             }
@@ -666,30 +435,6 @@ const Application* XMLConfig::getApplication(const char* applicationId) const
 
 #ifndef SHIBSP_LITE
 
-StorageService* XMLConfig::getStorageService(const char* id) const
-{
-    if (id) {
-        map< string, boost::shared_ptr<StorageService> >::const_iterator i = m_storage.find(id);
-        if (i != m_storage.end())
-            return i->second.get();
-    }
-    else if (!m_storage.empty())
-        return m_storage.begin()->second.get();
-    return nullptr;
-}
-
-bool XMLConfig::setTransportOptions(SOAPTransport& transport) const {
-    bool ret = true;
-    for (vector< boost::tuple<string, string, string> >::const_iterator opt = m_impl->m_transportOptions.begin();
-        opt != m_impl->m_transportOptions.end(); ++opt) {
-        if (!transport.setProviderOption(opt->get<0>().c_str(), opt->get<1>().c_str(), opt->get<2>().c_str())) {
-            m_log.error("failed to set SOAPTransport option (%s)", opt->get<1>().c_str());
-            ret = false;
-        }
-    }
-    return ret;
-}
-
 void XMLConfig::receive(DDF& in, ostream& out)
 {
     if (!strcmp(in.name(), "get::RelayState")) {
@@ -921,10 +666,6 @@ XMLConfig::XMLConfig(const DOMElement* e, bool deprecationSupport)
 XMLConfig::~XMLConfig()
 {
     shutdown();
-#ifndef SHIBSP_LITE
-    SAMLConfig::getConfig().setArtifactMap(nullptr);
-    XMLToolingConfig::getConfig().setReplayCache(nullptr);
-#endif
 }
 
 pair<bool,DOMElement*> XMLConfig::background_load()
@@ -948,22 +689,3 @@ pair<bool,DOMElement*> XMLConfig::background_load()
 
     return make_pair(false,(DOMElement*)nullptr);
 }
-
-#ifndef SHIBSP_LITE
-
-Lockable* XMLConfig::lock()
-{
-    ReloadableXMLFile::lock();
-    if (m_impl->m_policy)
-        m_impl->m_policy->lock();
-    return this;
-}
-
-void XMLConfig::unlock()
-{
-    if (m_impl->m_policy)
-        m_impl->m_policy->unlock();
-    ReloadableXMLFile::unlock();
-}
-
-#endif
diff --git a/shibsp/impl/XMLServiceProvider.h b/shibsp/impl/XMLServiceProvider.h
index 0886b28d..d1dbe840 100644
--- a/shibsp/impl/XMLServiceProvider.h
+++ b/shibsp/impl/XMLServiceProvider.h
@@ -40,10 +40,6 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 
-#ifndef SHIBSP_LITE
-# include <boost/tuple/tuple.hpp>
-#endif
-
 namespace xmltooling {
     class Mutex;
     class RWLock;
@@ -67,13 +63,8 @@ namespace shibsp {
                 m_document->release();
         }
 
-#ifndef SHIBSP_LITE
-        boost::scoped_ptr<SecurityPolicyProvider> m_policy;
-        std::vector< boost::tuple<std::string, std::string, std::string> > m_transportOptions;
-#endif
         std::map<std::string,Remoted*> m_listenerMap;
         boost::scoped_ptr<RequestMapper> m_requestMapper;
-        boost::scoped_ptr<ProtocolProvider> m_protocolProvider;
         boost::scoped_ptr<xmltooling::Mutex> m_appMapLock;
         std::map< std::string, boost::shared_ptr<Application> > m_appmap;
         std::vector<std::string> m_externalAppPaths;
@@ -98,9 +89,6 @@ namespace shibsp {
     };
 
     class SHIBSP_DLLLOCAL XMLConfig : public ServiceProvider, public xmltooling::ReloadableXMLFile
-#ifndef SHIBSP_LITE
-        , public Remoted
-#endif
     {
     public:
         XMLConfig(const xercesc::DOMElement* e, bool deprecationSupport=true);
@@ -114,12 +102,6 @@ namespace shibsp {
             return m_impl ? m_impl->getElement()->getNamespaceURI() : nullptr;
         }
 
-#ifndef SHIBSP_LITE
-        // Lockable
-        xmltooling::Lockable* lock();
-        void unlock();
-#endif
-
         // PropertySet
         const PropertySet* getParent() const { return m_impl->getParent(); }
         void setParent(const PropertySet* parent) { return m_impl->setParent(parent); }
@@ -132,19 +114,6 @@ namespace shibsp {
         const xercesc::DOMElement* getElement() const { return m_impl->getElement(); }
 
         // ServiceProvider
-#ifndef SHIBSP_LITE
-        // Remoted
-        void receive(DDF& in, std::ostream& out);
-
-        TransactionLog* getTransactionLog() const {
-            if (m_tranLog)
-                return m_tranLog.get();
-            throw ConfigurationException("No TransactionLog available.");
-        }
-
-        xmltooling::StorageService* getStorageService(const char* id) const;
-#endif
-
         ListenerService* getListenerService(bool required = true) const {
             if (required && !m_listener)
                 throw ConfigurationException("No ListenerService available.");
@@ -165,16 +134,6 @@ namespace shibsp {
 
         const Application* getApplication(const char* applicationId) const;
 
-#ifndef SHIBSP_LITE
-        SecurityPolicyProvider* getSecurityPolicyProvider(bool required=true) const {
-            if (required && !m_impl->m_policy)
-                throw ConfigurationException("No SecurityPolicyProvider available.");
-            return m_impl->m_policy.get();
-        }
-
-        bool setTransportOptions(xmltooling::SOAPTransport& transport) const;
-#endif
-
         void regListener(const char* address, Remoted* svc);
         bool unregListener(const char* address, Remoted* current);
         Remoted* lookupListener(const char* address) const;
@@ -190,11 +149,7 @@ namespace shibsp {
 
         // The order of these members actually matters. If we want to rely on auto-destruction, then
         // anything dependent on anything else has to come later in the object so it will pop first.
-        // Storage is the lowest, then remoting, then the cache, and finally the rest.
-#ifndef SHIBSP_LITE
-        std::map< std::string, boost::shared_ptr<xmltooling::StorageService> > m_storage;
-        boost::scoped_ptr<TransactionLog> m_tranLog;
-#endif
+        // Remoring is the lowest, then the cache, and finally the rest.
         boost::scoped_ptr<ListenerService> m_listener;
         boost::scoped_ptr<SessionCache> m_sessionCache;
         boost::scoped_ptr<XMLConfigImpl> m_impl;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list