[cpp-sp] branch master updated: SSPCPP-778 - Fork configuration and address backward compatibility
Scott Cantor
cantor.2 at osu.edu
Thu Jun 7 19:56:45 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=023fb62b314eec78553017716f2832b4d477ba3c
The following commit(s) were added to refs/heads/master by this push:
new 023fb62 SSPCPP-778 - Fork configuration and address backward compatibility
023fb62 is described below
commit 023fb62b314eec78553017716f2832b4d477ba3c
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 7 19:56:35 2018 -0400
SSPCPP-778 - Fork configuration and address backward compatibility
https://issues.shibboleth.net/jira/browse/SSPCPP-778
Extend plugin APIs to allow deprecated settings to be disabled.
---
adfs/adfs.cpp | 19 ++++---
apache/mod_shib.cpp | 17 +++---
memcache-store/memcache-store.cpp | 2 +-
nsapi_shib/nsapi_shib.cpp | 8 +--
odbc-store/odbc-store.cpp | 2 +-
plugins/AttributeResolverHandler.cpp | 2 +-
plugins/CaseFoldingAttributeResolver.cpp | 4 +-
plugins/GSSAPIAttributeExtractor.cpp | 2 +-
plugins/TemplateAttributeResolver.cpp | 2 +-
plugins/TimeAccessControl.cpp | 2 +-
plugins/TransformAttributeResolver.cpp | 2 +-
shibsp/SPConfig.cpp | 4 +-
shibsp/attribute/Base64AttributeDecoder.cpp | 2 +-
shibsp/attribute/DOMAttributeDecoder.cpp | 2 +-
shibsp/attribute/KeyInfoAttributeDecoder.cpp | 10 ++--
shibsp/attribute/NameIDAttributeDecoder.cpp | 2 +-
.../attribute/NameIDFromScopedAttributeDecoder.cpp | 2 +-
shibsp/attribute/ScopedAttributeDecoder.cpp | 2 +-
shibsp/attribute/StringAttributeDecoder.cpp | 2 +-
shibsp/attribute/XMLAttributeDecoder.cpp | 2 +-
.../attribute/filtering/impl/AndMatchFunctor.cpp | 16 +++---
.../attribute/filtering/impl/AnyMatchFunctor.cpp | 2 +-
.../impl/AttributeIssuerEntityAttributeFunctor.cpp | 16 ++++--
.../impl/AttributeIssuerEntityMatcherFunctor.cpp | 8 +--
.../impl/AttributeIssuerInEntityGroupFunctor.cpp | 2 +-
.../filtering/impl/AttributeIssuerRegexFunctor.cpp | 2 +-
.../impl/AttributeIssuerStringFunctor.cpp | 2 +-
.../impl/AttributeMatchesShibMDScopeFunctor.cpp | 4 +-
.../AttributeRequesterEntityAttributeFunctor.cpp | 16 ++++--
.../AttributeRequesterEntityMatcherFunctor.cpp | 8 +--
.../AttributeRequesterInEntityGroupFunctor.cpp | 2 +-
.../impl/AttributeRequesterRegexFunctor.cpp | 2 +-
.../impl/AttributeRequesterStringFunctor.cpp | 2 +-
.../filtering/impl/AttributeScopeRegexFunctor.cpp | 2 +-
.../filtering/impl/AttributeScopeStringFunctor.cpp | 2 +-
.../filtering/impl/AttributeValueRegexFunctor.cpp | 2 +-
.../filtering/impl/AttributeValueStringFunctor.cpp | 2 +-
.../impl/AuthenticationMethodRegexFunctor.cpp | 2 +-
.../impl/AuthenticationMethodStringFunctor.cpp | 2 +-
.../filtering/impl/ChainingAttributeFilter.cpp | 10 ++--
.../filtering/impl/DummyAttributeFilter.cpp | 2 +-
.../impl/NameIDQualifierStringFunctor.cpp | 2 +-
.../attribute/filtering/impl/NotMatchFunctor.cpp | 16 +++---
.../impl/NumberOfAttributeValuesFunctor.cpp | 2 +-
shibsp/attribute/filtering/impl/OrMatchFunctor.cpp | 16 +++---
.../impl/RegistrationAuthorityFunctor.cpp | 4 +-
.../filtering/impl/XMLAttributeFilter.cpp | 42 +++++++-------
.../resolver/impl/AssertionAttributeExtractor.cpp | 2 +-
.../resolver/impl/ChainingAttributeExtractor.cpp | 11 ++--
.../resolver/impl/ChainingAttributeResolver.cpp | 10 ++--
.../resolver/impl/DelegationAttributeExtractor.cpp | 2 +-
.../impl/KeyDescriptorAttributeExtractor.cpp | 2 +-
.../resolver/impl/MetadataAttributeExtractor.cpp | 12 ++--
.../resolver/impl/QueryAttributeResolver.cpp | 2 +-
.../impl/SimpleAggregationAttributeResolver.cpp | 16 +++---
.../resolver/impl/XMLAttributeExtractor.cpp | 33 ++++++-----
shibsp/binding/impl/XMLProtocolProvider.cpp | 8 +--
shibsp/handler/AssertionConsumerService.h | 4 +-
shibsp/handler/impl/AdminLogoutInitiator.cpp | 2 +-
shibsp/handler/impl/AssertionConsumerService.cpp | 8 +--
shibsp/handler/impl/AssertionLookup.cpp | 2 +-
shibsp/handler/impl/AttributeCheckerHandler.cpp | 10 ++--
shibsp/handler/impl/ChainingLogoutInitiator.cpp | 10 ++--
shibsp/handler/impl/ChainingSessionInitiator.cpp | 10 ++--
shibsp/handler/impl/CookieSessionInitiator.cpp | 2 +-
shibsp/handler/impl/DiscoveryFeed.cpp | 2 +-
shibsp/handler/impl/ExternalAuthHandler.cpp | 6 +-
shibsp/handler/impl/FormSessionInitiator.cpp | 2 +-
shibsp/handler/impl/LocalLogoutInitiator.cpp | 2 +-
shibsp/handler/impl/LogoutHandler.cpp | 2 +-
shibsp/handler/impl/MetadataGenerator.cpp | 2 +-
shibsp/handler/impl/SAML1Consumer.cpp | 10 ++--
shibsp/handler/impl/SAML2ArtifactResolution.cpp | 12 ++--
shibsp/handler/impl/SAML2Consumer.cpp | 10 ++--
shibsp/handler/impl/SAML2Logout.cpp | 14 ++---
shibsp/handler/impl/SAML2LogoutInitiator.cpp | 14 +++--
shibsp/handler/impl/SAML2NameIDMgmt.cpp | 14 ++---
shibsp/handler/impl/SAML2SessionInitiator.cpp | 16 +++---
shibsp/handler/impl/SAMLDSSessionInitiator.cpp | 2 +-
shibsp/handler/impl/SessionHandler.cpp | 2 +-
shibsp/handler/impl/SessionInitiator.cpp | 2 +-
shibsp/handler/impl/Shib1SessionInitiator.cpp | 2 +-
shibsp/handler/impl/StatusHandler.cpp | 2 +-
shibsp/handler/impl/TransformSessionInitiator.cpp | 2 +-
shibsp/handler/impl/WAYFSessionInitiator.cpp | 2 +-
shibsp/impl/ChainingAccessControl.cpp | 12 ++--
shibsp/impl/StorageServiceSessionCache.cpp | 4 +-
shibsp/impl/TransactionLog.cpp | 6 +-
shibsp/impl/XMLAccessControl.cpp | 8 +--
shibsp/impl/XMLApplication.cpp | 64 ++++++++++++++--------
shibsp/impl/XMLApplication.h | 2 +
shibsp/impl/XMLRequestMapper.cpp | 30 +++++-----
shibsp/impl/XMLSecurityPolicyProvider.cpp | 18 +++---
shibsp/impl/XMLServiceProvider.cpp | 48 +++++++++-------
shibsp/impl/XMLServiceProvider.h | 3 +-
shibsp/metadata/DynamicMetadataProvider.cpp | 16 +++---
shibsp/remoting/impl/TCPListener.cpp | 2 +-
shibsp/remoting/impl/UnixListener.cpp | 2 +-
shibsp/security/PKIXTrustEngine.cpp | 2 +-
shibsp/util/DOMPropertySet.cpp | 2 +-
unittests/DynamicMetadataProviderTest.h | 6 +-
101 files changed, 413 insertions(+), 356 deletions(-)
diff --git a/adfs/adfs.cpp b/adfs/adfs.cpp
index 0158b03..1933867 100644
--- a/adfs/adfs.cpp
+++ b/adfs/adfs.cpp
@@ -108,7 +108,7 @@ namespace {
}
};
- MessageDecoder* ADFSDecoderFactory(const DOMElement* const &)
+ MessageDecoder* ADFSDecoderFactory(const DOMElement* const &, bool)
{
return new ADFSDecoder();
}
@@ -177,8 +177,9 @@ namespace {
{
auto_ptr_XMLCh m_protocol;
public:
- ADFSConsumer(const DOMElement* e, const char* appId)
- : shibsp::AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT ".SSO.ADFS")), m_protocol(WSFED_NS) {}
+ ADFSConsumer(const DOMElement* e, const char* appId, bool deprecationSupport)
+ : shibsp::AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT ".SSO.ADFS"), nullptr, nullptr, deprecationSupport),
+ m_protocol(WSFED_NS) {}
virtual ~ADFSConsumer() {}
#ifndef SHIBSP_LITE
@@ -246,8 +247,8 @@ namespace {
class SHIBSP_DLLLOCAL ADFSLogout : public AbstractHandler, public LogoutHandler
{
public:
- ADFSLogout(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".Logout.ADFS")), m_login(e, appId) {
+ ADFSLogout(const DOMElement* e, const char* appId, bool deprecationSupport)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".Logout.ADFS")), m_login(e, appId, deprecationSupport) {
m_initiator = false;
#ifndef SHIBSP_LITE
m_preserve.push_back("wreply");
@@ -290,17 +291,17 @@ namespace {
#pragma warning( pop )
#endif
- SessionInitiator* ADFSSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* ADFSSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new ADFSSessionInitiator(p.first, p.second);
}
- Handler* ADFSLogoutFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* ADFSLogoutFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new ADFSLogout(p.first, p.second);
+ return new ADFSLogout(p.first, p.second, deprecationSupport);
}
- Handler* ADFSLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* ADFSLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new ADFSLogoutInitiator(p.first, p.second);
}
diff --git a/apache/mod_shib.cpp b/apache/mod_shib.cpp
index 39bff53..8719102 100644
--- a/apache/mod_shib.cpp
+++ b/apache/mod_shib.cpp
@@ -1019,7 +1019,7 @@ private:
bool checkAttribute(const SPRequest& request, const Attribute* attr, const char* toMatch, RegularExpression* re) const;
};
-AccessControl* htAccessFactory(const xercesc::DOMElement* const & e)
+AccessControl* htAccessFactory(const xercesc::DOMElement* const & e, bool)
{
return new htAccessControl();
}
@@ -1037,7 +1037,7 @@ AccessControl::aclresult_t htAccessControl::doAccessControl(const ShibTargetApac
string t(XMLHelper::getAttrString(acldoc ? acldoc->getDocumentElement() : nullptr, nullptr, _type));
if (t.empty())
throw ConfigurationException("Missing type attribute in AccessControl plugin configuration.");
- scoped_ptr<AccessControl> aclplugin(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), acldoc->getDocumentElement()));
+ scoped_ptr<AccessControl> aclplugin(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), acldoc->getDocumentElement(), true));
Locker acllock(aclplugin.get());
result = aclplugin->authorized(sta, session);
}
@@ -1444,7 +1444,7 @@ AccessControl::aclresult_t htAccessControl::authorized(const SPRequest& request,
class ApacheRequestMapper : public virtual RequestMapper, public virtual PropertySet
{
public:
- ApacheRequestMapper(const xercesc::DOMElement* e);
+ ApacheRequestMapper(const xercesc::DOMElement* e, bool deprecationSupport=true);
~ApacheRequestMapper() {}
Lockable* lock() { return m_mapper->lock(); }
void unlock() { m_staKey->setData(nullptr); m_propsKey->setData(nullptr); m_mapper->unlock(); }
@@ -1468,14 +1468,15 @@ private:
mutable htAccessControl m_htaccess;
};
-RequestMapper* ApacheRequestMapFactory(const xercesc::DOMElement* const & e)
+RequestMapper* ApacheRequestMapFactory(const xercesc::DOMElement* const & e, bool deprecationSupport)
{
- return new ApacheRequestMapper(e);
+ return new ApacheRequestMapper(e, deprecationSupport);
}
-ApacheRequestMapper::ApacheRequestMapper(const xercesc::DOMElement* e)
- : m_mapper(SPConfig::getConfig().RequestMapperManager.newPlugin(XML_REQUEST_MAPPER,e)),
- m_staKey(ThreadKey::create(nullptr)), m_propsKey(ThreadKey::create(nullptr))
+ApacheRequestMapper::ApacheRequestMapper(const xercesc::DOMElement* e, bool deprecationSupport)
+ : m_mapper(SPConfig::getConfig().RequestMapperManager.newPlugin(XML_REQUEST_MAPPER,e, deprecationSupport)),
+ m_staKey(ThreadKey::create(nullptr)),
+ m_propsKey(ThreadKey::create(nullptr))
{
}
diff --git a/memcache-store/memcache-store.cpp b/memcache-store/memcache-store.cpp
index 4dc6f2f..08db24d 100644
--- a/memcache-store/memcache-store.cpp
+++ b/memcache-store/memcache-store.cpp
@@ -145,7 +145,7 @@ namespace {
bool m_buildMap;
};
- StorageService* MemcacheStorageServiceFactory(const DOMElement* const & e) {
+ StorageService* MemcacheStorageServiceFactory(const DOMElement* const & e, bool) {
return new MemcacheStorageService(e);
}
};
diff --git a/nsapi_shib/nsapi_shib.cpp b/nsapi_shib/nsapi_shib.cpp
index d512c77..84cc3d1 100644
--- a/nsapi_shib/nsapi_shib.cpp
+++ b/nsapi_shib/nsapi_shib.cpp
@@ -573,7 +573,7 @@ extern "C" NSAPI_PUBLIC int shib_handler(pblock* pb, ::Session* sn, Request* rq)
class SunRequestMapper : public virtual RequestMapper, public virtual PropertySet
{
public:
- SunRequestMapper(const xercesc::DOMElement* e);
+ SunRequestMapper(const xercesc::DOMElement* e, bool deprecationSupport=true);
~SunRequestMapper() {}
Lockable* lock() { return m_mapper->lock(); }
void unlock() { m_stKey->setData(nullptr); m_propsKey->setData(nullptr); m_mapper->unlock(); }
@@ -594,13 +594,13 @@ private:
scoped_ptr<ThreadKey> m_stKey, m_propsKey;
};
-RequestMapper* SunRequestMapFactory(const xercesc::DOMElement* const & e)
+RequestMapper* SunRequestMapFactory(const xercesc::DOMElement* const & e, bool deprecationSupport)
{
return new SunRequestMapper(e);
}
-SunRequestMapper::SunRequestMapper(const xercesc::DOMElement* e)
- : m_mapper(SPConfig::getConfig().RequestMapperManager.newPlugin(XML_REQUEST_MAPPER,e)),
+SunRequestMapper::SunRequestMapper(const xercesc::DOMElement* e, bool deprecationSupport)
+ : m_mapper(SPConfig::getConfig().RequestMapperManager.newPlugin(XML_REQUEST_MAPPER,e, deprecationSupport)),
m_stKey(ThreadKey::create(nullptr)),
m_propsKey(ThreadKey::create(nullptr))
{
diff --git a/odbc-store/odbc-store.cpp b/odbc-store/odbc-store.cpp
index 7f5fa2f..7ace54c 100644
--- a/odbc-store/odbc-store.cpp
+++ b/odbc-store/odbc-store.cpp
@@ -211,7 +211,7 @@ namespace {
vector<SQLINTEGER> m_retries;
};
- StorageService* ODBCStorageServiceFactory(const DOMElement* const & e)
+ StorageService* ODBCStorageServiceFactory(const DOMElement* const & e, bool)
{
return new ODBCStorageService(e);
}
diff --git a/plugins/AttributeResolverHandler.cpp b/plugins/AttributeResolverHandler.cpp
index c0af41a..6c7d1af 100644
--- a/plugins/AttributeResolverHandler.cpp
+++ b/plugins/AttributeResolverHandler.cpp
@@ -109,7 +109,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL AttributeResolverHandlerFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL AttributeResolverHandlerFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new AttributeResolverHandler(p.first, p.second);
}
diff --git a/plugins/CaseFoldingAttributeResolver.cpp b/plugins/CaseFoldingAttributeResolver.cpp
index a3ac716..4a882fe 100644
--- a/plugins/CaseFoldingAttributeResolver.cpp
+++ b/plugins/CaseFoldingAttributeResolver.cpp
@@ -122,12 +122,12 @@ namespace shibsp {
static const XMLCh dest[] = UNICODE_LITERAL_4(d,e,s,t);
static const XMLCh source[] = UNICODE_LITERAL_6(s,o,u,r,c,e);
- AttributeResolver* SHIBSP_DLLLOCAL UpperCaseAttributeResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL UpperCaseAttributeResolverFactory(const DOMElement* const & e, bool)
{
return new CaseFoldingAttributeResolver(e, CaseFoldingAttributeResolver::_up);
}
- AttributeResolver* SHIBSP_DLLLOCAL LowerCaseAttributeResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL LowerCaseAttributeResolverFactory(const DOMElement* const & e, bool)
{
return new CaseFoldingAttributeResolver(e, CaseFoldingAttributeResolver::_down);
}
diff --git a/plugins/GSSAPIAttributeExtractor.cpp b/plugins/GSSAPIAttributeExtractor.cpp
index 39e1f95..c6adda3 100644
--- a/plugins/GSSAPIAttributeExtractor.cpp
+++ b/plugins/GSSAPIAttributeExtractor.cpp
@@ -142,7 +142,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeExtractor* GSSAPIExtractorFactory(const DOMElement* const & e)
+ AttributeExtractor* GSSAPIExtractorFactory(const DOMElement* const & e, bool)
{
return new GSSAPIExtractor(e);
}
diff --git a/plugins/TemplateAttributeResolver.cpp b/plugins/TemplateAttributeResolver.cpp
index b755641..4472378 100644
--- a/plugins/TemplateAttributeResolver.cpp
+++ b/plugins/TemplateAttributeResolver.cpp
@@ -119,7 +119,7 @@ namespace shibsp {
static const XMLCh _sources[] = UNICODE_LITERAL_7(s,o,u,r,c,e,s);
static const XMLCh Template[] = UNICODE_LITERAL_8(T,e,m,p,l,a,t,e);
- AttributeResolver* SHIBSP_DLLLOCAL TemplateAttributeResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL TemplateAttributeResolverFactory(const DOMElement* const & e, bool)
{
return new TemplateAttributeResolver(e);
}
diff --git a/plugins/TimeAccessControl.cpp b/plugins/TimeAccessControl.cpp
index 4b1f9aa..d2843bf 100644
--- a/plugins/TimeAccessControl.cpp
+++ b/plugins/TimeAccessControl.cpp
@@ -83,7 +83,7 @@ namespace shibsp {
ptr_vector<Rule> m_rules;
};
- AccessControl* SHIBSP_DLLLOCAL TimeAccessControlFactory(const DOMElement* const & e)
+ AccessControl* SHIBSP_DLLLOCAL TimeAccessControlFactory(const DOMElement* const & e, bool)
{
return new TimeAccessControl(e);
}
diff --git a/plugins/TransformAttributeResolver.cpp b/plugins/TransformAttributeResolver.cpp
index 47f5087..0685903 100644
--- a/plugins/TransformAttributeResolver.cpp
+++ b/plugins/TransformAttributeResolver.cpp
@@ -128,7 +128,7 @@ namespace shibsp {
static const XMLCh source[] = UNICODE_LITERAL_6(s,o,u,r,c,e);
static const XMLCh Regex[] = UNICODE_LITERAL_5(R,e,g,e,x);
- AttributeResolver* SHIBSP_DLLLOCAL TransformAttributeResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL TransformAttributeResolverFactory(const DOMElement* const & e, bool)
{
return new TransformAttributeResolver(e);
}
diff --git a/shibsp/SPConfig.cpp b/shibsp/SPConfig.cpp
index ba1c952..8f85e5b 100644
--- a/shibsp/SPConfig.cpp
+++ b/shibsp/SPConfig.cpp
@@ -425,7 +425,7 @@ bool SPConfig::instantiate(const char* config, bool rethrow)
<< "' validate='1'/>";
dummydoc = XMLToolingConfig::getConfig().getParser().parse(snippet);
XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);
- setServiceProvider(ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER, dummydoc->getDocumentElement()));
+ setServiceProvider(ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER, dummydoc->getDocumentElement(), true));
if (m_configDoc)
m_configDoc->release();
m_configDoc = docjanitor.release();
@@ -437,7 +437,7 @@ bool SPConfig::instantiate(const char* config, bool rethrow)
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
auto_ptr_char type(dummydoc->getDocumentElement()->getAttributeNS(nullptr,_type));
if (type.get() && *type.get())
- setServiceProvider(ServiceProviderManager.newPlugin(type.get(), dummydoc->getDocumentElement()));
+ setServiceProvider(ServiceProviderManager.newPlugin(type.get(), dummydoc->getDocumentElement(), true));
else
throw ConfigurationException("The supplied XML bootstrapping configuration did not include a type attribute.");
if (m_configDoc)
diff --git a/shibsp/attribute/Base64AttributeDecoder.cpp b/shibsp/attribute/Base64AttributeDecoder.cpp
index 8966200..401f17e 100644
--- a/shibsp/attribute/Base64AttributeDecoder.cpp
+++ b/shibsp/attribute/Base64AttributeDecoder.cpp
@@ -52,7 +52,7 @@ namespace shibsp {
) const;
};
- AttributeDecoder* SHIBSP_DLLLOCAL Base64AttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL Base64AttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new Base64AttributeDecoder(e);
}
diff --git a/shibsp/attribute/DOMAttributeDecoder.cpp b/shibsp/attribute/DOMAttributeDecoder.cpp
index 79c8d9f..ce6056b 100644
--- a/shibsp/attribute/DOMAttributeDecoder.cpp
+++ b/shibsp/attribute/DOMAttributeDecoder.cpp
@@ -54,7 +54,7 @@ namespace shibsp {
map<pair<xstring,xstring>,string> m_tagMap;
};
- AttributeDecoder* SHIBSP_DLLLOCAL DOMAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL DOMAttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new DOMAttributeDecoder(e);
}
diff --git a/shibsp/attribute/KeyInfoAttributeDecoder.cpp b/shibsp/attribute/KeyInfoAttributeDecoder.cpp
index 600bee2..45281c8 100644
--- a/shibsp/attribute/KeyInfoAttributeDecoder.cpp
+++ b/shibsp/attribute/KeyInfoAttributeDecoder.cpp
@@ -47,7 +47,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL KeyInfoAttributeDecoder : virtual public AttributeDecoder
{
public:
- KeyInfoAttributeDecoder(const DOMElement* e);
+ KeyInfoAttributeDecoder(const DOMElement* e, bool deprecationSupport=true);
~KeyInfoAttributeDecoder() {}
Attribute* decode(
@@ -74,9 +74,9 @@ namespace shibsp {
scoped_ptr<KeyInfoResolver> m_keyInfoResolver;
};
- AttributeDecoder* SHIBSP_DLLLOCAL KeyInfoAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL KeyInfoAttributeDecoderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new KeyInfoAttributeDecoder(e);
+ return new KeyInfoAttributeDecoder(e, deprecationSupport);
}
static const XMLCh _KeyInfoResolver[] = UNICODE_LITERAL_15(K,e,y,I,n,f,o,R,e,s,o,l,v,e,r);
@@ -85,7 +85,7 @@ namespace shibsp {
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
};
-KeyInfoAttributeDecoder::KeyInfoAttributeDecoder(const DOMElement* e)
+KeyInfoAttributeDecoder::KeyInfoAttributeDecoder(const DOMElement* e, bool deprecationSupport)
: AttributeDecoder(e),
m_hash(XMLHelper::getAttrBool(e, false, _hash)),
m_keyInfoHashAlg(XMLHelper::getAttrString(e, "SHA1", keyInfoHashAlg)) {
@@ -94,7 +94,7 @@ KeyInfoAttributeDecoder::KeyInfoAttributeDecoder(const DOMElement* e)
string t(XMLHelper::getAttrString(e, nullptr, _type));
if (t.empty())
throw UnknownExtensionException("<KeyInfoResolver> element found with no type attribute");
- m_keyInfoResolver.reset(XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e));
+ m_keyInfoResolver.reset(XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e, deprecationSupport));
}
}
diff --git a/shibsp/attribute/NameIDAttributeDecoder.cpp b/shibsp/attribute/NameIDAttributeDecoder.cpp
index 8128011..a6fa742 100644
--- a/shibsp/attribute/NameIDAttributeDecoder.cpp
+++ b/shibsp/attribute/NameIDAttributeDecoder.cpp
@@ -66,7 +66,7 @@ namespace shibsp {
bool m_defaultQualifiers;
};
- AttributeDecoder* SHIBSP_DLLLOCAL NameIDAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL NameIDAttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new NameIDAttributeDecoder(e);
}
diff --git a/shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp b/shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp
index 90adc48..c5d5d36 100644
--- a/shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp
+++ b/shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp
@@ -70,7 +70,7 @@ namespace shibsp {
bool m_defaultQualifiers;
};
- AttributeDecoder* SHIBSP_DLLLOCAL NameIDFromScopedAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL NameIDFromScopedAttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new NameIDFromScopedAttributeDecoder(e);
}
diff --git a/shibsp/attribute/ScopedAttributeDecoder.cpp b/shibsp/attribute/ScopedAttributeDecoder.cpp
index 37cb701..2bc3cf9 100644
--- a/shibsp/attribute/ScopedAttributeDecoder.cpp
+++ b/shibsp/attribute/ScopedAttributeDecoder.cpp
@@ -60,7 +60,7 @@ namespace shibsp {
char m_delimiter;
};
- AttributeDecoder* SHIBSP_DLLLOCAL ScopedAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL ScopedAttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new ScopedAttributeDecoder(e);
}
diff --git a/shibsp/attribute/StringAttributeDecoder.cpp b/shibsp/attribute/StringAttributeDecoder.cpp
index 87add82..4f5858a 100644
--- a/shibsp/attribute/StringAttributeDecoder.cpp
+++ b/shibsp/attribute/StringAttributeDecoder.cpp
@@ -49,7 +49,7 @@ namespace shibsp {
) const;
};
- AttributeDecoder* SHIBSP_DLLLOCAL StringAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL StringAttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new StringAttributeDecoder(e);
}
diff --git a/shibsp/attribute/XMLAttributeDecoder.cpp b/shibsp/attribute/XMLAttributeDecoder.cpp
index 727a926..a5592e3 100644
--- a/shibsp/attribute/XMLAttributeDecoder.cpp
+++ b/shibsp/attribute/XMLAttributeDecoder.cpp
@@ -54,7 +54,7 @@ namespace shibsp {
map<pair<xstring,xstring>,string> m_tagMap;
};
- AttributeDecoder* SHIBSP_DLLLOCAL XMLAttributeDecoderFactory(const DOMElement* const & e)
+ AttributeDecoder* SHIBSP_DLLLOCAL XMLAttributeDecoderFactory(const DOMElement* const & e, bool)
{
return new XMLAttributeDecoder(e);
}
diff --git a/shibsp/attribute/filtering/impl/AndMatchFunctor.cpp b/shibsp/attribute/filtering/impl/AndMatchFunctor.cpp
index 3dea836..7816d01 100644
--- a/shibsp/attribute/filtering/impl/AndMatchFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AndMatchFunctor.cpp
@@ -47,7 +47,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL AndMatchFunctor : public MatchFunctor
{
public:
- AndMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p);
+ AndMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport=true);
bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
if (m_functors.empty())
@@ -70,14 +70,14 @@ namespace shibsp {
}
private:
- MatchFunctor* buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap);
+ MatchFunctor* buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap, bool deprecationSupport);
vector<const MatchFunctor*> m_functors;
};
- MatchFunctor* SHIBSP_DLLLOCAL AndMatchFunctorFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AndMatchFunctorFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
- return new AndMatchFunctor(p);
+ return new AndMatchFunctor(p, deprecationSupport);
}
static XMLCh _id[] = UNICODE_LITERAL_2(i,d);
@@ -86,14 +86,14 @@ namespace shibsp {
static XMLCh RuleReference[] = UNICODE_LITERAL_13(R,u,l,e,R,e,f,e,r,e,n,c,e);
};
-AndMatchFunctor::AndMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+AndMatchFunctor::AndMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
MatchFunctor* func;
const DOMElement* e = XMLHelper::getFirstChildElement(p.second);
while (e) {
func = nullptr;
if (XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, Rule)) {
- func = buildFunctor(e, p.first);
+ func = buildFunctor(e, p.first, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, RuleReference)) {
string ref = XMLHelper::getAttrString(e, nullptr, _ref);
@@ -110,7 +110,7 @@ AndMatchFunctor::AndMatchFunctor(const pair<const FilterPolicyContext*,const DOM
}
}
-MatchFunctor* AndMatchFunctor::buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap)
+MatchFunctor* AndMatchFunctor::buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap, bool deprecationSupport)
{
// We'll track and map IDs just for consistency, but don't require them or worry about dups.
string id = XMLHelper::getAttrString(e, nullptr, _id);
@@ -121,7 +121,7 @@ MatchFunctor* AndMatchFunctor::buildFunctor(const DOMElement* e, const FilterPol
if (!type)
throw ConfigurationException("Child Rule found with no xsi:type.");
- auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(functorMap,e)));
+ auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(functorMap,e), deprecationSupport));
functorMap->getMatchFunctors().insert(multimap<string,MatchFunctor*>::value_type(id, func.get()));
return func.release();
}
diff --git a/shibsp/attribute/filtering/impl/AnyMatchFunctor.cpp b/shibsp/attribute/filtering/impl/AnyMatchFunctor.cpp
index 209b3de..143c5f5 100644
--- a/shibsp/attribute/filtering/impl/AnyMatchFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AnyMatchFunctor.cpp
@@ -47,7 +47,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AnyMatchFunctorFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AnyMatchFunctorFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AnyMatchFunctor();
}
diff --git a/shibsp/attribute/filtering/impl/AttributeIssuerEntityAttributeFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeIssuerEntityAttributeFunctor.cpp
index a9356b7..55dabd4 100644
--- a/shibsp/attribute/filtering/impl/AttributeIssuerEntityAttributeFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeIssuerEntityAttributeFunctor.cpp
@@ -48,8 +48,8 @@ namespace shibsp {
{
boost::scoped_ptr<EntityMatcher> m_matcher;
public:
- AttributeIssuerEntityAttributeFunctor(const DOMElement* e)
- : m_matcher(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(ENTITYATTR_ENTITY_MATCHER, e)) {
+ AttributeIssuerEntityAttributeFunctor(const DOMElement* e, bool deprecationSupport=true)
+ : m_matcher(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(ENTITYATTR_ENTITY_MATCHER, e, deprecationSupport)) {
}
bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
@@ -66,14 +66,18 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerEntityAttributeExactMatchFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerEntityAttributeExactMatchFactory(
+ const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport
+ )
{
- return new AttributeIssuerEntityAttributeFunctor(p.second);
+ return new AttributeIssuerEntityAttributeFunctor(p.second, deprecationSupport);
}
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerEntityAttributeRegexMatchFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerEntityAttributeRegexMatchFactory(
+ const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport
+ )
{
- return new AttributeIssuerEntityAttributeFunctor(p.second);
+ return new AttributeIssuerEntityAttributeFunctor(p.second, deprecationSupport);
}
};
diff --git a/shibsp/attribute/filtering/impl/AttributeIssuerEntityMatcherFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeIssuerEntityMatcherFunctor.cpp
index 2419bf1..f9ecd07 100644
--- a/shibsp/attribute/filtering/impl/AttributeIssuerEntityMatcherFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeIssuerEntityMatcherFunctor.cpp
@@ -48,11 +48,11 @@ namespace shibsp {
{
boost::scoped_ptr<EntityMatcher> m_matcher;
public:
- AttributeIssuerEntityMatcherFunctor(const DOMElement* e) {
+ AttributeIssuerEntityMatcherFunctor(const DOMElement* e, bool deprecationSupport=true) {
static const XMLCh matcher[] = UNICODE_LITERAL_7(m,a,t,c,h,e,r);
std::string type(XMLHelper::getAttrString(e, nullptr, matcher));
if (!type.empty())
- m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(type.c_str(), e));
+ m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(type.c_str(), e, deprecationSupport));
else
throw ConfigurationException("AttributeIssuerEntityMatcher MatchFunctor requires a matcher attribute.");
}
@@ -71,9 +71,9 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerEntityMatcherFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerEntityMatcherFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
- return new AttributeIssuerEntityMatcherFunctor(p.second);
+ return new AttributeIssuerEntityMatcherFunctor(p.second, deprecationSupport);
}
};
diff --git a/shibsp/attribute/filtering/impl/AttributeIssuerInEntityGroupFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeIssuerInEntityGroupFunctor.cpp
index f0554fa..82784c9 100644
--- a/shibsp/attribute/filtering/impl/AttributeIssuerInEntityGroupFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeIssuerInEntityGroupFunctor.cpp
@@ -71,7 +71,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerInEntityGroupFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerInEntityGroupFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeIssuerInEntityGroupFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp
index b3bee2e..22aa0f2 100644
--- a/shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp
@@ -70,7 +70,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeIssuerRegexFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeIssuerStringFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeIssuerStringFunctor.cpp
index 28a9796..0a3fa64 100644
--- a/shibsp/attribute/filtering/impl/AttributeIssuerStringFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeIssuerStringFunctor.cpp
@@ -65,7 +65,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeIssuerStringFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp
index ff4da4e..19a8259 100644
--- a/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeMatchesShibMDScopeFunctor.cpp
@@ -129,12 +129,12 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeMatchesShibMDScopeFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeMatchesShibMDScopeFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeScopeMatchesShibMDScopeFunctor();
}
- MatchFunctor* SHIBSP_DLLLOCAL AttributeValueMatchesShibMDScopeFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeValueMatchesShibMDScopeFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeValueMatchesShibMDScopeFunctor();
}
diff --git a/shibsp/attribute/filtering/impl/AttributeRequesterEntityAttributeFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeRequesterEntityAttributeFunctor.cpp
index 5677771..a897823 100644
--- a/shibsp/attribute/filtering/impl/AttributeRequesterEntityAttributeFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeRequesterEntityAttributeFunctor.cpp
@@ -48,8 +48,8 @@ namespace shibsp {
{
boost::scoped_ptr<EntityMatcher> m_matcher;
public:
- AttributeRequesterEntityAttributeFunctor(const DOMElement* e)
- : m_matcher(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(ENTITYATTR_ENTITY_MATCHER, e)) {
+ AttributeRequesterEntityAttributeFunctor(const DOMElement* e, bool deprecationSupport)
+ : m_matcher(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(ENTITYATTR_ENTITY_MATCHER, e, deprecationSupport)) {
}
bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
@@ -66,13 +66,17 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterEntityAttributeExactMatchFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterEntityAttributeExactMatchFactory(
+ const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport
+ )
{
- return new AttributeRequesterEntityAttributeFunctor(p.second);
+ return new AttributeRequesterEntityAttributeFunctor(p.second, deprecationSupport);
}
- MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterEntityAttributeRegexMatchFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterEntityAttributeRegexMatchFactory(
+ const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport
+ )
{
- return new AttributeRequesterEntityAttributeFunctor(p.second);
+ return new AttributeRequesterEntityAttributeFunctor(p.second, deprecationSupport);
}
};
diff --git a/shibsp/attribute/filtering/impl/AttributeRequesterEntityMatcherFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeRequesterEntityMatcherFunctor.cpp
index 393abad..06af18f 100644
--- a/shibsp/attribute/filtering/impl/AttributeRequesterEntityMatcherFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeRequesterEntityMatcherFunctor.cpp
@@ -48,11 +48,11 @@ namespace shibsp {
{
boost::scoped_ptr<EntityMatcher> m_matcher;
public:
- AttributeRequesterEntityMatcherFunctor(const DOMElement* e) {
+ AttributeRequesterEntityMatcherFunctor(const DOMElement* e, bool deprecationSupport=true) {
static const XMLCh matcher[] = UNICODE_LITERAL_7(m,a,t,c,h,e,r);
std::string type(XMLHelper::getAttrString(e, nullptr, matcher));
if (!type.empty())
- m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(type.c_str(), e));
+ m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(type.c_str(), e, deprecationSupport));
else
throw ConfigurationException("AttributeRequesterEntityMatcher MatchFunctor requires a matcher attribute.");
}
@@ -71,9 +71,9 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterEntityMatcherFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterEntityMatcherFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
- return new AttributeRequesterEntityMatcherFunctor(p.second);
+ return new AttributeRequesterEntityMatcherFunctor(p.second, deprecationSupport);
}
};
diff --git a/shibsp/attribute/filtering/impl/AttributeRequesterInEntityGroupFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeRequesterInEntityGroupFunctor.cpp
index 7e19bd6..f9db9b4 100644
--- a/shibsp/attribute/filtering/impl/AttributeRequesterInEntityGroupFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeRequesterInEntityGroupFunctor.cpp
@@ -71,7 +71,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterInEntityGroupFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterInEntityGroupFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeRequesterInEntityGroupFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp
index d45293f..9e42498 100644
--- a/shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp
@@ -70,7 +70,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeRequesterRegexFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeRequesterStringFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeRequesterStringFunctor.cpp
index db56eea..bf765c3 100644
--- a/shibsp/attribute/filtering/impl/AttributeRequesterStringFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeRequesterStringFunctor.cpp
@@ -65,7 +65,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeRequesterStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeRequesterStringFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp
index a60f5c0..c521143 100644
--- a/shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp
@@ -86,7 +86,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeRegexFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeRegexFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeScopeRegexFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeScopeStringFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeScopeStringFunctor.cpp
index 640c72f..a2252e3 100644
--- a/shibsp/attribute/filtering/impl/AttributeScopeStringFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeScopeStringFunctor.cpp
@@ -94,7 +94,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeStringFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeScopeStringFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeScopeStringFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp
index b1315cd..a6b2afa 100644
--- a/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp
@@ -87,7 +87,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeValueRegexFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeValueRegexFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeValueRegexFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp b/shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp
index 7677692..dbcc4a4 100644
--- a/shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp
@@ -84,7 +84,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeValueStringFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeValueStringFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeValueStringFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp b/shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp
index e223a67..e423502 100644
--- a/shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp
@@ -70,7 +70,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AuthenticationMethodRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AuthenticationMethodRegexFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AuthenticationMethodRegexFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/AuthenticationMethodStringFunctor.cpp b/shibsp/attribute/filtering/impl/AuthenticationMethodStringFunctor.cpp
index 68fe427..9eb542d 100644
--- a/shibsp/attribute/filtering/impl/AuthenticationMethodStringFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/AuthenticationMethodStringFunctor.cpp
@@ -68,7 +68,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL AuthenticationMethodStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AuthenticationMethodStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AuthenticationMethodStringFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/ChainingAttributeFilter.cpp b/shibsp/attribute/filtering/impl/ChainingAttributeFilter.cpp
index 4ce7864..ac3905b 100644
--- a/shibsp/attribute/filtering/impl/ChainingAttributeFilter.cpp
+++ b/shibsp/attribute/filtering/impl/ChainingAttributeFilter.cpp
@@ -43,7 +43,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL ChainingAttributeFilter : public AttributeFilter
{
public:
- ChainingAttributeFilter(const DOMElement* e);
+ ChainingAttributeFilter(const DOMElement* e, bool deprecationSupport=true);
virtual ~ChainingAttributeFilter() {}
Lockable* lock() {
@@ -66,13 +66,13 @@ namespace shibsp {
static const XMLCh _AttributeFilter[] = UNICODE_LITERAL_15(A,t,t,r,i,b,u,t,e,F,i,l,t,e,r);
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
- AttributeFilter* SHIBSP_DLLLOCAL ChainingAttributeFilterFactory(const DOMElement* const & e)
+ AttributeFilter* SHIBSP_DLLLOCAL ChainingAttributeFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingAttributeFilter(e);
+ return new ChainingAttributeFilter(e, deprecationSupport);
}
};
-ChainingAttributeFilter::ChainingAttributeFilter(const DOMElement* e)
+ChainingAttributeFilter::ChainingAttributeFilter(const DOMElement* e, bool deprecationSupport)
{
// Load up the chain of handlers.
e = XMLHelper::getFirstChildElement(e, _AttributeFilter);
@@ -80,7 +80,7 @@ ChainingAttributeFilter::ChainingAttributeFilter(const DOMElement* e)
string t(XMLHelper::getAttrString(e, nullptr, _type));
if (!t.empty()) {
Category::getInstance(SHIBSP_LOGCAT ".AttributeFilter.Chaining").info("building AttributeFilter of type (%s)...", t.c_str());
- auto_ptr<AttributeFilter> np(SPConfig::getConfig().AttributeFilterManager.newPlugin(t.c_str(), e));
+ auto_ptr<AttributeFilter> np(SPConfig::getConfig().AttributeFilterManager.newPlugin(t.c_str(), e, deprecationSupport));
m_filters.push_back(np.get());
np.release();
}
diff --git a/shibsp/attribute/filtering/impl/DummyAttributeFilter.cpp b/shibsp/attribute/filtering/impl/DummyAttributeFilter.cpp
index a323699..3bb11f8 100644
--- a/shibsp/attribute/filtering/impl/DummyAttributeFilter.cpp
+++ b/shibsp/attribute/filtering/impl/DummyAttributeFilter.cpp
@@ -55,7 +55,7 @@ namespace shibsp {
}
};
- AttributeFilter* SHIBSP_DLLLOCAL DummyAttributeFilterFactory(const DOMElement* const & e)
+ AttributeFilter* SHIBSP_DLLLOCAL DummyAttributeFilterFactory(const DOMElement* const & e, bool)
{
return new DummyAttributeFilter(e);
}
diff --git a/shibsp/attribute/filtering/impl/NameIDQualifierStringFunctor.cpp b/shibsp/attribute/filtering/impl/NameIDQualifierStringFunctor.cpp
index 69546b6..8a49d11 100644
--- a/shibsp/attribute/filtering/impl/NameIDQualifierStringFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/NameIDQualifierStringFunctor.cpp
@@ -79,7 +79,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL NameIDQualifierStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL NameIDQualifierStringFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new NameIDQualifierStringFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/NotMatchFunctor.cpp b/shibsp/attribute/filtering/impl/NotMatchFunctor.cpp
index 768b482..24b7f45 100644
--- a/shibsp/attribute/filtering/impl/NotMatchFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/NotMatchFunctor.cpp
@@ -46,7 +46,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL NotMatchFunctor : public MatchFunctor
{
public:
- NotMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p);
+ NotMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport=true);
bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
if (m_functor)
@@ -61,14 +61,14 @@ namespace shibsp {
}
private:
- MatchFunctor* buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap);
+ MatchFunctor* buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap, bool deprecationSupport);
const MatchFunctor* m_functor;
};
- MatchFunctor* SHIBSP_DLLLOCAL NotMatchFunctorFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL NotMatchFunctorFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
- return new NotMatchFunctor(p);
+ return new NotMatchFunctor(p, deprecationSupport);
}
static XMLCh _id[] = UNICODE_LITERAL_2(i,d);
@@ -77,12 +77,12 @@ namespace shibsp {
static XMLCh RuleReference[] = UNICODE_LITERAL_13(R,u,l,e,R,e,f,e,r,e,n,c,e);
};
-NotMatchFunctor::NotMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p) : m_functor(nullptr)
+NotMatchFunctor::NotMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport) : m_functor(nullptr)
{
const DOMElement* e = XMLHelper::getFirstChildElement(p.second);
if (e) {
if (XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, Rule)) {
- m_functor = buildFunctor(e, p.first);
+ m_functor = buildFunctor(e, p.first, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, RuleReference)) {
string ref = XMLHelper::getAttrString(e, nullptr, _ref);
@@ -97,7 +97,7 @@ NotMatchFunctor::NotMatchFunctor(const pair<const FilterPolicyContext*,const DOM
throw ConfigurationException("No child Rule installed into NotMatchFunctor.");
}
-MatchFunctor* NotMatchFunctor::buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap)
+MatchFunctor* NotMatchFunctor::buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap, bool deprecationSupport)
{
// We'll track and map IDs just for consistency, but don't require them or worry about dups.
string id = XMLHelper::getAttrString(e, nullptr, _id);
@@ -108,7 +108,7 @@ MatchFunctor* NotMatchFunctor::buildFunctor(const DOMElement* e, const FilterPol
if (!type)
throw ConfigurationException("Child Rule found with no xsi:type.");
- auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(functorMap,e)));
+ auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(functorMap,e), deprecationSupport));
functorMap->getMatchFunctors().insert(multimap<string,MatchFunctor*>::value_type(id, func.get()));
return func.release();
}
diff --git a/shibsp/attribute/filtering/impl/NumberOfAttributeValuesFunctor.cpp b/shibsp/attribute/filtering/impl/NumberOfAttributeValuesFunctor.cpp
index 0053ab6..7811303 100644
--- a/shibsp/attribute/filtering/impl/NumberOfAttributeValuesFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/NumberOfAttributeValuesFunctor.cpp
@@ -75,7 +75,7 @@ namespace shibsp {
}
};
- MatchFunctor* SHIBSP_DLLLOCAL NumberOfAttributeValuesFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL NumberOfAttributeValuesFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new NumberOfAttributeValuesFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/OrMatchFunctor.cpp b/shibsp/attribute/filtering/impl/OrMatchFunctor.cpp
index c80bb24..52b2919 100644
--- a/shibsp/attribute/filtering/impl/OrMatchFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/OrMatchFunctor.cpp
@@ -47,7 +47,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL OrMatchFunctor : public MatchFunctor
{
public:
- OrMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p);
+ OrMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport=true);
bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
vector<const MatchFunctor*>::const_iterator i = find_if(
@@ -66,14 +66,14 @@ namespace shibsp {
}
private:
- MatchFunctor* buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap);
+ MatchFunctor* buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap, bool deprecationSupport);
vector<const MatchFunctor*> m_functors;
};
- MatchFunctor* SHIBSP_DLLLOCAL OrMatchFunctorFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL OrMatchFunctorFactory(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
- return new OrMatchFunctor(p);
+ return new OrMatchFunctor(p, deprecationSupport);
}
static XMLCh _id[] = UNICODE_LITERAL_2(i,d);
@@ -82,14 +82,14 @@ namespace shibsp {
static XMLCh RuleReference[] = UNICODE_LITERAL_13(R,u,l,e,R,e,f,e,r,e,n,c,e);
};
-OrMatchFunctor::OrMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p)
+OrMatchFunctor::OrMatchFunctor(const pair<const FilterPolicyContext*,const DOMElement*>& p, bool deprecationSupport)
{
MatchFunctor* func;
const DOMElement* e = XMLHelper::getFirstChildElement(p.second);
while (e) {
func = nullptr;
if (XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, Rule)) {
- func = buildFunctor(e, p.first);
+ func = buildFunctor(e, p.first, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, RuleReference)) {
string ref = XMLHelper::getAttrString(e, nullptr, _ref);
@@ -106,7 +106,7 @@ OrMatchFunctor::OrMatchFunctor(const pair<const FilterPolicyContext*,const DOMEl
}
}
-MatchFunctor* OrMatchFunctor::buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap)
+MatchFunctor* OrMatchFunctor::buildFunctor(const DOMElement* e, const FilterPolicyContext* functorMap, bool deprecationSupport)
{
// We'll track and map IDs just for consistency, but don't require them or worry about dups.
string id = XMLHelper::getAttrString(e, nullptr, _id);
@@ -117,7 +117,7 @@ MatchFunctor* OrMatchFunctor::buildFunctor(const DOMElement* e, const FilterPoli
if (!type)
throw ConfigurationException("Child Rule found with no xsi:type.");
- auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(functorMap,e)));
+ auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(functorMap,e), deprecationSupport));
functorMap->getMatchFunctors().insert(multimap<string,MatchFunctor*>::value_type(id, func.get()));
return func.release();
}
diff --git a/shibsp/attribute/filtering/impl/RegistrationAuthorityFunctor.cpp b/shibsp/attribute/filtering/impl/RegistrationAuthorityFunctor.cpp
index 5b73652..734dc0b 100644
--- a/shibsp/attribute/filtering/impl/RegistrationAuthorityFunctor.cpp
+++ b/shibsp/attribute/filtering/impl/RegistrationAuthorityFunctor.cpp
@@ -136,12 +136,12 @@ namespace shibsp {
};
- MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerRegistrationAuthorityFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL AttributeIssuerRegistrationAuthorityFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeIssuerRegistrationAuthorityFunctor(p.second);
}
- MatchFunctor* SHIBSP_DLLLOCAL RegistrationAuthorityFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p)
+ MatchFunctor* SHIBSP_DLLLOCAL RegistrationAuthorityFactory(const std::pair<const FilterPolicyContext*,const DOMElement*>& p, bool)
{
return new AttributeRequesterRegistrationAuthorityFunctor(p.second);
}
diff --git a/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp b/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
index 04eee1a..98803b6 100644
--- a/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
+++ b/shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
@@ -71,7 +71,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL XMLFilterImpl
{
public:
- XMLFilterImpl(const DOMElement* e, Category& log);
+ XMLFilterImpl(const DOMElement* e, Category& log, bool deprecationSupport);
~XMLFilterImpl() {
if (m_document)
m_document->release();
@@ -88,10 +88,10 @@ namespace shibsp {
private:
MatchFunctor* buildFunctor(
- const DOMElement* e, const FilterPolicyContext& functorMap, const char* logname, bool standalone
+ const DOMElement* e, const FilterPolicyContext& functorMap, const char* logname, bool standalone, bool deprecationSupport
);
boost::tuple<string,const MatchFunctor*,const MatchFunctor*> buildAttributeRule(
- const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone
+ const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone, bool deprecationSupport
);
Category& m_log;
@@ -106,7 +106,8 @@ namespace shibsp {
class SHIBSP_DLLLOCAL XMLFilter : public AttributeFilter, public ReloadableXMLFile
{
public:
- XMLFilter(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AttributeFilter")) {
+ XMLFilter(const DOMElement* e, bool deprecationSupport=true)
+ : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AttributeFilter"), true, deprecationSupport), m_deprecationSupport(deprecationSupport) {
background_load();
}
~XMLFilter() {
@@ -121,6 +122,7 @@ namespace shibsp {
pair<bool,DOMElement*> background_load();
private:
+ bool m_deprecationSupport;
scoped_ptr<XMLFilterImpl> m_impl;
};
@@ -128,7 +130,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeFilter* SHIBSP_DLLLOCAL XMLAttributeFilterFactory(const DOMElement* const & e)
+ AttributeFilter* SHIBSP_DLLLOCAL XMLAttributeFilterFactory(const DOMElement* const & e, bool)
{
return new XMLFilter(e);
}
@@ -149,7 +151,7 @@ namespace shibsp {
static const XMLCh _ref[] = UNICODE_LITERAL_3(r,e,f);
};
-XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log) : m_log(log), m_document(nullptr)
+XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log, bool deprecationSupport) : m_log(log), m_document(nullptr)
{
#ifdef _DEBUG
xmltooling::NDC ndc("XMLFilterImpl");
@@ -165,22 +167,22 @@ XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log) : m_log(log), m
DOMElement* child = XMLHelper::getFirstChildElement(e);
while (child) {
if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRule)) {
- buildFunctor(child, reqFunctors, "PolicyRequirementRule", true);
+ buildFunctor(child, reqFunctors, "PolicyRequirementRule", true, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, PermitValueRule)) {
- buildFunctor(child, permFunctors, "PermitValueRule", true);
+ buildFunctor(child, permFunctors, "PermitValueRule", true, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, DenyValueRule)) {
- buildFunctor(child, denyFunctors, "DenyValueRule", true);
+ buildFunctor(child, denyFunctors, "DenyValueRule", true, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
- buildAttributeRule(child, permFunctors, denyFunctors, true);
+ buildAttributeRule(child, permFunctors, denyFunctors, true, deprecationSupport);
}
else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, AttributeFilterPolicy)) {
e = XMLHelper::getFirstChildElement(child);
MatchFunctor* func = nullptr;
if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRule)) {
- func = buildFunctor(e, reqFunctors, "PolicyRequirementRule", false);
+ func = buildFunctor(e, reqFunctors, "PolicyRequirementRule", false, deprecationSupport);
}
else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRuleReference)) {
string ref(XMLHelper::getAttrString(e, nullptr, _ref));
@@ -195,7 +197,7 @@ XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log) : m_log(log), m
e = XMLHelper::getNextSiblingElement(e);
while (e) {
if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
- boost::tuple<string,const MatchFunctor*,const MatchFunctor*> rule = buildAttributeRule(e, permFunctors, denyFunctors, false);
+ boost::tuple<string,const MatchFunctor*,const MatchFunctor*> rule = buildAttributeRule(e, permFunctors, denyFunctors, false, deprecationSupport);
if (rule.get<1>() || rule.get<2>())
m_policies.back().m_rules.insert(Policy::rules_t::value_type(rule.get<0>(), make_pair(rule.get<1>(), rule.get<2>())));
}
@@ -225,7 +227,7 @@ XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log) : m_log(log), m
}
MatchFunctor* XMLFilterImpl::buildFunctor(
- const DOMElement* e, const FilterPolicyContext& functorMap, const char* logname, bool standalone
+ const DOMElement* e, const FilterPolicyContext& functorMap, const char* logname, bool standalone, bool deprecationSupport
)
{
string id(XMLHelper::getAttrString(e, nullptr, _id));
@@ -246,11 +248,11 @@ MatchFunctor* XMLFilterImpl::buildFunctor(
scoped_ptr<xmltooling::QName> type(XMLHelper::getXSIType(e));
if (type) {
try {
- auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(&functorMap,e)));
+ auto_ptr<MatchFunctor> func(SPConfig::getConfig().MatchFunctorManager.newPlugin(*type, make_pair(&functorMap,e), deprecationSupport));
functorMap.getMatchFunctors().insert(multimap<string,MatchFunctor*>::value_type(id, func.get()));
return func.release();
}
- catch (exception& ex) {
+ catch (const exception& ex) {
m_log.error("error building %s with type (%s): %s", logname, type->toString().c_str(), ex.what());
}
}
@@ -263,7 +265,7 @@ MatchFunctor* XMLFilterImpl::buildFunctor(
}
boost::tuple<string,const MatchFunctor*,const MatchFunctor*> XMLFilterImpl::buildAttributeRule(
- const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone
+ const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone, bool deprecationSupport
)
{
string id(XMLHelper::getAttrString(e, nullptr, _id));
@@ -290,13 +292,13 @@ boost::tuple<string,const MatchFunctor*,const MatchFunctor*> XMLFilterImpl::buil
if (XMLHelper::getAttrBool(e, false, permitAny)) {
m_log.debug("installing implicit ANY permit rule for attribute (%s)", attrID.c_str());
- perm = SPConfig::getConfig().MatchFunctorManager.newPlugin(AnyMatchFunctorType, make_pair(&permMap,(const DOMElement*)nullptr));
+ perm = SPConfig::getConfig().MatchFunctorManager.newPlugin(AnyMatchFunctorType, make_pair(&permMap,(const DOMElement*)nullptr), deprecationSupport);
return boost::make_tuple(attrID, perm, deny);
}
e = XMLHelper::getFirstChildElement(e);
if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PermitValueRule)) {
- perm = buildFunctor(e, permMap, "PermitValueRule", false);
+ perm = buildFunctor(e, permMap, "PermitValueRule", false, deprecationSupport);
e = XMLHelper::getNextSiblingElement(e);
}
else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PermitValueRuleReference)) {
@@ -309,7 +311,7 @@ boost::tuple<string,const MatchFunctor*,const MatchFunctor*> XMLFilterImpl::buil
}
if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, DenyValueRule)) {
- deny = buildFunctor(e, denyMap, "DenyValueRule", false);
+ deny = buildFunctor(e, denyMap, "DenyValueRule", false, deprecationSupport);
}
else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, DenyValueRuleReference)) {
string ref(XMLHelper::getAttrString(e, nullptr, _ref));
@@ -489,7 +491,7 @@ pair<bool,DOMElement*> XMLFilter::background_load()
// If we own it, wrap it.
XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
- scoped_ptr<XMLFilterImpl> impl(new XMLFilterImpl(raw.second, m_log));
+ scoped_ptr<XMLFilterImpl> impl(new XMLFilterImpl(raw.second, m_log, m_deprecationSupport));
// If we held the document, transfer it to the impl. If we didn't, it's a no-op.
impl->setDocument(docjanitor.release());
diff --git a/shibsp/attribute/resolver/impl/AssertionAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/AssertionAttributeExtractor.cpp
index 7bb5a80..621901f 100644
--- a/shibsp/attribute/resolver/impl/AssertionAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/AssertionAttributeExtractor.cpp
@@ -91,7 +91,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeExtractor* SHIBSP_DLLLOCAL AssertionAttributeExtractorFactory(const DOMElement* const & e)
+ AttributeExtractor* SHIBSP_DLLLOCAL AssertionAttributeExtractorFactory(const DOMElement* const & e, bool)
{
return new AssertionExtractor(e);
}
diff --git a/shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp
index b88e35e..07a7d4f 100644
--- a/shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp
@@ -45,7 +45,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL ChainingAttributeExtractor : public AttributeExtractor
{
public:
- ChainingAttributeExtractor(const DOMElement* e);
+ ChainingAttributeExtractor(const DOMElement* e, bool deprecationSupport=true);
virtual ~ChainingAttributeExtractor() {}
Lockable* lock() {
@@ -93,9 +93,10 @@ namespace shibsp {
SHIBSP_DLLLOCAL PluginManager<AttributeExtractor,string,const DOMElement*>::Factory DelegationAttributeExtractorFactory;
SHIBSP_DLLLOCAL PluginManager<AttributeExtractor,string,const DOMElement*>::Factory KeyDescriptorAttributeExtractorFactory;
SHIBSP_DLLLOCAL PluginManager<AttributeExtractor,string,const DOMElement*>::Factory XMLAttributeExtractorFactory;
- AttributeExtractor* SHIBSP_DLLLOCAL ChainingExtractorFactory(const DOMElement* const & e)
+
+ AttributeExtractor* SHIBSP_DLLLOCAL ChainingExtractorFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingAttributeExtractor(e);
+ return new ChainingAttributeExtractor(e, deprecationSupport);
}
};
@@ -121,7 +122,7 @@ void AttributeExtractor::generateMetadata(SPSSODescriptor& role) const
{
}
-ChainingAttributeExtractor::ChainingAttributeExtractor(const DOMElement* e)
+ChainingAttributeExtractor::ChainingAttributeExtractor(const DOMElement* e, bool deprecationSupport)
{
SPConfig& conf = SPConfig::getConfig();
@@ -134,7 +135,7 @@ ChainingAttributeExtractor::ChainingAttributeExtractor(const DOMElement* e)
Category::getInstance(SHIBSP_LOGCAT ".AttributeExtractor.Chaining").info(
"building AttributeExtractor of type (%s)...", t.c_str()
);
- auto_ptr<AttributeExtractor> np(conf.AttributeExtractorManager.newPlugin(t.c_str(), e));
+ auto_ptr<AttributeExtractor> np(conf.AttributeExtractorManager.newPlugin(t.c_str(), e, deprecationSupport));
m_extractors.push_back(np.get());
np.release();
}
diff --git a/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp b/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
index a66a4bb..c9b5b78 100644
--- a/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
+++ b/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
@@ -102,7 +102,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL ChainingAttributeResolver : public AttributeResolver
{
public:
- ChainingAttributeResolver(const DOMElement* e);
+ ChainingAttributeResolver(const DOMElement* e, bool deprecationSupport=true);
virtual ~ChainingAttributeResolver() {}
Lockable* lock() {
@@ -150,9 +150,9 @@ namespace shibsp {
SHIBSP_DLLLOCAL PluginManager<AttributeResolver,string,const DOMElement*>::Factory QueryResolverFactory;
SHIBSP_DLLLOCAL PluginManager<AttributeResolver,string,const DOMElement*>::Factory SimpleAggregationResolverFactory;
- AttributeResolver* SHIBSP_DLLLOCAL ChainingResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL ChainingResolverFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingAttributeResolver(e);
+ return new ChainingAttributeResolver(e, deprecationSupport);
}
};
@@ -179,7 +179,7 @@ AttributeResolver::~AttributeResolver()
{
}
-ChainingAttributeResolver::ChainingAttributeResolver(const DOMElement* e)
+ChainingAttributeResolver::ChainingAttributeResolver(const DOMElement* e, bool deprecationSupport)
: m_failFast(XMLHelper::getAttrBool(e, false, failFast))
{
SPConfig& conf = SPConfig::getConfig();
@@ -193,7 +193,7 @@ ChainingAttributeResolver::ChainingAttributeResolver(const DOMElement* e)
Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver." CHAINING_ATTRIBUTE_RESOLVER).info(
"building AttributeResolver of type (%s)...", t.c_str()
);
- auto_ptr<AttributeResolver> np(conf.AttributeResolverManager.newPlugin(t.c_str(), e));
+ auto_ptr<AttributeResolver> np(conf.AttributeResolverManager.newPlugin(t.c_str(), e, deprecationSupport));
m_resolvers.push_back(np.get());
np.release();
}
diff --git a/shibsp/attribute/resolver/impl/DelegationAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/DelegationAttributeExtractor.cpp
index 2af5a75..2b9d841 100644
--- a/shibsp/attribute/resolver/impl/DelegationAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/DelegationAttributeExtractor.cpp
@@ -83,7 +83,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeExtractor* SHIBSP_DLLLOCAL DelegationAttributeExtractorFactory(const DOMElement* const & e)
+ AttributeExtractor* SHIBSP_DLLLOCAL DelegationAttributeExtractorFactory(const DOMElement* const & e, bool)
{
return new DelegationExtractor(e);
}
diff --git a/shibsp/attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp
index ae6ebd0..abb9e8f 100644
--- a/shibsp/attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp
@@ -91,7 +91,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeExtractor* SHIBSP_DLLLOCAL KeyDescriptorAttributeExtractorFactory(const DOMElement* const & e)
+ AttributeExtractor* SHIBSP_DLLLOCAL KeyDescriptorAttributeExtractorFactory(const DOMElement* const & e, bool)
{
return new KeyDescriptorExtractor(e);
}
diff --git a/shibsp/attribute/resolver/impl/MetadataAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/MetadataAttributeExtractor.cpp
index ee90b18..5f1b9d4 100644
--- a/shibsp/attribute/resolver/impl/MetadataAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/MetadataAttributeExtractor.cpp
@@ -57,7 +57,7 @@ namespace shibsp {
class MetadataExtractor : public AttributeExtractor
{
public:
- MetadataExtractor(const DOMElement* e);
+ MetadataExtractor(const DOMElement* e, bool deprecationSupport=true);
~MetadataExtractor() {}
Lockable* lock() {
@@ -100,16 +100,16 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeExtractor* SHIBSP_DLLLOCAL MetadataAttributeExtractorFactory(const DOMElement* const & e)
+ AttributeExtractor* SHIBSP_DLLLOCAL MetadataAttributeExtractorFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new MetadataExtractor(e);
+ return new MetadataExtractor(e, deprecationSupport);
}
static const XMLCh _id[] = UNICODE_LITERAL_2(i,d);
static const XMLCh _formatter[] = UNICODE_LITERAL_9(f,o,r,m,a,t,t,e,r);
};
-MetadataExtractor::MetadataExtractor(const DOMElement* e)
+MetadataExtractor::MetadataExtractor(const DOMElement* e, bool deprecationSupport)
: m_attributeProfiles(XMLHelper::getAttrString(e, nullptr, AttributeProfile::LOCAL_NAME)),
m_errorURL(XMLHelper::getAttrString(e, nullptr, RoleDescriptor::ERRORURL_ATTRIB_NAME)),
m_displayName(XMLHelper::getAttrString(e, nullptr, DisplayName::LOCAL_NAME)),
@@ -126,7 +126,7 @@ MetadataExtractor::MetadataExtractor(const DOMElement* e)
string id(XMLHelper::getAttrString(child, nullptr, _id));
const XMLCh* type = child->getAttributeNS(nullptr, ContactPerson::CONTACTTYPE_ATTRIB_NAME);
if (!id.empty() && type && *type) {
- boost::shared_ptr<AttributeDecoder> decoder(SPConfig::getConfig().AttributeDecoderManager.newPlugin(DOMAttributeDecoderType, child));
+ boost::shared_ptr<AttributeDecoder> decoder(SPConfig::getConfig().AttributeDecoderManager.newPlugin(DOMAttributeDecoderType, child, deprecationSupport));
m_contacts.push_back(contact_tuple_t(id, type, decoder));
}
}
@@ -135,7 +135,7 @@ MetadataExtractor::MetadataExtractor(const DOMElement* e)
int h(XMLHelper::getAttrInt(child, 0, Logo::HEIGHT_ATTRIB_NAME));
int w(XMLHelper::getAttrInt(child, 0, Logo::WIDTH_ATTRIB_NAME));
if (!id.empty()) {
- boost::shared_ptr<AttributeDecoder> decoder(SPConfig::getConfig().AttributeDecoderManager.newPlugin(DOMAttributeDecoderType, child));
+ boost::shared_ptr<AttributeDecoder> decoder(SPConfig::getConfig().AttributeDecoderManager.newPlugin(DOMAttributeDecoderType, child, deprecationSupport));
m_logos.push_back(logo_tuple_t(id, h, w, decoder));
}
}
diff --git a/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp b/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp
index 86b54cf..561b4a2 100644
--- a/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp
+++ b/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp
@@ -225,7 +225,7 @@ namespace shibsp {
vector<string> m_exceptionId;
};
- AttributeResolver* SHIBSP_DLLLOCAL QueryResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL QueryResolverFactory(const DOMElement* const & e, bool)
{
return new QueryResolver(e);
}
diff --git a/shibsp/attribute/resolver/impl/SimpleAggregationAttributeResolver.cpp b/shibsp/attribute/resolver/impl/SimpleAggregationAttributeResolver.cpp
index bad7db7..dd30c91 100644
--- a/shibsp/attribute/resolver/impl/SimpleAggregationAttributeResolver.cpp
+++ b/shibsp/attribute/resolver/impl/SimpleAggregationAttributeResolver.cpp
@@ -160,7 +160,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SimpleAggregationResolver : public AttributeResolver
{
public:
- SimpleAggregationResolver(const DOMElement* e);
+ SimpleAggregationResolver(const DOMElement* e, bool deprecationSupport=true);
~SimpleAggregationResolver() {}
Lockable* lock() {return this;}
@@ -212,9 +212,9 @@ namespace shibsp {
vector<string> m_exceptionId;
};
- AttributeResolver* SHIBSP_DLLLOCAL SimpleAggregationResolverFactory(const DOMElement* const & e)
+ AttributeResolver* SHIBSP_DLLLOCAL SimpleAggregationResolverFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new SimpleAggregationResolver(e);
+ return new SimpleAggregationResolver(e, deprecationSupport);
}
static const XMLCh _AttributeExtractor[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,E,x,t,r,a,c,t,o,r);
@@ -231,7 +231,7 @@ namespace shibsp {
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
};
-SimpleAggregationResolver::SimpleAggregationResolver(const DOMElement* e)
+SimpleAggregationResolver::SimpleAggregationResolver(const DOMElement* e, bool deprecationSupport)
: m_log(Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver.SimpleAggregation")),
m_policyId(XMLHelper::getAttrString(e, nullptr, policyId)),
m_subjectMatch(XMLHelper::getAttrBool(e, false, subjectMatch))
@@ -262,7 +262,7 @@ SimpleAggregationResolver::SimpleAggregationResolver(const DOMElement* e)
if (t.empty())
throw ConfigurationException("MetadataProvider element missing type attribute.");
m_log.info("building MetadataProvider of type %s...", t.c_str());
- m_metadata.reset(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), child));
+ m_metadata.reset(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), child, deprecationSupport));
m_metadata->init();
}
@@ -272,7 +272,7 @@ SimpleAggregationResolver::SimpleAggregationResolver(const DOMElement* e)
if (t.empty())
throw ConfigurationException("TrustEngine element missing type attribute.");
m_log.info("building TrustEngine of type %s...", t.c_str());
- m_trust.reset(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), child));
+ m_trust.reset(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), child, deprecationSupport));
}
child = XMLHelper::getFirstChildElement(e, _AttributeExtractor);
@@ -281,7 +281,7 @@ SimpleAggregationResolver::SimpleAggregationResolver(const DOMElement* e)
if (t.empty())
throw ConfigurationException("AttributeExtractor element missing type attribute.");
m_log.info("building AttributeExtractor of type %s...", t.c_str());
- m_extractor.reset(SPConfig::getConfig().AttributeExtractorManager.newPlugin(t.c_str(), child));
+ m_extractor.reset(SPConfig::getConfig().AttributeExtractorManager.newPlugin(t.c_str(), child, deprecationSupport));
}
child = XMLHelper::getFirstChildElement(e, _AttributeFilter);
@@ -290,7 +290,7 @@ SimpleAggregationResolver::SimpleAggregationResolver(const DOMElement* e)
if (t.empty())
throw ConfigurationException("AttributeFilter element missing type attribute.");
m_log.info("building AttributeFilter of type %s...", t.c_str());
- m_filter.reset(SPConfig::getConfig().AttributeFilterManager.newPlugin(t.c_str(), child));
+ m_filter.reset(SPConfig::getConfig().AttributeFilterManager.newPlugin(t.c_str(), child, deprecationSupport));
}
child = XMLHelper::getFirstChildElement(e);
diff --git a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
index 5d4a594..b204130 100644
--- a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
@@ -77,7 +77,7 @@ namespace shibsp {
class XMLExtractorImpl : public ObservableMetadataProvider::Observer
{
public:
- XMLExtractorImpl(const DOMElement* e, Category& log);
+ XMLExtractorImpl(const DOMElement* e, Category& log, bool deprecationSupport);
~XMLExtractorImpl() {
for (map<const ObservableMetadataProvider*,decoded_t>::iterator i=m_decodedMap.begin(); i!=m_decodedMap.end(); ++i) {
i->first->removeObserver(this);
@@ -155,11 +155,15 @@ namespace shibsp {
class XMLExtractor : public AttributeExtractor, public ReloadableXMLFile
{
public:
- XMLExtractor(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AttributeExtractor.XML")) {
+ XMLExtractor(const DOMElement* e, bool deprecationSupport=true)
+ : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AttributeExtractor.XML"), true, deprecationSupport),
+ m_deprecationSupport(deprecationSupport)
+ {
if (m_local && m_lock)
m_log.warn("attribute mappings are reloadable; be sure to restart web server when adding new attribute IDs");
background_load();
}
+
~XMLExtractor() {
shutdown();
}
@@ -180,6 +184,7 @@ namespace shibsp {
pair<bool,DOMElement*> background_load();
private:
+ bool m_deprecationSupport;
scoped_ptr<XMLExtractorImpl> m_impl;
void extractAttributes(const Application&, const GenericRequest*, const RoleDescriptor*, const XMLObject&, ptr_vector<Attribute>&) const;
@@ -189,7 +194,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AttributeExtractor* SHIBSP_DLLLOCAL XMLAttributeExtractorFactory(const DOMElement* const & e)
+ AttributeExtractor* SHIBSP_DLLLOCAL XMLAttributeExtractorFactory(const DOMElement* const & e, bool)
{
return new XMLExtractor(e);
}
@@ -209,7 +214,7 @@ namespace shibsp {
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
};
-XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
+XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log, bool deprecationSupport)
: m_log(log),
m_document(nullptr),
m_policyId(XMLHelper::getAttrString(e, nullptr, metadataPolicyId)),
@@ -230,10 +235,10 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
if (t.empty())
throw ConfigurationException("MetadataProvider element missing type attribute.");
m_log.info("building MetadataProvider of type %s...", t.c_str());
- m_metadata.reset(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), child));
+ m_metadata.reset(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), child, deprecationSupport));
m_metadata->init();
}
- catch (std::exception& ex) {
+ catch (const std::exception& ex) {
m_metadata.reset();
m_entityAssertions = false;
m_log.crit("error building/initializing dedicated MetadataProvider: %s", ex.what());
@@ -249,9 +254,9 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
if (t.empty())
throw ConfigurationException("TrustEngine element missing type attribute.");
m_log.info("building TrustEngine of type %s...", t.c_str());
- m_trust.reset(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), child));
+ m_trust.reset(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), child, deprecationSupport));
}
- catch (std::exception& ex) {
+ catch (const std::exception& ex) {
m_entityAssertions = false;
m_log.crit("error building/initializing dedicated TrustEngine: %s", ex.what());
m_log.crit("disabling support for Assertions in EntityAttributes extension");
@@ -267,9 +272,9 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
if (t.empty())
throw ConfigurationException("AttributeFilter element missing type attribute.");
m_log.info("building AttributeFilter of type %s...", t.c_str());
- m_filter.reset(SPConfig::getConfig().AttributeFilterManager.newPlugin(t.c_str(), child));
+ m_filter.reset(SPConfig::getConfig().AttributeFilterManager.newPlugin(t.c_str(), child, deprecationSupport));
}
- catch (std::exception& ex) {
+ catch (const std::exception& ex) {
m_entityAssertions = false;
m_log.crit("error building/initializing dedicated AttributeFilter: %s", ex.what());
m_log.crit("disabling support for Assertions in EntityAttributes extension");
@@ -305,12 +310,12 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log)
if (dchild) {
scoped_ptr<xmltooling::QName> q(XMLHelper::getXSIType(dchild));
if (q)
- decoder.reset(SPConfig::getConfig().AttributeDecoderManager.newPlugin(*q, dchild));
+ decoder.reset(SPConfig::getConfig().AttributeDecoderManager.newPlugin(*q, dchild, deprecationSupport));
}
if (!decoder)
- decoder.reset(SPConfig::getConfig().AttributeDecoderManager.newPlugin(StringAttributeDecoderType, nullptr));
+ decoder.reset(SPConfig::getConfig().AttributeDecoderManager.newPlugin(StringAttributeDecoderType, nullptr, deprecationSupport));
}
- catch (std::exception& ex) {
+ catch (const std::exception& ex) {
m_log.error("skipping Attribute (%s), error building AttributeDecoder: %s", id.get(), ex.what());
}
@@ -1045,7 +1050,7 @@ pair<bool,DOMElement*> XMLExtractor::background_load()
// If we own it, wrap it.
XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
- scoped_ptr<XMLExtractorImpl> impl(new XMLExtractorImpl(raw.second, m_log));
+ scoped_ptr<XMLExtractorImpl> impl(new XMLExtractorImpl(raw.second, m_log, m_deprecationSupport));
// If we held the document, transfer it to the impl. If we didn't, it's a no-op.
impl->setDocument(docjanitor.release());
diff --git a/shibsp/binding/impl/XMLProtocolProvider.cpp b/shibsp/binding/impl/XMLProtocolProvider.cpp
index a24262e..1e6679e 100644
--- a/shibsp/binding/impl/XMLProtocolProvider.cpp
+++ b/shibsp/binding/impl/XMLProtocolProvider.cpp
@@ -89,8 +89,8 @@ namespace shibsp {
class XMLProtocolProvider : public ProtocolProvider, public ReloadableXMLFile
{
public:
- XMLProtocolProvider(const DOMElement* e)
- : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".ProtocolProvider.XML")) {
+ 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
}
@@ -120,9 +120,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- ProtocolProvider* SHIBSP_DLLLOCAL XMLProtocolProviderFactory(const DOMElement* const & e)
+ ProtocolProvider* SHIBSP_DLLLOCAL XMLProtocolProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new XMLProtocolProvider(e);
+ return new XMLProtocolProvider(e, deprecationSupport);
}
}
diff --git a/shibsp/handler/AssertionConsumerService.h b/shibsp/handler/AssertionConsumerService.h
index 3ca124c..a5bc8a9 100644
--- a/shibsp/handler/AssertionConsumerService.h
+++ b/shibsp/handler/AssertionConsumerService.h
@@ -81,13 +81,15 @@ namespace shibsp {
* @param log a logging object to use
* @param filter optional filter controls what child elements to include as nested PropertySets
* @param remapper optional property rename mapper for legacy property support
+ * @param deprecationSupport true iff deprecated settings and features should be supported
*/
AssertionConsumerService(
const xercesc::DOMElement* e,
const char* appId,
xmltooling::logging::Category& log,
xercesc::DOMNodeFilter* filter=nullptr,
- const Remapper* remapper=nullptr
+ const Remapper* remapper=nullptr,
+ bool deprecationSupport=true
);
/**
diff --git a/shibsp/handler/impl/AdminLogoutInitiator.cpp b/shibsp/handler/impl/AdminLogoutInitiator.cpp
index 4b9da9b..4254f5e 100644
--- a/shibsp/handler/impl/AdminLogoutInitiator.cpp
+++ b/shibsp/handler/impl/AdminLogoutInitiator.cpp
@@ -96,7 +96,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL AdminLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL AdminLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new AdminLogoutInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/AssertionConsumerService.cpp b/shibsp/handler/impl/AssertionConsumerService.cpp
index fd39ab0..9ed4588 100644
--- a/shibsp/handler/impl/AssertionConsumerService.cpp
+++ b/shibsp/handler/impl/AssertionConsumerService.cpp
@@ -74,7 +74,7 @@ using namespace boost;
using namespace std;
AssertionConsumerService::AssertionConsumerService(
- const DOMElement* e, const char* appId, Category& log, DOMNodeFilter* filter, const Remapper* remapper
+ const DOMElement* e, const char* appId, Category& log, DOMNodeFilter* filter, const Remapper* remapper, bool deprecationSupport
) : AbstractHandler(e, log, filter, remapper)
{
if (!e)
@@ -84,7 +84,7 @@ AssertionConsumerService::AssertionConsumerService(
setAddress(address.c_str());
#ifndef SHIBSP_LITE
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
- m_decoder.reset(SAMLConfig::getConfig().MessageDecoderManager.newPlugin(getString("Binding").second, e));
+ m_decoder.reset(SAMLConfig::getConfig().MessageDecoderManager.newPlugin(getString("Binding").second, e, deprecationSupport));
m_decoder->setArtifactResolver(SPConfig::getConfig().getArtifactResolver());
}
#endif
@@ -255,7 +255,7 @@ pair<bool,long> AssertionConsumerService::processMessage(
// Log the error.
try {
- scoped_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr));
+ scoped_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr, false));
LoginEvent* error_event = dynamic_cast<LoginEvent*>(event.get());
if (error_event) {
error_event->m_exception = &ex;
@@ -608,7 +608,7 @@ LoginEvent* AssertionConsumerService::newLoginEvent(const Application& applicati
if (!SPConfig::getConfig().isEnabled(SPConfig::Logging))
return nullptr;
try {
- auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr));
+ auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr, false));
LoginEvent* login_event = dynamic_cast<LoginEvent*>(event.get());
if (login_event) {
login_event->m_request = &request;
diff --git a/shibsp/handler/impl/AssertionLookup.cpp b/shibsp/handler/impl/AssertionLookup.cpp
index e1a02e4..8747f35 100644
--- a/shibsp/handler/impl/AssertionLookup.cpp
+++ b/shibsp/handler/impl/AssertionLookup.cpp
@@ -76,7 +76,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL AssertionLookupFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL AssertionLookupFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new AssertionLookup(p.first, p.second);
}
diff --git a/shibsp/handler/impl/AttributeCheckerHandler.cpp b/shibsp/handler/impl/AttributeCheckerHandler.cpp
index 085de02..47dff9d 100644
--- a/shibsp/handler/impl/AttributeCheckerHandler.cpp
+++ b/shibsp/handler/impl/AttributeCheckerHandler.cpp
@@ -70,7 +70,7 @@ namespace shibsp {
class SHIBSP_API AttributeCheckerHandler : public AbstractHandler
{
public:
- AttributeCheckerHandler(const DOMElement* e, const char* appId);
+ AttributeCheckerHandler(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~AttributeCheckerHandler() {}
pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
@@ -94,9 +94,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL AttributeCheckerFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL AttributeCheckerFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new AttributeCheckerHandler(p.first, p.second);
+ return new AttributeCheckerHandler(p.first, p.second, deprecationSupport);
}
static const XMLCh attributes[] = UNICODE_LITERAL_10(a,t,t,r,i,b,u,t,e,s);
@@ -104,7 +104,7 @@ namespace shibsp {
static const XMLCh _template[] = UNICODE_LITERAL_8(t,e,m,p,l,a,t,e);
};
-AttributeCheckerHandler::AttributeCheckerHandler(const DOMElement* e, const char* appId)
+AttributeCheckerHandler::AttributeCheckerHandler(const DOMElement* e, const char* appId, bool deprecationSupport)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".Handler.AttributeChecker"), &g_Blocker)
{
if (!SPConfig::getConfig().isEnabled(SPConfig::InProcess))
@@ -127,7 +127,7 @@ AttributeCheckerHandler::AttributeCheckerHandler(const DOMElement* e, const char
throw ConfigurationException("AttributeChecker requires either the attributes setting or an ACL");
}
else {
- m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(XML_ACCESS_CONTROL, e));
+ m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(XML_ACCESS_CONTROL, e, deprecationSupport));
}
}
diff --git a/shibsp/handler/impl/ChainingLogoutInitiator.cpp b/shibsp/handler/impl/ChainingLogoutInitiator.cpp
index 63e9580..7e10838 100644
--- a/shibsp/handler/impl/ChainingLogoutInitiator.cpp
+++ b/shibsp/handler/impl/ChainingLogoutInitiator.cpp
@@ -50,7 +50,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL ChainingLogoutInitiator : public AbstractHandler, public LogoutInitiator
{
public:
- ChainingLogoutInitiator(const DOMElement* e, const char* appId);
+ ChainingLogoutInitiator(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~ChainingLogoutInitiator() {}
pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
@@ -84,13 +84,13 @@ namespace shibsp {
static SHIBSP_DLLLOCAL LogoutInitiatorNodeFilter g_LINFilter;
- Handler* SHIBSP_DLLLOCAL ChainingLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL ChainingLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new ChainingLogoutInitiator(p.first, p.second);
+ return new ChainingLogoutInitiator(p.first, p.second, deprecationSupport);
}
};
-ChainingLogoutInitiator::ChainingLogoutInitiator(const DOMElement* e, const char* appId)
+ChainingLogoutInitiator::ChainingLogoutInitiator(const DOMElement* e, const char* appId, bool deprecationSupport)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".LogoutInitiator.Chaining"), &g_LINFilter)
{
SPConfig& conf = SPConfig::getConfig();
@@ -101,7 +101,7 @@ ChainingLogoutInitiator::ChainingLogoutInitiator(const DOMElement* e, const char
string t(XMLHelper::getAttrString(e, nullptr, _type));
if (!t.empty()) {
try {
- auto_ptr<Handler> np(conf.LogoutInitiatorManager.newPlugin(t.c_str(), make_pair(e, appId)));
+ auto_ptr<Handler> np(conf.LogoutInitiatorManager.newPlugin(t.c_str(), make_pair(e, appId), deprecationSupport));
m_handlers.push_back(np.get());
np.release();
m_handlers.back().setParent(this);
diff --git a/shibsp/handler/impl/ChainingSessionInitiator.cpp b/shibsp/handler/impl/ChainingSessionInitiator.cpp
index eaca81b..da042b5 100644
--- a/shibsp/handler/impl/ChainingSessionInitiator.cpp
+++ b/shibsp/handler/impl/ChainingSessionInitiator.cpp
@@ -50,7 +50,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL ChainingSessionInitiator : public SessionInitiator, public AbstractHandler
{
public:
- ChainingSessionInitiator(const DOMElement* e, const char* appId);
+ ChainingSessionInitiator(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~ChainingSessionInitiator() {}
pair<bool,long> run(SPRequest& request, string& entityID, bool isHandler=true) const;
@@ -85,13 +85,13 @@ namespace shibsp {
static SHIBSP_DLLLOCAL SessionInitiatorNodeFilter g_SINFilter;
- SessionInitiator* SHIBSP_DLLLOCAL ChainingSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL ChainingSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new ChainingSessionInitiator(p.first, p.second);
+ return new ChainingSessionInitiator(p.first, p.second, deprecationSupport);
}
};
-ChainingSessionInitiator::ChainingSessionInitiator(const DOMElement* e, const char* appId)
+ChainingSessionInitiator::ChainingSessionInitiator(const DOMElement* e, const char* appId, bool deprecationSupport)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".SessionInitiator.Chaining"), &g_SINFilter)
{
SPConfig& conf = SPConfig::getConfig();
@@ -102,7 +102,7 @@ ChainingSessionInitiator::ChainingSessionInitiator(const DOMElement* e, const ch
string t(XMLHelper::getAttrString(e, nullptr, _type));
if (!t.empty()) {
try {
- auto_ptr<SessionInitiator> np(conf.SessionInitiatorManager.newPlugin(t.c_str(), make_pair(e, appId)));
+ auto_ptr<SessionInitiator> np(conf.SessionInitiatorManager.newPlugin(t.c_str(), make_pair(e, appId), deprecationSupport));
m_handlers.push_back(np.get());
np.release();
m_handlers.back().setParent(this);
diff --git a/shibsp/handler/impl/CookieSessionInitiator.cpp b/shibsp/handler/impl/CookieSessionInitiator.cpp
index 244d46d..66c6577 100644
--- a/shibsp/handler/impl/CookieSessionInitiator.cpp
+++ b/shibsp/handler/impl/CookieSessionInitiator.cpp
@@ -71,7 +71,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SessionInitiator* SHIBSP_DLLLOCAL CookieSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL CookieSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new CookieSessionInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/DiscoveryFeed.cpp b/shibsp/handler/impl/DiscoveryFeed.cpp
index 02faa8b..efe66eb 100644
--- a/shibsp/handler/impl/DiscoveryFeed.cpp
+++ b/shibsp/handler/impl/DiscoveryFeed.cpp
@@ -100,7 +100,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL DiscoveryFeedFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL DiscoveryFeedFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new DiscoveryFeed(p.first, p.second);
}
diff --git a/shibsp/handler/impl/ExternalAuthHandler.cpp b/shibsp/handler/impl/ExternalAuthHandler.cpp
index d3204d9..8b78c98 100644
--- a/shibsp/handler/impl/ExternalAuthHandler.cpp
+++ b/shibsp/handler/impl/ExternalAuthHandler.cpp
@@ -120,7 +120,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL ExternalAuthFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL ExternalAuthFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new ExternalAuth(p.first, p.second);
}
@@ -259,7 +259,7 @@ pair<bool,long> ExternalAuth::processMessage(
scoped_ptr<TransactionLog::Event> event;
LoginEvent* login_event = nullptr;
if (SPConfig::getConfig().isEnabled(SPConfig::Logging)) {
- event.reset(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr));
+ event.reset(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr, false));
login_event = dynamic_cast<LoginEvent*>(event.get());
if (login_event)
login_event->m_app = &application;
@@ -811,7 +811,7 @@ LoginEvent* ExternalAuth::newLoginEvent(const Application& application, const HT
if (!SPConfig::getConfig().isEnabled(SPConfig::Logging))
return nullptr;
try {
- auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr));
+ auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGIN_EVENT, nullptr, false));
LoginEvent* login_event = dynamic_cast<LoginEvent*>(event.get());
if (login_event) {
login_event->m_request = &request;
diff --git a/shibsp/handler/impl/FormSessionInitiator.cpp b/shibsp/handler/impl/FormSessionInitiator.cpp
index b950e63..522b31b 100644
--- a/shibsp/handler/impl/FormSessionInitiator.cpp
+++ b/shibsp/handler/impl/FormSessionInitiator.cpp
@@ -68,7 +68,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SessionInitiator* SHIBSP_DLLLOCAL FormSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL FormSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new FormSessionInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/LocalLogoutInitiator.cpp b/shibsp/handler/impl/LocalLogoutInitiator.cpp
index 4c8b304..6a48ab2 100644
--- a/shibsp/handler/impl/LocalLogoutInitiator.cpp
+++ b/shibsp/handler/impl/LocalLogoutInitiator.cpp
@@ -70,7 +70,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL LocalLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL LocalLogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new LocalLogoutInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/LogoutHandler.cpp b/shibsp/handler/impl/LogoutHandler.cpp
index dfdb305..026be56 100644
--- a/shibsp/handler/impl/LogoutHandler.cpp
+++ b/shibsp/handler/impl/LogoutHandler.cpp
@@ -291,7 +291,7 @@ LogoutEvent* LogoutHandler::newLogoutEvent(
if (!SPConfig::getConfig().isEnabled(SPConfig::Logging))
return nullptr;
try {
- auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGOUT_EVENT, nullptr));
+ auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGOUT_EVENT, nullptr, false));
LogoutEvent* logout_event = dynamic_cast<LogoutEvent*>(event.get());
if (logout_event) {
logout_event->m_request = request;
diff --git a/shibsp/handler/impl/MetadataGenerator.cpp b/shibsp/handler/impl/MetadataGenerator.cpp
index 938253d..4b57d80 100644
--- a/shibsp/handler/impl/MetadataGenerator.cpp
+++ b/shibsp/handler/impl/MetadataGenerator.cpp
@@ -178,7 +178,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL MetadataGeneratorFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL MetadataGeneratorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new MetadataGenerator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/SAML1Consumer.cpp b/shibsp/handler/impl/SAML1Consumer.cpp
index d7d93a0..470e463 100644
--- a/shibsp/handler/impl/SAML1Consumer.cpp
+++ b/shibsp/handler/impl/SAML1Consumer.cpp
@@ -70,12 +70,12 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SAML1Consumer : public AssertionConsumerService
{
public:
- SAML1Consumer(const DOMElement* e, const char* appId)
- : AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT ".SSO.SAML1")) {
+ SAML1Consumer(const DOMElement* e, const char* appId, bool deprecationSupport=true)
+ : AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT ".SSO.SAML1"), nullptr, nullptr, deprecationSupport) {
#ifndef SHIBSP_LITE
m_post = XMLString::equals(getString("Binding").second, samlconstants::SAML1_PROFILE_BROWSER_POST);
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess))
- m_ssoRule.reset(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SAML1BROWSERSSO_POLICY_RULE, e));
+ m_ssoRule.reset(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SAML1BROWSERSSO_POLICY_RULE, e, deprecationSupport));
#endif
}
virtual ~SAML1Consumer() {}
@@ -110,9 +110,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SAML1ConsumerFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SAML1ConsumerFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML1Consumer(p.first, p.second);
+ return new SAML1Consumer(p.first, p.second, deprecationSupport);
}
#ifndef SHIBSP_LITE
diff --git a/shibsp/handler/impl/SAML2ArtifactResolution.cpp b/shibsp/handler/impl/SAML2ArtifactResolution.cpp
index 4fe50d9..98e1d2d 100644
--- a/shibsp/handler/impl/SAML2ArtifactResolution.cpp
+++ b/shibsp/handler/impl/SAML2ArtifactResolution.cpp
@@ -73,7 +73,7 @@ namespace shibsp {
class SHIBSP_API SAML2ArtifactResolution : public AbstractHandler, public RemotedHandler
{
public:
- SAML2ArtifactResolution(const DOMElement* e, const char* appId);
+ SAML2ArtifactResolution(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~SAML2ArtifactResolution() {}
pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
@@ -134,20 +134,20 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SAML2ArtifactResolutionFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SAML2ArtifactResolutionFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML2ArtifactResolution(p.first, p.second);
+ return new SAML2ArtifactResolution(p.first, p.second, deprecationSupport);
}
};
-SAML2ArtifactResolution::SAML2ArtifactResolution(const DOMElement* e, const char* appId)
+SAML2ArtifactResolution::SAML2ArtifactResolution(const DOMElement* e, const char* appId, bool deprecationSupport)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".ArtifactResolution.SAML2"))
{
#ifndef SHIBSP_LITE
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
- m_encoder.reset(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(getString("Binding").second, e));
- m_decoder.reset(SAMLConfig::getConfig().MessageDecoderManager.newPlugin(getString("Binding").second, e));
+ m_encoder.reset(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(getString("Binding").second, e, deprecationSupport));
+ m_decoder.reset(SAMLConfig::getConfig().MessageDecoderManager.newPlugin(getString("Binding").second, e, deprecationSupport));
}
#endif
string address(appId);
diff --git a/shibsp/handler/impl/SAML2Consumer.cpp b/shibsp/handler/impl/SAML2Consumer.cpp
index ac85bb6..8c47029 100644
--- a/shibsp/handler/impl/SAML2Consumer.cpp
+++ b/shibsp/handler/impl/SAML2Consumer.cpp
@@ -70,11 +70,11 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SAML2Consumer : public AssertionConsumerService
{
public:
- SAML2Consumer(const DOMElement* e, const char* appId)
- : AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT ".SSO.SAML2")) {
+ SAML2Consumer(const DOMElement* e, const char* appId, bool deprecationSupport=true)
+ : AssertionConsumerService(e, appId, Category::getInstance(SHIBSP_LOGCAT ".SSO.SAML2"), nullptr, nullptr, deprecationSupport) {
#ifndef SHIBSP_LITE
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess))
- m_ssoRule.reset(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(BEARER_POLICY_RULE, e));
+ m_ssoRule.reset(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(BEARER_POLICY_RULE, e, deprecationSupport));
#endif
}
virtual ~SAML2Consumer() {}
@@ -107,9 +107,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SAML2ConsumerFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SAML2ConsumerFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML2Consumer(p.first, p.second);
+ return new SAML2Consumer(p.first, p.second, deprecationSupport);
}
#ifndef SHIBSP_LITE
diff --git a/shibsp/handler/impl/SAML2Logout.cpp b/shibsp/handler/impl/SAML2Logout.cpp
index fe763d3..c163732 100644
--- a/shibsp/handler/impl/SAML2Logout.cpp
+++ b/shibsp/handler/impl/SAML2Logout.cpp
@@ -73,7 +73,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SAML2Logout : public AbstractHandler, public LogoutHandler
{
public:
- SAML2Logout(const DOMElement* e, const char* appId);
+ SAML2Logout(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~SAML2Logout() {}
void receive(DDF& in, ostream& out);
@@ -139,13 +139,13 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SAML2LogoutFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SAML2LogoutFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML2Logout(p.first, p.second);
+ return new SAML2Logout(p.first, p.second, deprecationSupport);
}
};
-SAML2Logout::SAML2Logout(const DOMElement* e, const char* appId)
+SAML2Logout::SAML2Logout(const DOMElement* e, const char* appId, bool deprecationSupport)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".Logout.SAML2"))
#ifndef SHIBSP_LITE
,m_protocol(samlconstants::SAML20P_NS)
@@ -161,7 +161,7 @@ SAML2Logout::SAML2Logout(const DOMElement* e, const char* appId)
SAMLConfig& conf = SAMLConfig::getConfig();
// Handle incoming binding.
- m_decoder.reset(conf.MessageDecoderManager.newPlugin(getString("Binding").second, e));
+ m_decoder.reset(conf.MessageDecoderManager.newPlugin(getString("Binding").second, e, deprecationSupport));
m_decoder->setArtifactResolver(SPConfig::getConfig().getArtifactResolver());
if (m_decoder->isUserAgentPresent()) {
@@ -181,7 +181,7 @@ SAML2Logout::SAML2Logout(const DOMElement* e, const char* appId)
split(m_bindings, dupBindings, is_space(), algorithm::token_compress_on);
for (vector<string>::const_iterator b = m_bindings.begin(); b != m_bindings.end(); ++b) {
try {
- boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(*b, e));
+ boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(*b, e, deprecationSupport));
if (encoder->isUserAgentPresent() && XMLString::equals(getProtocolFamily(), encoder->getProtocolFamily())) {
m_encoders[*b] = encoder;
m_log.debug("supporting outgoing binding (%s)", b->c_str());
@@ -197,7 +197,7 @@ SAML2Logout::SAML2Logout(const DOMElement* e, const char* appId)
}
else {
pair<bool,const char*> b = getString("Binding");
- boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(b.second, e));
+ boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(b.second, e, deprecationSupport));
m_encoders[b.second] = encoder;
}
}
diff --git a/shibsp/handler/impl/SAML2LogoutInitiator.cpp b/shibsp/handler/impl/SAML2LogoutInitiator.cpp
index c315f1f..1c09539 100644
--- a/shibsp/handler/impl/SAML2LogoutInitiator.cpp
+++ b/shibsp/handler/impl/SAML2LogoutInitiator.cpp
@@ -68,7 +68,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SAML2LogoutInitiator : public AbstractHandler, public LogoutInitiator
{
public:
- SAML2LogoutInitiator(const DOMElement* e, const char* appId);
+ SAML2LogoutInitiator(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~SAML2LogoutInitiator() {}
void init(const char* location); // encapsulates actions that need to run either in the c'tor or setParent
@@ -87,6 +87,7 @@ namespace shibsp {
) const;
string m_appId;
+ bool m_deprecationSupport;
auto_ptr_char m_protocol;
#ifndef SHIBSP_LITE
auto_ptr<LogoutRequest> buildRequest(
@@ -116,14 +117,15 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SAML2LogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SAML2LogoutInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML2LogoutInitiator(p.first, p.second);
+ return new SAML2LogoutInitiator(p.first, p.second, deprecationSupport);
}
};
-SAML2LogoutInitiator::SAML2LogoutInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".LogoutInitiator.SAML2")), m_appId(appId), m_protocol(samlconstants::SAML20P_NS)
+SAML2LogoutInitiator::SAML2LogoutInitiator(const DOMElement* e, const char* appId, bool deprecationSupport)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".LogoutInitiator.SAML2")),
+ m_appId(appId), m_deprecationSupport(deprecationSupport), m_protocol(samlconstants::SAML20P_NS)
#ifndef SHIBSP_LITE
,m_async(true)
#endif
@@ -171,7 +173,7 @@ void SAML2LogoutInitiator::init(const char* location)
split(m_bindings, dupBindings, is_space(), algorithm::token_compress_on);
for (vector<string>::const_iterator b = m_bindings.begin(); b != m_bindings.end(); ++b) {
try {
- boost::shared_ptr<MessageEncoder> encoder(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(*b, getElement()));
+ boost::shared_ptr<MessageEncoder> encoder(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(*b, getElement(), m_deprecationSupport));
if (encoder->isUserAgentPresent() && XMLString::equals(getProtocolFamily(), encoder->getProtocolFamily())) {
m_encoders[*b] = encoder;
m_log.debug("supporting outgoing binding (%s)", b->c_str());
diff --git a/shibsp/handler/impl/SAML2NameIDMgmt.cpp b/shibsp/handler/impl/SAML2NameIDMgmt.cpp
index 62c8dbd..68cb35f 100644
--- a/shibsp/handler/impl/SAML2NameIDMgmt.cpp
+++ b/shibsp/handler/impl/SAML2NameIDMgmt.cpp
@@ -73,7 +73,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SAML2NameIDMgmt : public AbstractHandler, public RemotedHandler
{
public:
- SAML2NameIDMgmt(const DOMElement* e, const char* appId);
+ SAML2NameIDMgmt(const DOMElement* e, const char* appId, bool deprecationSupport=true);
virtual ~SAML2NameIDMgmt() {}
void receive(DDF& in, ostream& out);
@@ -134,13 +134,13 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SAML2NameIDMgmtFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SAML2NameIDMgmtFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML2NameIDMgmt(p.first, p.second);
+ return new SAML2NameIDMgmt(p.first, p.second, deprecationSupport);
}
};
-SAML2NameIDMgmt::SAML2NameIDMgmt(const DOMElement* e, const char* appId)
+SAML2NameIDMgmt::SAML2NameIDMgmt(const DOMElement* e, const char* appId, bool deprecationSupport)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".NameIDMgmt.SAML2"))
{
#ifndef SHIBSP_LITE
@@ -148,7 +148,7 @@ SAML2NameIDMgmt::SAML2NameIDMgmt(const DOMElement* e, const char* appId)
SAMLConfig& conf = SAMLConfig::getConfig();
// Handle incoming binding.
- m_decoder.reset(conf.MessageDecoderManager.newPlugin(getString("Binding").second, e));
+ m_decoder.reset(conf.MessageDecoderManager.newPlugin(getString("Binding").second, e, deprecationSupport));
m_decoder->setArtifactResolver(SPConfig::getConfig().getArtifactResolver());
if (m_decoder->isUserAgentPresent()) {
@@ -168,7 +168,7 @@ SAML2NameIDMgmt::SAML2NameIDMgmt(const DOMElement* e, const char* appId)
split(m_bindings, dupBindings, is_space(), algorithm::token_compress_on);
for (vector<string>::const_iterator b = m_bindings.begin(); b != m_bindings.end(); ++b) {
try {
- boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(*b, e));
+ boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(*b, e, deprecationSupport));
if (encoder->isUserAgentPresent() && XMLString::equals(getProtocolFamily(), encoder->getProtocolFamily())) {
m_encoders[*b] = encoder;
m_log.debug("supporting outgoing binding (%s)", b->c_str());
@@ -184,7 +184,7 @@ SAML2NameIDMgmt::SAML2NameIDMgmt(const DOMElement* e, const char* appId)
}
else {
pair<bool,const char*> b = getString("Binding");
- boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(b.second, e));
+ boost::shared_ptr<MessageEncoder> encoder(conf.MessageEncoderManager.newPlugin(b.second, e, deprecationSupport));
m_encoders[b.second] = encoder;
}
}
diff --git a/shibsp/handler/impl/SAML2SessionInitiator.cpp b/shibsp/handler/impl/SAML2SessionInitiator.cpp
index aea92d3..8c2d0cc 100644
--- a/shibsp/handler/impl/SAML2SessionInitiator.cpp
+++ b/shibsp/handler/impl/SAML2SessionInitiator.cpp
@@ -74,7 +74,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL SAML2SessionInitiator : public SessionInitiator, public AbstractHandler, public RemotedHandler
{
public:
- SAML2SessionInitiator(const DOMElement* e, const char* appId);
+ SAML2SessionInitiator(const DOMElement* e, const char* appId, bool deprecationSupport);
virtual ~SAML2SessionInitiator() {}
void init(const char* location); // encapsulates actions that need to run either in the c'tor or setParent
@@ -116,6 +116,7 @@ namespace shibsp {
) const;
string m_appId;
+ bool m_deprecationSupport;
auto_ptr_char m_paosNS,m_ecpNS;
auto_ptr_XMLCh m_paosBinding;
#ifndef SHIBSP_LITE
@@ -142,15 +143,16 @@ namespace shibsp {
static SHIBSP_DLLLOCAL SessionInitiatorNodeFilter g_SINFilter;
- SessionInitiator* SHIBSP_DLLLOCAL SAML2SessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL SAML2SessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool deprecationSupport)
{
- return new SAML2SessionInitiator(p.first, p.second);
+ return new SAML2SessionInitiator(p.first, p.second, deprecationSupport);
}
};
-SAML2SessionInitiator::SAML2SessionInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".SessionInitiator.SAML2"), &g_SINFilter, this), m_appId(appId),
+SAML2SessionInitiator::SAML2SessionInitiator(const DOMElement* e, const char* appId, bool deprecationSupport)
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".SessionInitiator.SAML2"), &g_SINFilter, this),
+ m_appId(appId), m_deprecationSupport(deprecationSupport),
m_paosNS(samlconstants::PAOS_NS), m_ecpNS(samlconstants::SAML20ECP_NS), m_paosBinding(samlconstants::SAML20_BINDING_PAOS)
#ifdef SHIBSP_LITE
,m_ecp(false)
@@ -200,7 +202,7 @@ void SAML2SessionInitiator::init(const char* location)
// If directed, build an ECP encoder.
if (flag.first && flag.second) {
try {
- m_ecp.reset(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_PAOS, getElement()));
+ m_ecp.reset(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_PAOS, getElement(), m_deprecationSupport));
}
catch (std::exception& ex) {
m_log.error("error building PAOS/ECP MessageEncoder: %s", ex.what());
@@ -221,7 +223,7 @@ void SAML2SessionInitiator::init(const char* location)
split(m_bindings, dupBindings, is_space(), algorithm::token_compress_on);
for (vector<string>::const_iterator b = m_bindings.begin(); b != m_bindings.end(); ++b) {
try {
- boost::shared_ptr<MessageEncoder> encoder(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(*b, getElement()));
+ boost::shared_ptr<MessageEncoder> encoder(SAMLConfig::getConfig().MessageEncoderManager.newPlugin(*b, getElement(), m_deprecationSupport));
if (encoder->isUserAgentPresent() && XMLString::equals(getProtocolFamily(), encoder->getProtocolFamily())) {
m_encoders[*b] = encoder;
m_log.debug("supporting outgoing binding (%s)", b->c_str());
diff --git a/shibsp/handler/impl/SAMLDSSessionInitiator.cpp b/shibsp/handler/impl/SAMLDSSessionInitiator.cpp
index 9e8d53d..f8130ea 100644
--- a/shibsp/handler/impl/SAMLDSSessionInitiator.cpp
+++ b/shibsp/handler/impl/SAMLDSSessionInitiator.cpp
@@ -114,7 +114,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SessionInitiator* SHIBSP_DLLLOCAL SAMLDSSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL SAMLDSSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new SAMLDSSessionInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/SessionHandler.cpp b/shibsp/handler/impl/SessionHandler.cpp
index df42abb..2e33491 100644
--- a/shibsp/handler/impl/SessionHandler.cpp
+++ b/shibsp/handler/impl/SessionHandler.cpp
@@ -66,7 +66,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL SessionHandlerFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL SessionHandlerFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new SessionHandler(p.first, p.second);
}
diff --git a/shibsp/handler/impl/SessionInitiator.cpp b/shibsp/handler/impl/SessionInitiator.cpp
index ca682db..88a9153 100644
--- a/shibsp/handler/impl/SessionInitiator.cpp
+++ b/shibsp/handler/impl/SessionInitiator.cpp
@@ -228,7 +228,7 @@ AuthnRequestEvent* SessionInitiator::newAuthnRequestEvent(const Application& app
if (!SPConfig::getConfig().isEnabled(SPConfig::Logging))
return nullptr;
try {
- auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(AUTHNREQUEST_EVENT, nullptr));
+ auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(AUTHNREQUEST_EVENT, nullptr, false));
AuthnRequestEvent* ar_event = dynamic_cast<AuthnRequestEvent*>(event.get());
if (ar_event) {
ar_event->m_request = request;
diff --git a/shibsp/handler/impl/Shib1SessionInitiator.cpp b/shibsp/handler/impl/Shib1SessionInitiator.cpp
index 4998f45..c4aed4c 100644
--- a/shibsp/handler/impl/Shib1SessionInitiator.cpp
+++ b/shibsp/handler/impl/Shib1SessionInitiator.cpp
@@ -106,7 +106,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SessionInitiator* SHIBSP_DLLLOCAL Shib1SessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL Shib1SessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new Shib1SessionInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/StatusHandler.cpp b/shibsp/handler/impl/StatusHandler.cpp
index 0e60562..1f27caf 100644
--- a/shibsp/handler/impl/StatusHandler.cpp
+++ b/shibsp/handler/impl/StatusHandler.cpp
@@ -83,7 +83,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- Handler* SHIBSP_DLLLOCAL StatusHandlerFactory(const pair<const DOMElement*,const char*>& p)
+ Handler* SHIBSP_DLLLOCAL StatusHandlerFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new StatusHandler(p.first, p.second);
}
diff --git a/shibsp/handler/impl/TransformSessionInitiator.cpp b/shibsp/handler/impl/TransformSessionInitiator.cpp
index 31cb1fb..2e6680c 100644
--- a/shibsp/handler/impl/TransformSessionInitiator.cpp
+++ b/shibsp/handler/impl/TransformSessionInitiator.cpp
@@ -136,7 +136,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SessionInitiator* SHIBSP_DLLLOCAL TransformSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL TransformSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new TransformSessionInitiator(p.first, p.second);
}
diff --git a/shibsp/handler/impl/WAYFSessionInitiator.cpp b/shibsp/handler/impl/WAYFSessionInitiator.cpp
index 3ced3f5..87ad37d 100644
--- a/shibsp/handler/impl/WAYFSessionInitiator.cpp
+++ b/shibsp/handler/impl/WAYFSessionInitiator.cpp
@@ -81,7 +81,7 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SessionInitiator* SHIBSP_DLLLOCAL WAYFSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p)
+ SessionInitiator* SHIBSP_DLLLOCAL WAYFSessionInitiatorFactory(const pair<const DOMElement*,const char*>& p, bool)
{
return new WAYFSessionInitiator(p.first, p.second);
}
diff --git a/shibsp/impl/ChainingAccessControl.cpp b/shibsp/impl/ChainingAccessControl.cpp
index 92f972d..1cd3c5a 100644
--- a/shibsp/impl/ChainingAccessControl.cpp
+++ b/shibsp/impl/ChainingAccessControl.cpp
@@ -46,7 +46,7 @@ namespace shibsp {
class ChainingAccessControl : public AccessControl
{
public:
- ChainingAccessControl(const DOMElement* e);
+ ChainingAccessControl(const DOMElement* e, bool deprecationSupport);
~ChainingAccessControl() {}
@@ -65,9 +65,9 @@ namespace shibsp {
ptr_vector<AccessControl> m_ac;
};
- AccessControl* SHIBSP_DLLLOCAL ChainingAccessControlFactory(const DOMElement* const & e)
+ AccessControl* SHIBSP_DLLLOCAL ChainingAccessControlFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingAccessControl(e);
+ return new ChainingAccessControl(e, deprecationSupport);
}
static const XMLCh _AccessControl[] = UNICODE_LITERAL_13(A,c,c,e,s,s,C,o,n,t,r,o,l);
@@ -76,7 +76,7 @@ namespace shibsp {
static const XMLCh AND[] = UNICODE_LITERAL_3(A,N,D);
static const XMLCh OR[] = UNICODE_LITERAL_2(O,R);
- extern AccessControl* SHIBSP_DLLLOCAL XMLAccessControlFactory(const DOMElement* const & e);
+ extern AccessControl* SHIBSP_DLLLOCAL XMLAccessControlFactory(const DOMElement* const & e, bool);
}
void SHIBSP_API shibsp::registerAccessControls()
@@ -95,7 +95,7 @@ AccessControl::~AccessControl()
{
}
-ChainingAccessControl::ChainingAccessControl(const DOMElement* e) : m_op(OP_AND)
+ChainingAccessControl::ChainingAccessControl(const DOMElement* e, bool deprecationSupport) : m_op(OP_AND)
{
const XMLCh* op = e ? e->getAttributeNS(nullptr, _operator) : nullptr;
if (XMLString::equals(op, OR))
@@ -108,7 +108,7 @@ ChainingAccessControl::ChainingAccessControl(const DOMElement* e) : m_op(OP_AND)
string t(XMLHelper::getAttrString(e, nullptr, _type));
if (!t.empty()) {
Category::getInstance(SHIBSP_LOGCAT ".AccessControl.Chaining").info("building AccessControl provider of type (%s)...", t.c_str());
- auto_ptr<AccessControl> np(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), e));
+ auto_ptr<AccessControl> np(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), e, deprecationSupport));
m_ac.push_back(np.get());
np.release();
}
diff --git a/shibsp/impl/StorageServiceSessionCache.cpp b/shibsp/impl/StorageServiceSessionCache.cpp
index 3d926d8..1558d15 100644
--- a/shibsp/impl/StorageServiceSessionCache.cpp
+++ b/shibsp/impl/StorageServiceSessionCache.cpp
@@ -75,7 +75,7 @@ using namespace xmltooling;
using namespace boost;
using namespace std;
-SessionCache* SHIBSP_DLLLOCAL StorageServiceCacheFactory(const DOMElement* const & e)
+SessionCache* SHIBSP_DLLLOCAL StorageServiceCacheFactory(const DOMElement* const & e, bool)
{
return new SSCache(e);
}
@@ -851,7 +851,7 @@ LogoutEvent* SSCache::newLogoutEvent(const Application& app) const
if (!SPConfig::getConfig().isEnabled(SPConfig::Logging))
return nullptr;
try {
- auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGOUT_EVENT, nullptr));
+ auto_ptr<TransactionLog::Event> event(SPConfig::getConfig().EventManager.newPlugin(LOGOUT_EVENT, nullptr, false));
LogoutEvent* logout_event = dynamic_cast<LogoutEvent*>(event.get());
if (logout_event) {
logout_event->m_app = &app;
diff --git a/shibsp/impl/TransactionLog.cpp b/shibsp/impl/TransactionLog.cpp
index 964b0a1..0a6ffae 100644
--- a/shibsp/impl/TransactionLog.cpp
+++ b/shibsp/impl/TransactionLog.cpp
@@ -57,17 +57,17 @@ using namespace xmltooling;
using namespace std;
namespace shibsp {
- TransactionLog::Event* SHIBSP_DLLLOCAL LoginEventFactory(void* const &)
+ TransactionLog::Event* SHIBSP_DLLLOCAL LoginEventFactory(void* const &, bool)
{
return new LoginEvent();
}
- TransactionLog::Event* SHIBSP_DLLLOCAL LogoutEventFactory(void* const &)
+ TransactionLog::Event* SHIBSP_DLLLOCAL LogoutEventFactory(void* const &, bool)
{
return new LogoutEvent();
}
- TransactionLog::Event* SHIBSP_DLLLOCAL AuthnRequestEventFactory(void* const &)
+ TransactionLog::Event* SHIBSP_DLLLOCAL AuthnRequestEventFactory(void* const &, bool)
{
return new AuthnRequestEvent();
}
diff --git a/shibsp/impl/XMLAccessControl.cpp b/shibsp/impl/XMLAccessControl.cpp
index 4fd8429..d71c4c7 100644
--- a/shibsp/impl/XMLAccessControl.cpp
+++ b/shibsp/impl/XMLAccessControl.cpp
@@ -110,8 +110,8 @@ namespace shibsp {
class XMLAccessControl : public AccessControl, public ReloadableXMLFile
{
public:
- XMLAccessControl(const DOMElement* e)
- : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AccessControl.XML")) {
+ XMLAccessControl(const DOMElement* e, bool deprecationSupport=true)
+ : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".AccessControl.XML"), true, deprecationSupport) {
background_load(); // guarantees an exception or the policy is loaded
}
@@ -132,9 +132,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- AccessControl* SHIBSP_DLLLOCAL XMLAccessControlFactory(const DOMElement* const & e)
+ AccessControl* SHIBSP_DLLLOCAL XMLAccessControlFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new XMLAccessControl(e);
+ return new XMLAccessControl(e, deprecationSupport);
}
static const XMLCh _AccessControl[] = UNICODE_LITERAL_13(A,c,c,e,s,s,C,o,n,t,r,o,l);
diff --git a/shibsp/impl/XMLApplication.cpp b/shibsp/impl/XMLApplication.cpp
index 58c9e05..95b677e 100644
--- a/shibsp/impl/XMLApplication.cpp
+++ b/shibsp/impl/XMLApplication.cpp
@@ -108,9 +108,11 @@ XMLApplication::XMLApplication(
const ServiceProvider* sp,
const ProtocolProvider* pp,
DOMElement* e,
+ bool deprecationSupport,
const XMLApplication* base,
DOMDocument* doc
- ) : Application(sp), m_base(base), m_acsDefault(nullptr), m_sessionInitDefault(nullptr), m_artifactResolutionDefault(nullptr), m_doc(doc)
+ ) : 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");
@@ -258,16 +260,16 @@ XMLApplication::XMLApplication(
"no TrustEngine specified or installed in legacy config, using default chain {%s, %s}",
EXPLICIT_KEY_TRUSTENGINE, SHIBBOLETH_PKIX_TRUSTENGINE
);
- m_trust.reset(xmlConf.TrustEngineManager.newPlugin(CHAINING_TRUSTENGINE, nullptr));
+ m_trust.reset(xmlConf.TrustEngineManager.newPlugin(CHAINING_TRUSTENGINE, nullptr, m_deprecationSupport));
ChainingTrustEngine* trustchain = dynamic_cast<ChainingTrustEngine*>(m_trust.get());
if (trustchain) {
- trustchain->addTrustEngine(xmlConf.TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr));
- trustchain->addTrustEngine(xmlConf.TrustEngineManager.newPlugin(SHIBBOLETH_PKIX_TRUSTENGINE, nullptr));
+ trustchain->addTrustEngine(xmlConf.TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr, m_deprecationSupport));
+ trustchain->addTrustEngine(xmlConf.TrustEngineManager.newPlugin(SHIBBOLETH_PKIX_TRUSTENGINE, nullptr, m_deprecationSupport));
}
}
else {
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_trust.reset(xmlConf.TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr, m_deprecationSupport));
}
}
}
@@ -293,7 +295,7 @@ XMLApplication::XMLApplication(
}
else if (child->hasAttributeNS(nullptr, _type)) {
string emtype(XMLHelper::getAttrString(child, nullptr, _type));
- boost::shared_ptr<EntityMatcher> em(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(emtype, child));
+ boost::shared_ptr<EntityMatcher> em(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(emtype, child, m_deprecationSupport));
boost::shared_ptr<DOMPropertySet> rp(new DOMPropertySet());
rp->load(child, nullptr, this);
rp->setParent(this);
@@ -315,7 +317,7 @@ XMLApplication::XMLApplication(
else if (child->hasAttributeNS(nullptr, _type)) {
DOMElement* rpclone = static_cast<DOMElement*>(child->cloneNode(true));
string emtype(XMLHelper::getAttrString(rpclone, nullptr, _type));
- boost::shared_ptr<EntityMatcher> em(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(emtype, rpclone));
+ boost::shared_ptr<EntityMatcher> em(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(emtype, rpclone, m_deprecationSupport));
boost::shared_ptr<DOMPropertySet> rp(new DOMPropertySet());
rp->load(rpclone, nullptr, this);
rp->setParent(this);
@@ -376,7 +378,7 @@ template <class T> T* XMLApplication::doChainedPlugins(
try {
if (!t.empty()) {
log.info("building %s of type %s...", pluginType, t.c_str());
- return pluginMgr.newPlugin(t.c_str(), child);
+ return pluginMgr.newPlugin(t.c_str(), child, m_deprecationSupport);
}
else {
throw ConfigurationException("$1 element had no type attribute.", params(1, pluginType));
@@ -387,7 +389,7 @@ template <class T> T* XMLApplication::doChainedPlugins(
if (dummyType) {
// Install a dummy version as a safety valve.
log.crit("installing safe %s in place of failed version", pluginType);
- return pluginMgr.newPlugin(dummyType, nullptr);
+ return pluginMgr.newPlugin(dummyType, nullptr, m_deprecationSupport);
}
}
}
@@ -469,7 +471,9 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
exportElement->setAttributeNS(nullptr,_acl,exportACL.second);
}
boost::shared_ptr<Handler> exportHandler(
- conf.HandlerManager.newPlugin(samlconstants::SAML20_BINDING_URI, pair<const DOMElement*,const char*>(exportElement, getId()))
+ conf.HandlerManager.newPlugin(
+ samlconstants::SAML20_BINDING_URI, pair<const DOMElement*,const char*>(exportElement, getId()), m_deprecationSupport
+ )
);
m_handlers.push_back(exportHandler);
@@ -536,7 +540,9 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
child = XMLHelper::getNextSiblingElement(child);
continue;
}
- handler.reset(conf.AssertionConsumerServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId())));
+ handler.reset(
+ conf.AssertionConsumerServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport)
+ );
// Map by protocol.
const XMLCh* protfamily = handler->getProtocolFamily();
if (protfamily)
@@ -563,7 +569,7 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
continue;
}
boost::shared_ptr<SessionInitiator> sihandler(
- conf.SessionInitiatorManager.newPlugin(t.c_str(), pair<const DOMElement*,const char*>(child, getId()))
+ conf.SessionInitiatorManager.newPlugin(t.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport)
);
handler = sihandler;
pair<bool,const char*> si_id = handler->getString("id");
@@ -589,7 +595,9 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
child = XMLHelper::getNextSiblingElement(child);
continue;
}
- handler.reset(conf.LogoutInitiatorManager.newPlugin(t.c_str(), pair<const DOMElement*,const char*>(child, getId())));
+ handler.reset(
+ conf.LogoutInitiatorManager.newPlugin(t.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport)
+ );
}
else if (XMLString::equals(child->getLocalName(), _ArtifactResolutionService)) {
string bindprop(XMLHelper::getAttrString(child, nullptr, Binding));
@@ -598,7 +606,9 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
child = XMLHelper::getNextSiblingElement(child);
continue;
}
- handler.reset(conf.ArtifactResolutionServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId())));
+ handler.reset(
+ conf.ArtifactResolutionServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport)
+ );
if (!hardArt) {
pair<bool,bool> defprop = handler->getBool("isDefault");
@@ -619,7 +629,9 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
child = XMLHelper::getNextSiblingElement(child);
continue;
}
- handler.reset(conf.SingleLogoutServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId())));
+ handler.reset(
+ conf.SingleLogoutServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport)
+ );
}
else if (XMLString::equals(child->getLocalName(), _ManageNameIDService)) {
string bindprop(XMLHelper::getAttrString(child, nullptr, Binding));
@@ -628,7 +640,9 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
child = XMLHelper::getNextSiblingElement(child);
continue;
}
- handler.reset(conf.ManageNameIDServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId())));
+ handler.reset(
+ conf.ManageNameIDServiceManager.newPlugin(bindprop.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport)
+ );
}
else {
string t(XMLHelper::getAttrString(child, nullptr, _type));
@@ -637,7 +651,7 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
child = XMLHelper::getNextSiblingElement(child);
continue;
}
- handler.reset(conf.HandlerManager.newPlugin(t.c_str(), pair<const DOMElement*,const char*>(child, getId())));
+ handler.reset(conf.HandlerManager.newPlugin(t.c_str(), pair<const DOMElement*,const char*>(child, getId()), m_deprecationSupport));
}
m_handlers.push_back(handler);
@@ -727,7 +741,7 @@ void XMLApplication::doSSO(const ProtocolProvider& pp, set<string>& protocols, D
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())
+ (*b)->getString("id").second, pair<const DOMElement*,const char*>(acsdom, getId()), m_deprecationSupport
)
);
m_handlers.push_back(handler);
@@ -787,7 +801,7 @@ void XMLApplication::doSSO(const ProtocolProvider& pp, set<string>& protocols, D
// 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()))
+ conf.SessionInitiatorManager.newPlugin(CHAINING_SESSION_INITIATOR, pair<const DOMElement*,const char*>(e, getId()), m_deprecationSupport)
);
m_handlers.push_back(chain);
m_sessionInitDefault = chain.get();
@@ -861,7 +875,7 @@ void XMLApplication::doLogout(const ProtocolProvider& pp, set<string>& protocols
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()))
+ conf.SingleLogoutServiceManager.newPlugin((*b)->getString("id").second, pair<const DOMElement*,const char*>(slodom, getId()), m_deprecationSupport)
);
m_handlers.push_back(handler);
@@ -894,7 +908,7 @@ void XMLApplication::doLogout(const ProtocolProvider& pp, set<string>& protocols
// 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()))
+ 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();
@@ -945,7 +959,9 @@ void XMLApplication::doNameIDMgmt(const ProtocolProvider& pp, set<string>& proto
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()))
+ conf.ManageNameIDServiceManager.newPlugin(
+ (*b)->getString("id").second, pair<const DOMElement*,const char*>(nimdom, getId()), m_deprecationSupport
+ )
);
m_handlers.push_back(handler);
@@ -997,7 +1013,9 @@ void XMLApplication::doArtifactResolution(const ProtocolProvider& pp, const char
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()))
+ conf.ArtifactResolutionServiceManager.newPlugin(
+ (*b)->getString("id").second, pair<const DOMElement*,const char*>(artdom, getId()), m_deprecationSupport
+ )
);
m_handlers.push_back(handler);
diff --git a/shibsp/impl/XMLApplication.h b/shibsp/impl/XMLApplication.h
index 57edeae..89afec3 100644
--- a/shibsp/impl/XMLApplication.h
+++ b/shibsp/impl/XMLApplication.h
@@ -81,6 +81,7 @@ namespace shibsp {
const ServiceProvider*,
const ProtocolProvider*,
xercesc::DOMElement*,
+ bool deprecationSupport,
const XMLApplication* base=nullptr,
xercesc::DOMDocument* doc=nullptr);
virtual ~XMLApplication();
@@ -226,6 +227,7 @@ namespace shibsp {
} m_redirectLimit;
std::vector<std::string> m_redirectWhitelist;
+ bool m_deprecationSupport;
xercesc::DOMDocument* m_doc;
};
diff --git a/shibsp/impl/XMLRequestMapper.cpp b/shibsp/impl/XMLRequestMapper.cpp
index ee4dede..08e95fb 100644
--- a/shibsp/impl/XMLRequestMapper.cpp
+++ b/shibsp/impl/XMLRequestMapper.cpp
@@ -122,7 +122,8 @@ namespace shibsp {
class XMLRequestMapper : public RequestMapper, public ReloadableXMLFile
{
public:
- XMLRequestMapper(const DOMElement* e) : ReloadableXMLFile(e,Category::getInstance(SHIBSP_LOGCAT ".RequestMapper")) {
+ XMLRequestMapper(const DOMElement* e, bool deprecationSupport=true)
+ : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".RequestMapper"), true, deprecationSupport) {
background_load();
}
@@ -143,9 +144,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- RequestMapper* SHIBSP_DLLLOCAL XMLRequestMapperFactory(const DOMElement* const & e)
+ RequestMapper* SHIBSP_DLLLOCAL XMLRequestMapperFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new XMLRequestMapper(e);
+ return new XMLRequestMapper(e, deprecationSupport);
}
static const XMLCh _AccessControl[] = UNICODE_LITERAL_13(A,c,c,e,s,s,C,o,n,t,r,o,l);
@@ -180,17 +181,18 @@ RequestMapper::~RequestMapper()
void Override::loadACL(const DOMElement* e, Category& log)
{
+ bool deprecationSupport = e ? XMLString::equals(e->getNamespaceURI(), shibspconstants::SHIB2SPCONFIG_NS) : false;
try {
const DOMElement* acl = XMLHelper::getFirstChildElement(e,htaccess);
if (acl) {
log.info("building Apache htaccess AccessControl provider...");
- m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(HT_ACCESS_CONTROL,acl));
+ m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(HT_ACCESS_CONTROL,acl, deprecationSupport));
}
else {
acl = XMLHelper::getFirstChildElement(e,_AccessControl);
if (acl) {
log.info("building XML-based AccessControl provider...");
- m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(XML_ACCESS_CONTROL,acl));
+ m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(XML_ACCESS_CONTROL,acl, deprecationSupport));
}
else {
acl = XMLHelper::getFirstChildElement(e,AccessControlProvider);
@@ -198,7 +200,7 @@ void Override::loadACL(const DOMElement* e, Category& log)
string t(XMLHelper::getAttrString(acl, nullptr, _type));
if (!t.empty()) {
log.info("building AccessControl provider of type %s...", t.c_str());
- m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), acl));
+ m_acl.reset(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), acl, deprecationSupport));
}
else {
throw ConfigurationException("<AccessControlProvider> missing type attribute.");
@@ -207,7 +209,7 @@ void Override::loadACL(const DOMElement* e, Category& log)
}
}
}
- catch (std::exception& ex) {
+ catch (const std::exception& ex) {
log.crit("exception building AccessControl provider: %s", ex.what());
m_acl.reset(new AccessControlDummy());
}
@@ -293,7 +295,7 @@ Override::Override(bool unicodeAware, const DOMElement* e, Category& log, const
}
free(dup);
}
- catch (std::exception&) {
+ catch (const std::exception&) {
free(dup);
throw;
}
@@ -325,7 +327,7 @@ Override::Override(bool unicodeAware, const DOMElement* e, Category& log, const
boost::shared_ptr<RegularExpression> re(new RegularExpression(n, caseSensitive ? &chNull : caseInsensitiveOption));
m_regexps.push_back(make_pair(re, o));
}
- catch (XMLException& ex) {
+ catch (const XMLException& ex) {
auto_ptr_char tmp(ex.getMessage());
log.error("caught exception while parsing PathRegex regular expression (%d): %s", i, tmp.get());
throw ConfigurationException("Invalid regular expression in PathRegex element.");
@@ -352,7 +354,7 @@ Override::Override(bool unicodeAware, const DOMElement* e, Category& log, const
boost::shared_ptr<RegularExpression> re((v && *v) ? new RegularExpression(v) : nullptr);
m_queries.push_back(boost::make_tuple(string(ntemp.get()), re, o));
}
- catch (XMLException& ex) {
+ catch (const XMLException& ex) {
auto_ptr_char tmp(ex.getMessage());
log.error("caught exception while parsing Query regular expression (%d): %s", i, tmp.get());
throw ConfigurationException("Invalid regular expression in Query element.");
@@ -413,7 +415,7 @@ const Override* Override::locate(const HTTPRequest& request) const
o = re->second.get();
break;
}
- } catch (XMLException& ex) {
+ } catch (const XMLException& ex) {
auto_ptr_char tmp(ex.getMessage());
throw ConfigurationException("Caught exception while matching PathRegex : $1", params(1, tmp.get()));
}
@@ -472,7 +474,7 @@ XMLRequestMapperImpl::XMLRequestMapperImpl(const DOMElement* e, Category& log) :
}
if (XMLString::equals(e->getNamespaceURI(), shibspconstants::SHIB2SPCONFIG_NS)) {
- log.warn("detected legacy 2.0 configuration, support will be removed from a future version of the software");
+ log.warn("DEPRECATED: legacy 2.0 configuration, support will be removed from a future version of the software");
}
// Load the property set.
@@ -507,7 +509,7 @@ XMLRequestMapperImpl::XMLRequestMapperImpl(const DOMElement* e, Category& log) :
);
m_regexps.push_back(make_pair(re, o));
}
- catch (XMLException& ex) {
+ catch (const XMLException& ex) {
auto_ptr_char tmp(ex.getMessage());
log.error("caught exception while parsing HostRegex regular expression (%d): %s", i, tmp.get());
}
@@ -676,7 +678,7 @@ RequestMapper::Settings XMLRequestMapper::getSettings(const HTTPRequest& request
const Override* o = m_impl->findOverride(vhost.c_str(), request);
return Settings(o, o->getAC());
}
- catch (XMLException& ex) {
+ catch (const XMLException& ex) {
auto_ptr_char tmp(ex.getMessage());
m_log.error("caught exception while locating content settings: %s", tmp.get());
throw ConfigurationException("XML-based RequestMapper failed to retrieve content settings.");
diff --git a/shibsp/impl/XMLSecurityPolicyProvider.cpp b/shibsp/impl/XMLSecurityPolicyProvider.cpp
index 1f4dc2a..a4f0f6b 100644
--- a/shibsp/impl/XMLSecurityPolicyProvider.cpp
+++ b/shibsp/impl/XMLSecurityPolicyProvider.cpp
@@ -87,8 +87,8 @@ namespace shibsp {
class XMLSecurityPolicyProvider : public SecurityPolicyProvider, public ReloadableXMLFile
{
public:
- XMLSecurityPolicyProvider(const DOMElement* e)
- : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".SecurityPolicyProvider.XML")) {
+ XMLSecurityPolicyProvider(const DOMElement* e, bool deprecationSupport=true)
+ : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT ".SecurityPolicyProvider.XML"), true, deprecationSupport) {
background_load(); // guarantees an exception or the policy is loaded
}
@@ -135,9 +135,9 @@ namespace shibsp {
#pragma warning( pop )
#endif
- SecurityPolicyProvider* SHIBSP_DLLLOCAL XMLSecurityPolicyProviderFactory(const DOMElement* const & e)
+ SecurityPolicyProvider* SHIBSP_DLLLOCAL XMLSecurityPolicyProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new XMLSecurityPolicyProvider(e);
+ return new XMLSecurityPolicyProvider(e, deprecationSupport);
}
class SHIBSP_DLLLOCAL PolicyNodeFilter : public DOMNodeFilter
@@ -200,8 +200,10 @@ XMLSecurityPolicyProviderImpl::XMLSecurityPolicyProviderImpl(const DOMElement* e
throw ConfigurationException("XML SecurityPolicyProvider requires conf:SecurityPolicies at root of configuration.");
}
+ bool deprecationSupport = false;
if (XMLString::equals(e->getNamespaceURI(), shibspconstants::SHIB2SPCONFIG_NS)) {
- log.warn("detected legacy 2.0 configuration, support will be removed from a future version of the software");
+ log.warn("DEPRECATED: legacy 2.0 configuration, support will be removed from a future version of the software");
+ deprecationSupport = true;
}
const XMLCh* algs = nullptr;
@@ -250,7 +252,7 @@ XMLSecurityPolicyProviderImpl::XMLSecurityPolicyProviderImpl(const DOMElement* e
string t(XMLHelper::getAttrString(rule, nullptr, _type));
if (!t.empty()) {
try {
- boost::shared_ptr<SecurityPolicyRule> ptr(samlConf.SecurityPolicyRuleManager.newPlugin(t.c_str(), rule));
+ boost::shared_ptr<SecurityPolicyRule> ptr(samlConf.SecurityPolicyRuleManager.newPlugin(t.c_str(), rule, deprecationSupport));
m_ruleJanitor.push_back(ptr);
rules.second.push_back(ptr.get());
}
@@ -269,7 +271,7 @@ XMLSecurityPolicyProviderImpl::XMLSecurityPolicyProviderImpl(const DOMElement* e
string t(XMLHelper::getAttrString(rule, nullptr, _type));
if (!t.empty()) {
try {
- boost::shared_ptr<SecurityPolicyRule> ptr(samlConf.SecurityPolicyRuleManager.newPlugin(t.c_str(), rule));
+ boost::shared_ptr<SecurityPolicyRule> ptr(samlConf.SecurityPolicyRuleManager.newPlugin(t.c_str(), rule, deprecationSupport));
m_ruleJanitor.push_back(ptr);
rules.second.push_back(ptr.get());
}
@@ -282,7 +284,7 @@ XMLSecurityPolicyProviderImpl::XMLSecurityPolicyProviderImpl(const DOMElement* e
// Manually add a basic Conditions rule.
log.warn("installing a default Conditions rule in policy (%s) for compatibility with legacy configuration", id.c_str());
- boost::shared_ptr<SecurityPolicyRule> cptr(samlConf.SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, nullptr));
+ boost::shared_ptr<SecurityPolicyRule> cptr(samlConf.SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, nullptr, deprecationSupport));
m_ruleJanitor.push_back(cptr);
rules.second.push_back(cptr.get());
}
diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp
index 0275e59..4a5786e 100644
--- a/shibsp/impl/XMLServiceProvider.cpp
+++ b/shibsp/impl/XMLServiceProvider.cpp
@@ -120,9 +120,9 @@ namespace {
};
namespace shibsp {
- ServiceProvider* XMLServiceProviderFactory(const DOMElement* const & e)
+ ServiceProvider* XMLServiceProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new XMLConfig(e);
+ return new XMLConfig(e, deprecationSupport);
}
};
@@ -206,7 +206,7 @@ void XMLConfigImpl::doListener(const DOMElement* e, XMLConfig* conf, Category& l
}
log.info("building ListenerService of type %s...", plugtype.c_str());
- conf->m_listener.reset(SPConfig::getConfig().ListenerServiceManager.newPlugin(plugtype.c_str(), child));
+ conf->m_listener.reset(SPConfig::getConfig().ListenerServiceManager.newPlugin(plugtype.c_str(), child, m_deprecationSupport));
}
void XMLConfigImpl::doCaching(const DOMElement* e, XMLConfig* conf, Category& log)
@@ -228,7 +228,8 @@ void XMLConfigImpl::doCaching(const DOMElement* e, XMLConfig* conf, Category& lo
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));
+ 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());
@@ -239,7 +240,9 @@ void XMLConfigImpl::doCaching(const DOMElement* e, XMLConfig* conf, Category& lo
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));
+ conf->m_storage["mem"] = boost::shared_ptr<StorageService>(
+ xmlConf.StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, nullptr, m_deprecationSupport)
+ );
}
// Replay cache.
@@ -299,16 +302,17 @@ void XMLConfigImpl::doCaching(const DOMElement* e, XMLConfig* conf, Category& lo
string t(XMLHelper::getAttrString(child, nullptr, _type));
if (!t.empty()) {
log.info("building SessionCache of type %s...", t.c_str());
- conf->m_sessionCache.reset(spConf.SessionCacheManager.newPlugin(t.c_str(), child));
+ conf->m_sessionCache.reset(spConf.SessionCacheManager.newPlugin(t.c_str(), child, m_deprecationSupport));
}
}
if (!conf->m_sessionCache) {
log.info("no SessionCache specified, using StorageService-backed instance");
- conf->m_sessionCache.reset(spConf.SessionCacheManager.newPlugin(STORAGESERVICE_SESSION_CACHE, nullptr));
+ conf->m_sessionCache.reset(spConf.SessionCacheManager.newPlugin(STORAGESERVICE_SESSION_CACHE, nullptr, m_deprecationSupport));
}
}
-XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer, Category& log) : m_document(nullptr), m_defaultApplication(nullptr)
+XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer, Category& log)
+ : m_document(nullptr), m_defaultApplication(nullptr), m_deprecationSupport(false)
{
#ifdef _DEBUG
xmltooling::NDC ndc("XMLConfigImpl");
@@ -378,7 +382,8 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
#endif
if (XMLString::equals(e->getNamespaceURI(), shibspconstants::SHIB2SPCONFIG_NS)) {
- log.warn("detected legacy 2.0 configuration, support will be removed from a future version of the software");
+ log.warn("DEPRECATED: legacy 2.0 configuration, support will be removed from a future version of the software");
+ m_deprecationSupport = true;
}
// First load any property sets.
@@ -440,7 +445,9 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
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));
+ 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());
@@ -458,7 +465,7 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
string t(XMLHelper::getAttrString(child, nullptr, _type));
if (!t.empty()) {
log.info("building RequestMapper of type %s...", t.c_str());
- m_requestMapper.reset(conf.RequestMapperManager.newPlugin(t.c_str(), child));
+ m_requestMapper.reset(conf.RequestMapperManager.newPlugin(t.c_str(), child, m_deprecationSupport));
}
}
if (!m_requestMapper) {
@@ -467,7 +474,7 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
DOMElement* mapperDummy = e->getOwnerDocument()->createElementNS(e->getNamespaceURI(), RequestMap);
mapperDummy->setAttributeNS(nullptr, applicationId, _default);
child->appendChild(mapperDummy);
- m_requestMapper.reset(conf.RequestMapperManager.newPlugin(NATIVE_REQUEST_MAPPER, child));
+ m_requestMapper.reset(conf.RequestMapperManager.newPlugin(NATIVE_REQUEST_MAPPER, child, m_deprecationSupport));
}
}
@@ -477,7 +484,7 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
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_policy.reset(conf.SecurityPolicyProviderManager.newPlugin(t.c_str(), child, m_deprecationSupport));
}
else {
throw ConfigurationException("can't build SecurityPolicyProvider, no type specified");
@@ -488,7 +495,7 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
DOMElement* polwrapper = e->getOwnerDocument()->createElementNS(nullptr, _SecurityPolicyProvider);
polwrapper->appendChild(child);
log.warn("DEPRECATED: inline SecurityPolicy configuration, externalize via <SecurityPolicyProvider>");
- m_policy.reset(conf.SecurityPolicyProviderManager.newPlugin(XML_SECURITYPOLICY_PROVIDER, polwrapper));
+ m_policy.reset(conf.SecurityPolicyProviderManager.newPlugin(XML_SECURITYPOLICY_PROVIDER, polwrapper, m_deprecationSupport));
}
else {
log.fatal("can't build SecurityPolicyProvider, missing conf:SecurityPolicyProvider element?");
@@ -540,7 +547,7 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
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_protocolProvider.reset(conf.ProtocolProviderManager.newPlugin(t.c_str(), child, m_deprecationSupport));
}
}
}
@@ -552,14 +559,14 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
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));
+ boost::shared_ptr<XMLApplication> defapp(new XMLApplication(outer, m_protocolProvider.get(), 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, defapp.get()));
+ boost::shared_ptr<XMLApplication> iapp(new XMLApplication(outer, m_protocolProvider.get(), override, m_deprecationSupport, defapp.get()));
if (m_appmap.count(iapp->getId()))
log.crit("found conf:ApplicationOverride element with duplicate id attribute (%s), skipping it", iapp->getId());
else
@@ -621,7 +628,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_defaultApplication, doc)
+ new XMLApplication(config, m_protocolProvider.get(), doc->getDocumentElement(), m_deprecationSupport, m_defaultApplication, doc)
);
return iapp;
}
@@ -889,8 +896,9 @@ Remoted* XMLConfig::lookupListener(const char* address) const
return nullptr;
}
-XMLConfig::XMLConfig(const DOMElement* e)
- : ReloadableXMLFile(e, xmltooling::logging::Category::getInstance(SHIBSP_LOGCAT ".Config")), m_listenerLock(RWLock::create())
+XMLConfig::XMLConfig(const DOMElement* e, bool deprecationSupport)
+ : ReloadableXMLFile(e, xmltooling::logging::Category::getInstance(SHIBSP_LOGCAT ".Config"), true, deprecationSupport),
+ m_listenerLock(RWLock::create())
{
}
diff --git a/shibsp/impl/XMLServiceProvider.h b/shibsp/impl/XMLServiceProvider.h
index 0b5e22b..0886b28 100644
--- a/shibsp/impl/XMLServiceProvider.h
+++ b/shibsp/impl/XMLServiceProvider.h
@@ -94,6 +94,7 @@ namespace shibsp {
xercesc::DOMDocument* m_document;
const XMLApplication* m_defaultApplication;
+ bool m_deprecationSupport;
};
class SHIBSP_DLLLOCAL XMLConfig : public ServiceProvider, public xmltooling::ReloadableXMLFile
@@ -102,7 +103,7 @@ namespace shibsp {
#endif
{
public:
- XMLConfig(const xercesc::DOMElement* e);
+ XMLConfig(const xercesc::DOMElement* e, bool deprecationSupport=true);
virtual ~XMLConfig();
void init() {
diff --git a/shibsp/metadata/DynamicMetadataProvider.cpp b/shibsp/metadata/DynamicMetadataProvider.cpp
index ae03686..41cd687 100644
--- a/shibsp/metadata/DynamicMetadataProvider.cpp
+++ b/shibsp/metadata/DynamicMetadataProvider.cpp
@@ -75,7 +75,7 @@ namespace shibsp {
class SHIBSP_DLLLOCAL DynamicMetadataProvider : public AbstractDynamicMetadataProvider
{
public:
- DynamicMetadataProvider(const xercesc::DOMElement* e=nullptr);
+ DynamicMetadataProvider(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
virtual ~DynamicMetadataProvider() {}
@@ -101,9 +101,9 @@ namespace shibsp {
};
- MetadataProvider* SHIBSP_DLLLOCAL DynamicMetadataProviderFactory(const DOMElement* const & e)
+ MetadataProvider* SHIBSP_DLLLOCAL DynamicMetadataProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new DynamicMetadataProvider(e);
+ return new DynamicMetadataProvider(e, deprecationSupport);
}
static const XMLCh encoded[] = UNICODE_LITERAL_7(e,n,c,o,d,e,d);
@@ -122,8 +122,8 @@ namespace shibsp {
bool DynamicMetadataProvider::s_artifactWarned(false);
-DynamicMetadataProvider::DynamicMetadataProvider(const DOMElement* e)
- : MetadataProvider(e), AbstractDynamicMetadataProvider(true, e),
+DynamicMetadataProvider::DynamicMetadataProvider(const DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(e, deprecationSupport), AbstractDynamicMetadataProvider(true, e, deprecationSupport),
m_log( Category::getInstance(SHIBSP_LOGCAT ".MetadataProvider.Dynamic")),
m_verifyHost(XMLHelper::getAttrBool(e, true, verifyHost)),
m_ignoreTransport(XMLHelper::getAttrBool(e, false, ignoreTransport)),
@@ -176,12 +176,12 @@ DynamicMetadataProvider::DynamicMetadataProvider(const DOMElement* e)
child = XMLHelper::getFirstChildElement(e, _TrustEngine);
string t = XMLHelper::getAttrString(child, nullptr, _type);
if (!t.empty()) {
- auto_ptr<TrustEngine> trust(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), child));
+ auto_ptr<TrustEngine> trust(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), child, deprecationSupport));
if (!dynamic_cast<X509TrustEngine*>(trust.get())) {
throw ConfigurationException("Dynamic MetadataProvider requires X509TrustEngine plugin.");
}
m_trust.reset(dynamic_cast<X509TrustEngine*>(trust.release()));
- m_dummyCR.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr));
+ m_dummyCR.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr, deprecationSupport));
}
if (!m_trust || !m_dummyCR)
@@ -294,7 +294,7 @@ EntityDescriptor* DynamicMetadataProvider::resolve(const MetadataProvider::Crite
string scheme(addr.m_endpoint, pch - addr.m_endpoint);
boost::scoped_ptr<SOAPTransport> transport;
try {
- transport.reset(XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr));
+ transport.reset(XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr, false));
}
catch (const exception& ex) {
m_log.error("exception while building transport object to resolve URL: %s", ex.what());
diff --git a/shibsp/remoting/impl/TCPListener.cpp b/shibsp/remoting/impl/TCPListener.cpp
index f4b91e1..25d4474 100644
--- a/shibsp/remoting/impl/TCPListener.cpp
+++ b/shibsp/remoting/impl/TCPListener.cpp
@@ -97,7 +97,7 @@ namespace shibsp {
#endif
};
- ListenerService* SHIBSP_DLLLOCAL TCPListenerServiceFactory(const DOMElement* const & e)
+ ListenerService* SHIBSP_DLLLOCAL TCPListenerServiceFactory(const DOMElement* const & e, bool)
{
return new TCPListener(e);
}
diff --git a/shibsp/remoting/impl/UnixListener.cpp b/shibsp/remoting/impl/UnixListener.cpp
index 0e52720..6a0a80e 100644
--- a/shibsp/remoting/impl/UnixListener.cpp
+++ b/shibsp/remoting/impl/UnixListener.cpp
@@ -79,7 +79,7 @@ namespace shibsp {
mutable bool m_bound;
};
- ListenerService* SHIBSP_DLLLOCAL UnixListenerServiceFactory(const DOMElement* const & e)
+ ListenerService* SHIBSP_DLLLOCAL UnixListenerServiceFactory(const DOMElement* const & e, bool)
{
return new UnixListener(e);
}
diff --git a/shibsp/security/PKIXTrustEngine.cpp b/shibsp/security/PKIXTrustEngine.cpp
index 679390a..b252530 100644
--- a/shibsp/security/PKIXTrustEngine.cpp
+++ b/shibsp/security/PKIXTrustEngine.cpp
@@ -82,7 +82,7 @@ namespace shibsp {
SHIBSP_DLLLOCAL PluginManager<TrustEngine,string,const DOMElement*>::Factory PKIXTrustEngineFactory;
- TrustEngine* SHIBSP_DLLLOCAL PKIXTrustEngineFactory(const DOMElement* const & e)
+ TrustEngine* SHIBSP_DLLLOCAL PKIXTrustEngineFactory(const DOMElement* const & e, bool)
{
return new PKIXTrustEngine(e);
}
diff --git a/shibsp/util/DOMPropertySet.cpp b/shibsp/util/DOMPropertySet.cpp
index ccf84c1..961b455 100644
--- a/shibsp/util/DOMPropertySet.cpp
+++ b/shibsp/util/DOMPropertySet.cpp
@@ -68,7 +68,7 @@ const char* DOMPropertySet::STLRemapper::remap(const char* src, xmltooling::logg
{
map<string,string>::const_iterator i = src ? m_rules.find(src) : m_rules.end();
if (i != m_rules.end()) {
- log.warn("DEPRECATED configuration - remapping property/set (%s) to (%s)", src, i->second.c_str());
+ log.info("DEPRECATED: legacy configuration, remapping property/set (%s) to (%s)", src, i->second.c_str());
return i->second.c_str();
}
else {
diff --git a/unittests/DynamicMetadataProviderTest.h b/unittests/DynamicMetadataProviderTest.h
index c3ae016..25a42d1 100644
--- a/unittests/DynamicMetadataProviderTest.h
+++ b/unittests/DynamicMetadataProviderTest.h
@@ -80,7 +80,7 @@ private:
ParserPool& pool = xcf.getParser();
XercesJanitor<DOMDocument> janitor(pool.parse(in));
scoped_ptr<MetadataProvider> metadataProvider(
- opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(type, janitor.get()->getDocumentElement())
+ opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(type, janitor.get()->getDocumentElement(), false)
);
ta::TestApplication testApp(SPConfig::getConfig().getServiceProvider(), metadataProvider.get());
@@ -145,7 +145,7 @@ private:
ParserPool& pool = xcf.getParser();
XercesJanitor<DOMDocument> janitor(pool.parse(in));
scoped_ptr<MetadataProvider> metadataProvider(
- opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(DYNAMIC_METADATA_PROVIDER, janitor.get()->getDocumentElement())
+ opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(DYNAMIC_METADATA_PROVIDER, janitor.get()->getDocumentElement(), false)
);
ta::TestApplication testApp(SPConfig::getConfig().getServiceProvider(), metadataProvider.get());
@@ -190,7 +190,7 @@ public:
ParserPool& pool = xcf.getParser();
XercesJanitor<DOMDocument> janitor(pool.parse(in));
scoped_ptr<MetadataProvider> metadataProvider(
- opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(DYNAMIC_METADATA_PROVIDER, janitor.get()->getDocumentElement())
+ opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(DYNAMIC_METADATA_PROVIDER, janitor.get()->getDocumentElement(), false)
);
ta::TestApplication testApp(SPConfig::getConfig().getServiceProvider(), metadataProvider.get());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list