[cpp-opensaml] branch master updated: SSPCPP-778 - Fork configuration and address backward compatibility
Scott Cantor
cantor.2 at osu.edu
Thu Jun 7 19:56:19 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=1a9c6b56c8a3e4b7d8e34be68805fc3905eec69f
The following commit(s) were added to refs/heads/master by this push:
new 1a9c6b5 SSPCPP-778 - Fork configuration and address backward compatibility
1a9c6b5 is described below
commit 1a9c6b56c8a3e4b7d8e34be68805fc3905eec69f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 7 19:56:06 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.
---
saml/binding/impl/ClientCertAuthRule.cpp | 2 +-
saml/binding/impl/MessageFlowRule.cpp | 2 +-
saml/binding/impl/NullSecurityRule.cpp | 2 +-
saml/binding/impl/SAMLArtifact.cpp | 2 +-
saml/binding/impl/SimpleSigningRule.cpp | 2 +-
saml/binding/impl/XMLSigningRule.cpp | 2 +-
saml/profile/impl/AudienceRestrictionRule.cpp | 2 +-
saml/profile/impl/ConditionsRule.cpp | 10 +--
saml/profile/impl/IgnoreRule.cpp | 2 +-
saml/saml1/binding/impl/SAML1ArtifactDecoder.cpp | 2 +-
saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp | 2 +-
saml/saml1/binding/impl/SAML1POSTDecoder.cpp | 2 +-
saml/saml1/binding/impl/SAML1POSTEncoder.cpp | 2 +-
saml/saml1/binding/impl/SAML1SOAPDecoder.cpp | 2 +-
saml/saml1/binding/impl/SAML1SOAPEncoder.cpp | 2 +-
saml/saml1/binding/impl/SAMLArtifactType0001.cpp | 2 +-
saml/saml1/binding/impl/SAMLArtifactType0002.cpp | 2 +-
saml/saml1/profile/impl/SAML1BrowserSSORule.cpp | 2 +-
saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2ArtifactType0004.cpp | 2 +-
saml/saml2/binding/impl/SAML2ECPDecoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2ECPEncoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2POSTDecoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2POSTEncoder.cpp | 4 +-
saml/saml2/binding/impl/SAML2RedirectDecoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2RedirectEncoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2SOAPDecoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2SOAPEncoder.cpp | 2 +-
.../metadata/AbstractDynamicMetadataProvider.h | 3 +-
saml/saml2/metadata/AbstractMetadataProvider.h | 3 +-
saml/saml2/metadata/DiscoverableMetadataProvider.h | 3 +-
saml/saml2/metadata/MetadataProvider.h | 6 +-
saml/saml2/metadata/ObservableMetadataProvider.h | 3 +-
.../impl/AbstractDynamicMetadataProvider.cpp | 4 +-
.../metadata/impl/AbstractMetadataProvider.cpp | 7 +-
.../metadata/impl/BlacklistMetadataFilter.cpp | 8 +-
.../metadata/impl/ChainingMetadataProvider.cpp | 13 ++--
.../metadata/impl/DiscoverableMetadataProvider.cpp | 10 +--
.../impl/EntityAttributesEntityMatcher.cpp | 2 +-
.../impl/EntityAttributesMetadataFilter.cpp | 2 +-
.../metadata/impl/EntityRoleMetadataFilter.cpp | 2 +-
.../saml2/metadata/impl/FolderMetadataProvider.cpp | 4 +-
.../metadata/impl/LocalDynamicMetadataProvider.cpp | 2 +-
saml/saml2/metadata/impl/MetadataProvider.cpp | 85 +++++++++++-----------
saml/saml2/metadata/impl/NameEntityMatcher.cpp | 2 +-
saml/saml2/metadata/impl/NullMetadataProvider.cpp | 2 +-
.../metadata/impl/ObservableMetadataProvider.cpp | 4 +-
.../impl/RegistrationAuthorityEntityMatcher.cpp | 2 +-
.../impl/RequireValidUntilMetadataFilter.cpp | 2 +-
.../metadata/impl/SignatureMetadataFilter.cpp | 16 ++--
.../metadata/impl/WhitelistMetadataFilter.cpp | 8 +-
saml/saml2/metadata/impl/XMLMetadataProvider.cpp | 14 ++--
saml/saml2/profile/impl/BearerConfirmationRule.cpp | 2 +-
.../profile/impl/DelegationRestrictionRule.cpp | 2 +-
samlsign/samlsign.cpp | 4 +-
samltest/binding.h | 12 +--
samltest/encryption/EncryptedAssertionTest.h | 2 +-
samltest/saml1/binding/SAML1ArtifactTest.h | 4 +-
samltest/saml1/binding/SAML1POSTTest.h | 4 +-
samltest/saml1/profile/SAML1PolicyTest.h | 4 +-
samltest/saml2/binding/SAML2ArtifactTest.h | 4 +-
samltest/saml2/binding/SAML2POSTTest.h | 8 +-
samltest/saml2/binding/SAML2RedirectTest.h | 4 +-
samltest/saml2/metadata/XMLMetadataProviderTest.h | 12 +--
samltest/saml2/profile/SAML2PolicyTest.h | 4 +-
samltest/security/ExplicitKeyTrustEngineTest.h | 4 +-
samltest/security/StaticPKIXTrustEngineTest.h | 4 +-
samltest/signature/SAMLSignatureTestBase.h | 2 +-
69 files changed, 174 insertions(+), 177 deletions(-)
diff --git a/saml/binding/impl/ClientCertAuthRule.cpp b/saml/binding/impl/ClientCertAuthRule.cpp
index 4f3a884..636aa15 100644
--- a/saml/binding/impl/ClientCertAuthRule.cpp
+++ b/saml/binding/impl/ClientCertAuthRule.cpp
@@ -60,7 +60,7 @@ namespace opensaml {
bool m_errorFatal;
};
- SecurityPolicyRule* SAML_DLLLOCAL ClientCertAuthRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL ClientCertAuthRuleFactory(const DOMElement* const & e, bool)
{
return new ClientCertAuthRule(e);
}
diff --git a/saml/binding/impl/MessageFlowRule.cpp b/saml/binding/impl/MessageFlowRule.cpp
index 8b117cf..90a5086 100644
--- a/saml/binding/impl/MessageFlowRule.cpp
+++ b/saml/binding/impl/MessageFlowRule.cpp
@@ -57,7 +57,7 @@ namespace opensaml {
time_t m_expires;
};
- SecurityPolicyRule* SAML_DLLLOCAL MessageFlowRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL MessageFlowRuleFactory(const DOMElement* const & e, bool)
{
return new MessageFlowRule(e);
}
diff --git a/saml/binding/impl/NullSecurityRule.cpp b/saml/binding/impl/NullSecurityRule.cpp
index 0368d0e..a3efcf0 100644
--- a/saml/binding/impl/NullSecurityRule.cpp
+++ b/saml/binding/impl/NullSecurityRule.cpp
@@ -55,7 +55,7 @@ namespace opensaml {
Category& m_log;
};
- SecurityPolicyRule* SAML_DLLLOCAL NullSecurityRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL NullSecurityRuleFactory(const DOMElement* const & e, bool)
{
return new NullSecurityRule(e);
}
diff --git a/saml/binding/impl/SAMLArtifact.cpp b/saml/binding/impl/SAMLArtifact.cpp
index 20a1c0f..308a2f2 100644
--- a/saml/binding/impl/SAMLArtifact.cpp
+++ b/saml/binding/impl/SAMLArtifact.cpp
@@ -129,7 +129,7 @@ SAMLArtifact* SAMLArtifact::parse(const char* s)
type+= decoded[1];
XMLString::release((char**)&decoded);
- return SAMLConfig::getConfig().SAMLArtifactManager.newPlugin(type,s);
+ return SAMLConfig::getConfig().SAMLArtifactManager.newPlugin(type,s,false);
}
SAMLArtifact* SAMLArtifact::parse(const XMLCh* s)
diff --git a/saml/binding/impl/SimpleSigningRule.cpp b/saml/binding/impl/SimpleSigningRule.cpp
index 4f7ca24..2035366 100644
--- a/saml/binding/impl/SimpleSigningRule.cpp
+++ b/saml/binding/impl/SimpleSigningRule.cpp
@@ -71,7 +71,7 @@ namespace opensaml {
bool m_errorFatal;
};
- SecurityPolicyRule* SAML_DLLLOCAL SimpleSigningRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL SimpleSigningRuleFactory(const DOMElement* const & e, bool)
{
return new SimpleSigningRule(e);
}
diff --git a/saml/binding/impl/XMLSigningRule.cpp b/saml/binding/impl/XMLSigningRule.cpp
index 4597894..a9df22e 100644
--- a/saml/binding/impl/XMLSigningRule.cpp
+++ b/saml/binding/impl/XMLSigningRule.cpp
@@ -62,7 +62,7 @@ namespace opensaml {
bool m_errorFatal;
};
- SecurityPolicyRule* SAML_DLLLOCAL XMLSigningRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL XMLSigningRuleFactory(const DOMElement* const & e, bool)
{
return new XMLSigningRule(e);
}
diff --git a/saml/profile/impl/AudienceRestrictionRule.cpp b/saml/profile/impl/AudienceRestrictionRule.cpp
index 97fb22e..d66bf9f 100644
--- a/saml/profile/impl/AudienceRestrictionRule.cpp
+++ b/saml/profile/impl/AudienceRestrictionRule.cpp
@@ -57,7 +57,7 @@ namespace opensaml {
vector<const XMLCh*> m_audiences;
};
- SecurityPolicyRule* SAML_DLLLOCAL AudienceRestrictionRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL AudienceRestrictionRuleFactory(const DOMElement* const & e, bool)
{
return new AudienceRestrictionRule(e);
}
diff --git a/saml/profile/impl/ConditionsRule.cpp b/saml/profile/impl/ConditionsRule.cpp
index 0153bb6..06ed158 100644
--- a/saml/profile/impl/ConditionsRule.cpp
+++ b/saml/profile/impl/ConditionsRule.cpp
@@ -47,7 +47,7 @@ namespace opensaml {
class SAML_DLLLOCAL ConditionsRule : public SecurityPolicyRule
{
public:
- ConditionsRule(const DOMElement* e);
+ ConditionsRule(const DOMElement* e, bool deprecationSupport=true);
virtual ~ConditionsRule() {
if (m_doc)
@@ -63,9 +63,9 @@ namespace opensaml {
ptr_vector<SecurityPolicyRule> m_rules;
};
- SecurityPolicyRule* SAML_DLLLOCAL ConditionsRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL ConditionsRuleFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ConditionsRule(e);
+ return new ConditionsRule(e, deprecationSupport);
}
static const XMLCh Rule[] = UNICODE_LITERAL_10(P,o,l,i,c,y,R,u,l,e);
@@ -80,7 +80,7 @@ namespace opensaml {
"</PolicyRule>";
};
-ConditionsRule::ConditionsRule(const DOMElement* e) : m_doc(nullptr)
+ConditionsRule::ConditionsRule(const DOMElement* e, bool deprecationSupport) : m_doc(nullptr)
{
Category& log=Category::getInstance(SAML_LOGCAT ".SecurityPolicyRule.Conditions");
@@ -97,7 +97,7 @@ ConditionsRule::ConditionsRule(const DOMElement* e) : m_doc(nullptr)
if (!t.empty()) {
try {
log.info("building SecurityPolicyRule of type %s", t.c_str());
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(t.c_str(), e));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(t.c_str(), e, deprecationSupport));
}
catch (std::exception& ex) {
log.crit("error building SecurityPolicyRule: %s", ex.what());
diff --git a/saml/profile/impl/IgnoreRule.cpp b/saml/profile/impl/IgnoreRule.cpp
index 9064289..7eb854b 100644
--- a/saml/profile/impl/IgnoreRule.cpp
+++ b/saml/profile/impl/IgnoreRule.cpp
@@ -74,7 +74,7 @@ namespace opensaml {
scoped_ptr<xmltooling::QName> m_qname;
};
- SecurityPolicyRule* SAML_DLLLOCAL IgnoreRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL IgnoreRuleFactory(const DOMElement* const & e, bool)
{
return new IgnoreRule(e);
}
diff --git a/saml/saml1/binding/impl/SAML1ArtifactDecoder.cpp b/saml/saml1/binding/impl/SAML1ArtifactDecoder.cpp
index 10462cd..bb2a579 100644
--- a/saml/saml1/binding/impl/SAML1ArtifactDecoder.cpp
+++ b/saml/saml1/binding/impl/SAML1ArtifactDecoder.cpp
@@ -63,7 +63,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML1ArtifactDecoderFactory(const DOMElement* const&)
+ MessageDecoder* SAML_DLLLOCAL SAML1ArtifactDecoderFactory(const DOMElement* const&, bool)
{
return new SAML1ArtifactDecoder();
}
diff --git a/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp b/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp
index dc733b0..085fe3c 100644
--- a/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp
+++ b/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp
@@ -75,7 +75,7 @@ namespace opensaml {
) const;
};
- MessageEncoder* SAML_DLLLOCAL SAML1ArtifactEncoderFactory(const DOMElement* const &)
+ MessageEncoder* SAML_DLLLOCAL SAML1ArtifactEncoderFactory(const DOMElement* const &, bool)
{
return new SAML1ArtifactEncoder();
}
diff --git a/saml/saml1/binding/impl/SAML1POSTDecoder.cpp b/saml/saml1/binding/impl/SAML1POSTDecoder.cpp
index dbe9eca..d32a02d 100644
--- a/saml/saml1/binding/impl/SAML1POSTDecoder.cpp
+++ b/saml/saml1/binding/impl/SAML1POSTDecoder.cpp
@@ -66,7 +66,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML1POSTDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML1POSTDecoderFactory(const DOMElement* const &, bool)
{
return new SAML1POSTDecoder();
}
diff --git a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
index aee3491..068e282 100644
--- a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
+++ b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
@@ -79,7 +79,7 @@ namespace opensaml {
string m_template;
};
- MessageEncoder* SAML_DLLLOCAL SAML1POSTEncoderFactory(const DOMElement* const & e)
+ MessageEncoder* SAML_DLLLOCAL SAML1POSTEncoderFactory(const DOMElement* const & e, bool)
{
return new SAML1POSTEncoder(e);
}
diff --git a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp
index 7e2f54d..2dbba34 100644
--- a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp
+++ b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp
@@ -64,7 +64,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML1SOAPDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML1SOAPDecoderFactory(const DOMElement* const &, bool)
{
return new SAML1SOAPDecoder();
}
diff --git a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp
index aefb1e7..d86149d 100644
--- a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp
+++ b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp
@@ -75,7 +75,7 @@ namespace opensaml {
) const;
};
- MessageEncoder* SAML_DLLLOCAL SAML1SOAPEncoderFactory(const DOMElement* const &)
+ MessageEncoder* SAML_DLLLOCAL SAML1SOAPEncoderFactory(const DOMElement* const &, bool)
{
return new SAML1SOAPEncoder();
}
diff --git a/saml/saml1/binding/impl/SAMLArtifactType0001.cpp b/saml/saml1/binding/impl/SAMLArtifactType0001.cpp
index d44134a..d8110f8 100644
--- a/saml/saml1/binding/impl/SAMLArtifactType0001.cpp
+++ b/saml/saml1/binding/impl/SAMLArtifactType0001.cpp
@@ -34,7 +34,7 @@ using namespace std;
namespace opensaml {
namespace saml1p {
- SAMLArtifact* SAML_DLLLOCAL SAMLArtifactType0001Factory(const char* const & s)
+ SAMLArtifact* SAML_DLLLOCAL SAMLArtifactType0001Factory(const char* const & s, bool)
{
return new SAMLArtifactType0001(s);
}
diff --git a/saml/saml1/binding/impl/SAMLArtifactType0002.cpp b/saml/saml1/binding/impl/SAMLArtifactType0002.cpp
index 7dbaa49..1276f7f 100644
--- a/saml/saml1/binding/impl/SAMLArtifactType0002.cpp
+++ b/saml/saml1/binding/impl/SAMLArtifactType0002.cpp
@@ -34,7 +34,7 @@ using namespace std;
namespace opensaml {
namespace saml1p {
- SAMLArtifact* SAML_DLLLOCAL SAMLArtifactType0002Factory(const char* const & s)
+ SAMLArtifact* SAML_DLLLOCAL SAMLArtifactType0002Factory(const char* const & s, bool)
{
return new SAMLArtifactType0002(s);
}
diff --git a/saml/saml1/profile/impl/SAML1BrowserSSORule.cpp b/saml/saml1/profile/impl/SAML1BrowserSSORule.cpp
index c70f813..d3c7208 100644
--- a/saml/saml1/profile/impl/SAML1BrowserSSORule.cpp
+++ b/saml/saml1/profile/impl/SAML1BrowserSSORule.cpp
@@ -52,7 +52,7 @@ namespace opensaml {
bool evaluate(const XMLObject& message, const GenericRequest* request, opensaml::SecurityPolicy& policy) const;
};
- opensaml::SecurityPolicyRule* SAML_DLLLOCAL BrowserSSORuleFactory(const DOMElement* const &)
+ opensaml::SecurityPolicyRule* SAML_DLLLOCAL BrowserSSORuleFactory(const DOMElement* const &, bool)
{
return new BrowserSSORule();
}
diff --git a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
index 72557c4..dd35c99 100644
--- a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
+++ b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
@@ -64,7 +64,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML2ArtifactDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML2ArtifactDecoderFactory(const DOMElement* const &, bool)
{
return new SAML2ArtifactDecoder();
}
diff --git a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp
index 23bb28c..caa095d 100644
--- a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp
@@ -82,7 +82,7 @@ namespace opensaml {
string m_template;
};
- MessageEncoder* SAML_DLLLOCAL SAML2ArtifactEncoderFactory(const DOMElement* const & e)
+ MessageEncoder* SAML_DLLLOCAL SAML2ArtifactEncoderFactory(const DOMElement* const & e, bool)
{
return new SAML2ArtifactEncoder(e);
}
diff --git a/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp b/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp
index 9fb9cf7..aa2786f 100644
--- a/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp
+++ b/saml/saml2/binding/impl/SAML2ArtifactType0004.cpp
@@ -34,7 +34,7 @@ using namespace std;
namespace opensaml {
namespace saml2p {
- SAMLArtifact* SAML_DLLLOCAL SAML2ArtifactType0004Factory(const char* const & s)
+ SAMLArtifact* SAML_DLLLOCAL SAML2ArtifactType0004Factory(const char* const & s, bool)
{
return new SAML2ArtifactType0004(s);
}
diff --git a/saml/saml2/binding/impl/SAML2ECPDecoder.cpp b/saml/saml2/binding/impl/SAML2ECPDecoder.cpp
index 7d7045e..f57e593 100644
--- a/saml/saml2/binding/impl/SAML2ECPDecoder.cpp
+++ b/saml/saml2/binding/impl/SAML2ECPDecoder.cpp
@@ -61,7 +61,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML2ECPDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML2ECPDecoderFactory(const DOMElement* const &, bool)
{
return new SAML2ECPDecoder();
}
diff --git a/saml/saml2/binding/impl/SAML2ECPEncoder.cpp b/saml/saml2/binding/impl/SAML2ECPEncoder.cpp
index 2f84396..9842605 100644
--- a/saml/saml2/binding/impl/SAML2ECPEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2ECPEncoder.cpp
@@ -86,7 +86,7 @@ namespace opensaml {
AnyElementBuilder m_anyBuilder;
};
- MessageEncoder* SAML_DLLLOCAL SAML2ECPEncoderFactory(const DOMElement* const & e)
+ MessageEncoder* SAML_DLLLOCAL SAML2ECPEncoderFactory(const DOMElement* const & e, bool)
{
return new SAML2ECPEncoder(e);
}
diff --git a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp
index e7b36c0..1b7900e 100644
--- a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp
+++ b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp
@@ -65,7 +65,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML2POSTDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML2POSTDecoderFactory(const DOMElement* const &, bool)
{
return new SAML2POSTDecoder();
}
diff --git a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp
index 583cf41..453865a 100644
--- a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp
@@ -83,12 +83,12 @@ namespace opensaml {
bool m_simple;
};
- MessageEncoder* SAML_DLLLOCAL SAML2POSTEncoderFactory(const DOMElement* const & e)
+ MessageEncoder* SAML_DLLLOCAL SAML2POSTEncoderFactory(const DOMElement* const & e, bool)
{
return new SAML2POSTEncoder(e, false);
}
- MessageEncoder* SAML_DLLLOCAL SAML2POSTSimpleSignEncoderFactory(const DOMElement* const & e)
+ MessageEncoder* SAML_DLLLOCAL SAML2POSTSimpleSignEncoderFactory(const DOMElement* const & e, bool)
{
return new SAML2POSTEncoder(e, true);
}
diff --git a/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp b/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp
index 28ea7d8..f58c819 100644
--- a/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp
+++ b/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp
@@ -65,7 +65,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML2RedirectDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML2RedirectDecoderFactory(const DOMElement* const &, bool)
{
return new SAML2RedirectDecoder();
}
diff --git a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
index 72ceea7..ea98c7b 100644
--- a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
@@ -79,7 +79,7 @@ namespace opensaml {
) const;
};
- MessageEncoder* SAML_DLLLOCAL SAML2RedirectEncoderFactory(const DOMElement* const &)
+ MessageEncoder* SAML_DLLLOCAL SAML2RedirectEncoderFactory(const DOMElement* const &, bool)
{
return new SAML2RedirectEncoder();
}
diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp
index 816650d..b16744f 100644
--- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp
+++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp
@@ -64,7 +64,7 @@ namespace opensaml {
) const;
};
- MessageDecoder* SAML_DLLLOCAL SAML2SOAPDecoderFactory(const DOMElement* const &)
+ MessageDecoder* SAML_DLLLOCAL SAML2SOAPDecoderFactory(const DOMElement* const &, bool)
{
return new SAML2SOAPDecoder();
}
diff --git a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp
index a8313dd..ac9f1e9 100644
--- a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp
@@ -75,7 +75,7 @@ namespace opensaml {
) const;
};
- MessageEncoder* SAML_DLLLOCAL SAML2SOAPEncoderFactory(const DOMElement* const &)
+ MessageEncoder* SAML_DLLLOCAL SAML2SOAPEncoderFactory(const DOMElement* const &, bool)
{
return new SAML2SOAPEncoder();
}
diff --git a/saml/saml2/metadata/AbstractDynamicMetadataProvider.h b/saml/saml2/metadata/AbstractDynamicMetadataProvider.h
index ec90e90..6e25ed6 100644
--- a/saml/saml2/metadata/AbstractDynamicMetadataProvider.h
+++ b/saml/saml2/metadata/AbstractDynamicMetadataProvider.h
@@ -50,8 +50,9 @@ namespace opensaml {
*
* @param defaultNegativeCache - if not specified in the element, do we cache lookup failures?
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- AbstractDynamicMetadataProvider(bool defaultNegativeCache, const xercesc::DOMElement* e=nullptr);
+ AbstractDynamicMetadataProvider(bool defaultNegativeCache, const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
virtual ~AbstractDynamicMetadataProvider();
diff --git a/saml/saml2/metadata/AbstractMetadataProvider.h b/saml/saml2/metadata/AbstractMetadataProvider.h
index bb602f1..1913154 100644
--- a/saml/saml2/metadata/AbstractMetadataProvider.h
+++ b/saml/saml2/metadata/AbstractMetadataProvider.h
@@ -72,8 +72,9 @@ namespace opensaml {
* XML namespaces are ignored in the processing of these elements.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- AbstractMetadataProvider(const xercesc::DOMElement* e=nullptr);
+ AbstractMetadataProvider(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
public:
virtual ~AbstractMetadataProvider();
diff --git a/saml/saml2/metadata/DiscoverableMetadataProvider.h b/saml/saml2/metadata/DiscoverableMetadataProvider.h
index 095d03c..0723daf 100644
--- a/saml/saml2/metadata/DiscoverableMetadataProvider.h
+++ b/saml/saml2/metadata/DiscoverableMetadataProvider.h
@@ -73,8 +73,9 @@ namespace opensaml {
* </dl>
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- DiscoverableMetadataProvider(const xercesc::DOMElement* e=nullptr);
+ DiscoverableMetadataProvider(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
/**
* Generates a JSON feed of IdP discovery information for the current metadata.
diff --git a/saml/saml2/metadata/MetadataProvider.h b/saml/saml2/metadata/MetadataProvider.h
index 89b0eb5..c96b9ff 100644
--- a/saml/saml2/metadata/MetadataProvider.h
+++ b/saml/saml2/metadata/MetadataProvider.h
@@ -87,17 +87,15 @@ namespace opensaml {
* <ul>
* <li><MetadataFilter> elements with a type attribute and type-specific content
* <li><Exclude> elements representing a BlacklistMetadataFilter
- * <li><BlacklistMetadataFilter> element containing <Exclude> elements
* <li><Include> elements representing a WhitelistMetadataFilter
- * <li><SignatureMetadataFilter> element containing a <KeyResolver> element
- * <li><WhitelistMetadataFilter> element containing <Include> elements
* </ul>
*
* XML namespaces are ignored in the processing of these elements.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- MetadataProvider(const xercesc::DOMElement* e);
+ MetadataProvider(const xercesc::DOMElement* e, bool deprecationSupport=true);
public:
/**
diff --git a/saml/saml2/metadata/ObservableMetadataProvider.h b/saml/saml2/metadata/ObservableMetadataProvider.h
index 02cb89a..53cdd7a 100644
--- a/saml/saml2/metadata/ObservableMetadataProvider.h
+++ b/saml/saml2/metadata/ObservableMetadataProvider.h
@@ -51,8 +51,9 @@ namespace opensaml {
* Constructor.
*
* @param e DOM to supply configuration for provider
+ * @param deprecationSupport true iff deprecated features and settings should be supported
*/
- ObservableMetadataProvider(const xercesc::DOMElement* e=nullptr);
+ ObservableMetadataProvider(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
/**
* Convenience method for notifying every registered Observer of an event.
diff --git a/saml/saml2/metadata/impl/AbstractDynamicMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractDynamicMetadataProvider.cpp
index 3bb0f67..fd0a577 100644
--- a/saml/saml2/metadata/impl/AbstractDynamicMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/AbstractDynamicMetadataProvider.cpp
@@ -72,8 +72,8 @@ static const XMLCh refreshDelayFactor[] = UNICODE_LITERAL_18(r,e,f,r,e,s,h,D,e
static const XMLCh validate[] = UNICODE_LITERAL_8(v,a,l,i,d,a,t,e);
-AbstractDynamicMetadataProvider::AbstractDynamicMetadataProvider(bool defaultNegativeCache, const DOMElement* e)
- : MetadataProvider(e), AbstractMetadataProvider(e),
+AbstractDynamicMetadataProvider::AbstractDynamicMetadataProvider(bool defaultNegativeCache, const DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(e, deprecationSupport), AbstractMetadataProvider(e, deprecationSupport),
m_validate(XMLHelper::getAttrBool(e, false, validate)),
m_id(XMLHelper::getAttrString(e, "Dynamic", id)),
m_lock(RWLock::create()),
diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
index 7f85f37..9faca34 100644
--- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
@@ -55,14 +55,15 @@ using opensaml::SAMLArtifact;
static const XMLCh _KeyInfoResolver[] = UNICODE_LITERAL_15(K,e,y,I,n,f,o,R,e,s,o,l,v,e,r);
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
-AbstractMetadataProvider::AbstractMetadataProvider(const DOMElement* e)
- : MetadataProvider(e), ObservableMetadataProvider(e), m_lastUpdate(0), m_resolver(nullptr), m_credentialLock(Mutex::create())
+AbstractMetadataProvider::AbstractMetadataProvider(const DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(e, deprecationSupport), ObservableMetadataProvider(e),
+ m_lastUpdate(0), m_resolver(nullptr), m_credentialLock(Mutex::create())
{
e = XMLHelper::getFirstChildElement(e, _KeyInfoResolver);
if (e) {
string t = XMLHelper::getAttrString(e, nullptr, _type);
if (!t.empty()) {
- m_resolverWrapper.reset(XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e));
+ m_resolverWrapper.reset(XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e, deprecationSupport));
m_resolver = m_resolverWrapper.get();
}
else {
diff --git a/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp b/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp
index 979f2b9..ecd2b9e 100644
--- a/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp
+++ b/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp
@@ -44,7 +44,7 @@ namespace opensaml {
class SAML_DLLLOCAL BlacklistMetadataFilter : public MetadataFilter
{
public:
- BlacklistMetadataFilter(const DOMElement* e);
+ BlacklistMetadataFilter(const DOMElement* e, bool deprecationSupport=true);
~BlacklistMetadataFilter() {}
const char* getId() const { return BLACKLIST_METADATA_FILTER; }
@@ -58,7 +58,7 @@ namespace opensaml {
scoped_ptr<EntityMatcher> m_matcher;
};
- MetadataFilter* SAML_DLLLOCAL BlacklistMetadataFilterFactory(const DOMElement* const & e)
+ MetadataFilter* SAML_DLLLOCAL BlacklistMetadataFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new BlacklistMetadataFilter(e);
}
@@ -69,11 +69,11 @@ namespace opensaml {
};
-BlacklistMetadataFilter::BlacklistMetadataFilter(const DOMElement* e)
+BlacklistMetadataFilter::BlacklistMetadataFilter(const DOMElement* e, bool deprecationSupport)
{
string matcher(XMLHelper::getAttrString(e, nullptr, _matcher));
if (!matcher.empty())
- m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(matcher.c_str(), e));
+ m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(matcher.c_str(), e, deprecationSupport));
e = XMLHelper::getFirstChildElement(e, Exclude);
while (e) {
diff --git a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
index b09f751..b7284de 100644
--- a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
@@ -59,7 +59,7 @@ namespace opensaml {
class SAML_DLLLOCAL ChainingMetadataProvider
: public DiscoverableMetadataProvider, public ObservableMetadataProvider, public ObservableMetadataProvider::Observer {
public:
- ChainingMetadataProvider(const xercesc::DOMElement* e=nullptr);
+ ChainingMetadataProvider(const xercesc::DOMElement* e=nullptr, bool deprecationSupport=true);
virtual ~ChainingMetadataProvider();
using MetadataProvider::getEntityDescriptor;
@@ -165,9 +165,9 @@ namespace opensaml {
map<const XMLObject*,const MetadataProvider*> m_objectMap;
};
- MetadataProvider* SAML_DLLLOCAL ChainingMetadataProviderFactory(const DOMElement* const & e)
+ MetadataProvider* SAML_DLLLOCAL ChainingMetadataProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new ChainingMetadataProvider(e);
+ return new ChainingMetadataProvider(e, deprecationSupport);
}
static const XMLCh _MetadataProvider[] = UNICODE_LITERAL_16(M,e,t,a,d,a,t,a,P,r,o,v,i,d,e,r);
@@ -188,8 +188,9 @@ void ChainingMetadataProvider::tracker_cleanup(void* ptr)
}
}
-ChainingMetadataProvider::ChainingMetadataProvider(const DOMElement* e)
- : MetadataProvider(nullptr), ObservableMetadataProvider(e), m_firstMatch(true), m_trackerLock(Mutex::create()), m_tlsKey(ThreadKey::create(tracker_cleanup)),
+ChainingMetadataProvider::ChainingMetadataProvider(const DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(nullptr), ObservableMetadataProvider(e),
+ m_firstMatch(true), m_trackerLock(Mutex::create()), m_tlsKey(ThreadKey::create(tracker_cleanup)),
m_log(Category::getInstance(SAML_LOGCAT ".MetadataProvider.Chaining"))
{
if (XMLString::equals(e ? e->getAttributeNS(nullptr, precedence) : nullptr, last))
@@ -206,7 +207,7 @@ ChainingMetadataProvider::ChainingMetadataProvider(const DOMElement* e)
if (!t.empty()) {
try {
m_log.info("building MetadataProvider of type %s", t.c_str());
- auto_ptr<MetadataProvider> provider(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), e));
+ auto_ptr<MetadataProvider> provider(SAMLConfig::getConfig().MetadataProviderManager.newPlugin(t.c_str(), e, deprecationSupport));
ObservableMetadataProvider* obs = dynamic_cast<ObservableMetadataProvider*>(provider.get());
if (obs)
obs->addObserver(this);
diff --git a/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp b/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp
index 52c7a51..58c121f 100644
--- a/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/DiscoverableMetadataProvider.cpp
@@ -47,7 +47,8 @@ using namespace boost::lambda;
using namespace boost;
using namespace std;
-DiscoverableMetadataProvider::DiscoverableMetadataProvider(const DOMElement* e) : MetadataProvider(e), m_legacyOrgNames(false)
+DiscoverableMetadataProvider::DiscoverableMetadataProvider(const DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(e, deprecationSupport), m_legacyOrgNames(false)
{
static const XMLCh legacyOrgNames[] = UNICODE_LITERAL_14(l,e,g,a,c,y,O,r,g,N,a,m,e,s);
static const XMLCh matcher[] = UNICODE_LITERAL_7(m,a,t,c,h,e,r);
@@ -55,11 +56,6 @@ DiscoverableMetadataProvider::DiscoverableMetadataProvider(const DOMElement* e)
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
static const XMLCh DiscoveryFilter[] = UNICODE_LITERAL_15(D,i,s,c,o,v,e,r,y,F,i,l,t,e,r);
- const XMLCh* attrib = e? e->getAttributeNS(nullptr, legacyOrgNames) : nullptr;
- if (attrib && *attrib) {
- Category::getInstance(SAML_LOGCAT ".MetadataProvider.Discoverable").warn("DEPRECATED: legacyOrgNames is a deprecated attribute for MetadataProviders");
- }
-
m_legacyOrgNames = XMLHelper::getAttrBool(e, false, legacyOrgNames);
m_entityAttributes = XMLHelper::getAttrBool(e, false, tagsInFeed);
@@ -70,7 +66,7 @@ DiscoverableMetadataProvider::DiscoverableMetadataProvider(const DOMElement* e)
string m(XMLHelper::getAttrString(e, nullptr, matcher));
if (!m.empty()) {
try {
- boost::shared_ptr<EntityMatcher> temp(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(m, e));
+ boost::shared_ptr<EntityMatcher> temp(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(m, e, deprecationSupport));
m_discoFilters.push_back(make_pair(t == "Whitelist", temp));
}
catch (std::exception& ex) {
diff --git a/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp b/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp
index 2f48208..5ec9979 100644
--- a/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp
+++ b/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp
@@ -66,7 +66,7 @@ namespace opensaml {
Category& m_log;
};
- EntityMatcher* SAML_DLLLOCAL EntityAttributesEntityMatcherFactory(const DOMElement* const & e)
+ EntityMatcher* SAML_DLLLOCAL EntityAttributesEntityMatcherFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new EntityAttributesEntityMatcher(e);
}
diff --git a/saml/saml2/metadata/impl/EntityAttributesMetadataFilter.cpp b/saml/saml2/metadata/impl/EntityAttributesMetadataFilter.cpp
index a1e7e77..f9a1d13 100644
--- a/saml/saml2/metadata/impl/EntityAttributesMetadataFilter.cpp
+++ b/saml/saml2/metadata/impl/EntityAttributesMetadataFilter.cpp
@@ -64,7 +64,7 @@ namespace opensaml {
applymap_t m_applyMap;
};
- MetadataFilter* SAML_DLLLOCAL EntityAttributesMetadataFilterFactory(const DOMElement* const & e)
+ MetadataFilter* SAML_DLLLOCAL EntityAttributesMetadataFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new EntityAttributesMetadataFilter(e);
}
diff --git a/saml/saml2/metadata/impl/EntityRoleMetadataFilter.cpp b/saml/saml2/metadata/impl/EntityRoleMetadataFilter.cpp
index 1cc0717..a341276 100644
--- a/saml/saml2/metadata/impl/EntityRoleMetadataFilter.cpp
+++ b/saml/saml2/metadata/impl/EntityRoleMetadataFilter.cpp
@@ -58,7 +58,7 @@ namespace opensaml {
bool m_idp, m_sp, m_authn, m_attr, m_pdp, m_authnq, m_attrq, m_authzq;
};
- MetadataFilter* SAML_DLLLOCAL EntityRoleMetadataFilterFactory(const DOMElement* const & e)
+ MetadataFilter* SAML_DLLLOCAL EntityRoleMetadataFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new EntityRoleMetadataFilter(e);
}
diff --git a/saml/saml2/metadata/impl/FolderMetadataProvider.cpp b/saml/saml2/metadata/impl/FolderMetadataProvider.cpp
index ffec05c..c450e84 100644
--- a/saml/saml2/metadata/impl/FolderMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/FolderMetadataProvider.cpp
@@ -87,7 +87,7 @@ namespace opensaml {
p->second->appendChild(child);
}
- MetadataProvider* SAML_DLLLOCAL FolderMetadataProviderFactory(const DOMElement* const & e)
+ MetadataProvider* SAML_DLLLOCAL FolderMetadataProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
// The goal here is to construct a configuration for a chain of file-based providers
// based on the content of the directory we're given.
@@ -113,7 +113,7 @@ namespace opensaml {
pair<const DOMElement*,DOMElement*> data = make_pair(e, root);
walker.walk(FolderCallback, &data);
- return SAMLConfig::getConfig().MetadataProviderManager.newPlugin(CHAINING_METADATA_PROVIDER, root);
+ return SAMLConfig::getConfig().MetadataProviderManager.newPlugin(CHAINING_METADATA_PROVIDER, root, deprecationSupport);
}
};
diff --git a/saml/saml2/metadata/impl/LocalDynamicMetadataProvider.cpp b/saml/saml2/metadata/impl/LocalDynamicMetadataProvider.cpp
index 93bf22f..ec05115 100644
--- a/saml/saml2/metadata/impl/LocalDynamicMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/LocalDynamicMetadataProvider.cpp
@@ -75,7 +75,7 @@ namespace opensaml {
string m_sourceDirectory;
};
- MetadataProvider* SAML_DLLLOCAL LocalDynamicMetadataProviderFactory(const DOMElement* const & e)
+ MetadataProvider* SAML_DLLLOCAL LocalDynamicMetadataProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new LocalDynamicMetadataProvider(e);
}
diff --git a/saml/saml2/metadata/impl/MetadataProvider.cpp b/saml/saml2/metadata/impl/MetadataProvider.cpp
index 41e9e41..a65e720 100644
--- a/saml/saml2/metadata/impl/MetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/MetadataProvider.cpp
@@ -94,7 +94,7 @@ static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
MetadataProvider::MetadataProvider() { throw MetadataException("Illegal constructor call"); }
-MetadataProvider::MetadataProvider(const DOMElement* e) : m_filterContext(nullptr)
+MetadataProvider::MetadataProvider(const DOMElement* e, bool deprecationSupport) : m_filterContext(nullptr)
{
#ifdef _DEBUG
NDC ndc("MetadataProvider");
@@ -103,52 +103,49 @@ MetadataProvider::MetadataProvider(const DOMElement* e) : m_filterContext(nullpt
const SAMLConfig& conf = SAMLConfig::getConfig();
// Locate any default recognized filters and plugins.
- try {
- DOMElement* child = XMLHelper::getFirstChildElement(e);
- while (child) {
- if (XMLString::equals(child->getLocalName(), _MetadataFilter)) {
- string t = XMLHelper::getAttrString(child, nullptr, _type);
- if (!t.empty()) {
- log.info("building MetadataFilter of type %s", t.c_str());
- auto_ptr<MetadataFilter> np(conf.MetadataFilterManager.newPlugin(t.c_str(), child));
- m_filters.push_back(np.get());
- np.release();
- }
- else {
- log.error("MetadataFilter element missing type attribute");
- }
+ DOMElement* child = XMLHelper::getFirstChildElement(e);
+ while (child) {
+ if (XMLString::equals(child->getLocalName(), _MetadataFilter)) {
+ string t = XMLHelper::getAttrString(child, nullptr, _type);
+ if (!t.empty()) {
+ log.info("building MetadataFilter of type %s", t.c_str());
+ auto_ptr<MetadataFilter> np(conf.MetadataFilterManager.newPlugin(t.c_str(), child, deprecationSupport));
+ m_filters.push_back(np.get());
+ np.release();
}
- else if (XMLString::equals(child->getLocalName(), SigFilter)) {
- log.warn("<SignatureMetadataFilter> will be deprecated in future versions: use type=\"%s\"", SIGNATURE_METADATA_FILTER);
- log.info("building MetadataFilter of type %s", SIGNATURE_METADATA_FILTER);
- m_filters.push_back(conf.MetadataFilterManager.newPlugin(SIGNATURE_METADATA_FILTER, child));
+ else {
+ log.error("MetadataFilter element missing type attribute");
}
- else if (XMLString::equals(child->getLocalName(), Whitelist)) {
- log.warn("<WhitelistMetadataFilter> will be deprecated in future versions use: type=\"%s\"", WHITELIST_METADATA_FILTER);
- log.info("building MetadataFilter of type %s", WHITELIST_METADATA_FILTER);
- m_filters.push_back(conf.MetadataFilterManager.newPlugin(WHITELIST_METADATA_FILTER, child));
- }
- else if (XMLString::equals(child->getLocalName(), Blacklist)) {
- log.warn("<BlacklistMetadataFilter> will be deprecated in future versions use: type=\"%s\"", BLACKLIST_METADATA_FILTER);
- log.info("building MetadataFilter of type %s", BLACKLIST_METADATA_FILTER);
- m_filters.push_back(conf.MetadataFilterManager.newPlugin(BLACKLIST_METADATA_FILTER, child));
- }
- else if (XMLString::equals(child->getLocalName(), Include)) {
- log.warn("<Include> will be deprecated in future versions: use type=\"%s\"", WHITELIST_METADATA_FILTER);
- log.info("building MetadataFilter of type %s", WHITELIST_METADATA_FILTER);
- m_filters.push_back(conf.MetadataFilterManager.newPlugin(WHITELIST_METADATA_FILTER, e));
- }
- else if (XMLString::equals(child->getLocalName(), Exclude)) {
- log.warn("<Exclude> will be deprecated in future versions: use type=\"%s\"", BLACKLIST_METADATA_FILTER);
- log.info("building MetadataFilter of type %s", BLACKLIST_METADATA_FILTER);
- m_filters.push_back(conf.MetadataFilterManager.newPlugin(BLACKLIST_METADATA_FILTER, e));
- }
- child = XMLHelper::getNextSiblingElement(child);
}
- }
- catch (const XMLToolingException& ex) {
- log.error("caught exception while installing filters: %s", ex.what());
- throw;
+ else if (deprecationSupport && XMLString::equals(child->getLocalName(), SigFilter)) {
+ log.warn("DEPRECATED: <SignatureMetadataFilter> replaced by type=\"%s\"", SIGNATURE_METADATA_FILTER);
+ log.info("building MetadataFilter of type %s", SIGNATURE_METADATA_FILTER);
+ m_filters.push_back(conf.MetadataFilterManager.newPlugin(SIGNATURE_METADATA_FILTER, child, deprecationSupport));
+ }
+ else if (deprecationSupport && XMLString::equals(child->getLocalName(), Whitelist)) {
+ log.warn("DEPRECATED: <WhitelistMetadataFilter> replaced by type=\"%s\"", WHITELIST_METADATA_FILTER);
+ log.info("building MetadataFilter of type %s", WHITELIST_METADATA_FILTER);
+ m_filters.push_back(conf.MetadataFilterManager.newPlugin(WHITELIST_METADATA_FILTER, child, deprecationSupport));
+ }
+ else if (deprecationSupport && XMLString::equals(child->getLocalName(), Blacklist)) {
+ log.warn("DEPRECATED: <BlacklistMetadataFilter> replaced by type=\"%s\"", BLACKLIST_METADATA_FILTER);
+ log.info("building MetadataFilter of type %s", BLACKLIST_METADATA_FILTER);
+ m_filters.push_back(conf.MetadataFilterManager.newPlugin(BLACKLIST_METADATA_FILTER, child, deprecationSupport));
+ }
+ else if (deprecationSupport && XMLString::equals(child->getLocalName(), Include)) {
+ log.warn("DEPRECATED: <Include> replaced by type=\"%s\"", WHITELIST_METADATA_FILTER);
+ log.info("building MetadataFilter of type %s", WHITELIST_METADATA_FILTER);
+ m_filters.push_back(conf.MetadataFilterManager.newPlugin(WHITELIST_METADATA_FILTER, e, deprecationSupport));
+ }
+ else if (deprecationSupport && XMLString::equals(child->getLocalName(), Exclude)) {
+ log.warn("DEPRECATED: replaced by type=\"%s\"", BLACKLIST_METADATA_FILTER);
+ log.info("building MetadataFilter of type %s", BLACKLIST_METADATA_FILTER);
+ m_filters.push_back(conf.MetadataFilterManager.newPlugin(BLACKLIST_METADATA_FILTER, e, deprecationSupport));
+ }
+ else if (!deprecationSupport && XMLString::endsWith(child->getLocalName(), _MetadataFilter)) {
+ throw UnknownExtensionException("Unsupported metadata filter syntax detected.");
+ }
+ child = XMLHelper::getNextSiblingElement(child);
}
}
diff --git a/saml/saml2/metadata/impl/NameEntityMatcher.cpp b/saml/saml2/metadata/impl/NameEntityMatcher.cpp
index 4966d99..7596642 100644
--- a/saml/saml2/metadata/impl/NameEntityMatcher.cpp
+++ b/saml/saml2/metadata/impl/NameEntityMatcher.cpp
@@ -51,7 +51,7 @@ namespace opensaml {
const XMLCh* m_name;
};
- EntityMatcher* SAML_DLLLOCAL NameEntityMatcherFactory(const DOMElement* const & e)
+ EntityMatcher* SAML_DLLLOCAL NameEntityMatcherFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new NameEntityMatcher(e);
}
diff --git a/saml/saml2/metadata/impl/NullMetadataProvider.cpp b/saml/saml2/metadata/impl/NullMetadataProvider.cpp
index b579022..e6cd543 100644
--- a/saml/saml2/metadata/impl/NullMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/NullMetadataProvider.cpp
@@ -58,7 +58,7 @@ namespace opensaml {
scoped_ptr<EntityDescriptor> m_template;
};
- MetadataProvider* SAML_DLLLOCAL NullMetadataProviderFactory(const DOMElement* const & e)
+ MetadataProvider* SAML_DLLLOCAL NullMetadataProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new NullMetadataProvider(e);
}
diff --git a/saml/saml2/metadata/impl/ObservableMetadataProvider.cpp b/saml/saml2/metadata/impl/ObservableMetadataProvider.cpp
index a2a7248..83dfecd 100644
--- a/saml/saml2/metadata/impl/ObservableMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/ObservableMetadataProvider.cpp
@@ -35,8 +35,8 @@ using namespace xmltooling;
using namespace boost;
using namespace std;
-ObservableMetadataProvider::ObservableMetadataProvider(const xercesc::DOMElement* e)
- : MetadataProvider(e), m_observerLock(Mutex::create())
+ObservableMetadataProvider::ObservableMetadataProvider(const xercesc::DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(e, deprecationSupport), m_observerLock(Mutex::create())
{
}
diff --git a/saml/saml2/metadata/impl/RegistrationAuthorityEntityMatcher.cpp b/saml/saml2/metadata/impl/RegistrationAuthorityEntityMatcher.cpp
index 3074847..4a49c19 100644
--- a/saml/saml2/metadata/impl/RegistrationAuthorityEntityMatcher.cpp
+++ b/saml/saml2/metadata/impl/RegistrationAuthorityEntityMatcher.cpp
@@ -59,7 +59,7 @@ namespace opensaml {
Category& m_log;
};
- EntityMatcher* SAML_DLLLOCAL RegistrationAuthorityEntityMatcherFactory(const DOMElement* const & e)
+ EntityMatcher* SAML_DLLLOCAL RegistrationAuthorityEntityMatcherFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new RegistrationAuthorityEntityMatcher(e);
}
diff --git a/saml/saml2/metadata/impl/RequireValidUntilMetadataFilter.cpp b/saml/saml2/metadata/impl/RequireValidUntilMetadataFilter.cpp
index a43fa00..41c63a4 100644
--- a/saml/saml2/metadata/impl/RequireValidUntilMetadataFilter.cpp
+++ b/saml/saml2/metadata/impl/RequireValidUntilMetadataFilter.cpp
@@ -52,7 +52,7 @@ namespace opensaml {
time_t m_maxValidityInterval;
};
- MetadataFilter* SAML_DLLLOCAL RequireValidUntilMetadataFilterFactory(const DOMElement* const & e)
+ MetadataFilter* SAML_DLLLOCAL RequireValidUntilMetadataFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new RequireValidUntilMetadataFilter(e);
}
diff --git a/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp b/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp
index 1e6a1b9..97fa2ac 100644
--- a/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp
+++ b/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp
@@ -54,7 +54,7 @@ namespace opensaml {
class SAML_DLLLOCAL SignatureMetadataFilter : public MetadataFilter
{
public:
- SignatureMetadataFilter(const DOMElement* e);
+ SignatureMetadataFilter(const DOMElement* e, bool deprecationSupport=true);
~SignatureMetadataFilter() {}
const char* getId() const { return SIGNATURE_METADATA_FILTER; }
@@ -72,9 +72,9 @@ namespace opensaml {
Category& m_log;
};
- MetadataFilter* SAML_DLLLOCAL SignatureMetadataFilterFactory(const DOMElement* const & e)
+ MetadataFilter* SAML_DLLLOCAL SignatureMetadataFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new SignatureMetadataFilter(e);
+ return new SignatureMetadataFilter(e, deprecationSupport);
}
};
@@ -90,7 +90,7 @@ static const XMLCh verifyBackup[] = UNICODE_LITERAL_12(v,e,r,i,f,y,B,a,c
static const XMLCh verifyRoles[] = UNICODE_LITERAL_11(v,e,r,i,f,y,R,o,l,e,s);
static const XMLCh verifyName[] = UNICODE_LITERAL_10(v,e,r,i,f,y,N,a,m,e);
-SignatureMetadataFilter::SignatureMetadataFilter(const DOMElement* e)
+SignatureMetadataFilter::SignatureMetadataFilter(const DOMElement* e, bool deprecationSupport)
: m_verifyRoles(XMLHelper::getAttrBool(e, false, verifyRoles)),
m_verifyName(XMLHelper::getAttrBool(e, true, verifyName)),
m_verifyBackup(XMLHelper::getAttrBool(e, true, verifyBackup)),
@@ -98,7 +98,7 @@ SignatureMetadataFilter::SignatureMetadataFilter(const DOMElement* e)
{
if (e && e->hasAttributeNS(nullptr,certificate)) {
// Use a file-based credential resolver rooted here.
- m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e));
+ m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e, deprecationSupport));
return;
}
@@ -106,7 +106,7 @@ SignatureMetadataFilter::SignatureMetadataFilter(const DOMElement* e)
if (sub) {
string t = XMLHelper::getAttrString(sub, nullptr, type);
if (!t.empty()) {
- m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), sub));
+ m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), sub, deprecationSupport));
return;
}
}
@@ -115,14 +115,14 @@ SignatureMetadataFilter::SignatureMetadataFilter(const DOMElement* e)
if (sub) {
string t = XMLHelper::getAttrString(sub, nullptr, type);
if (!t.empty()) {
- TrustEngine* trust = XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), sub);
+ TrustEngine* trust = XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), sub, deprecationSupport);
SignatureTrustEngine* sigTrust = dynamic_cast<SignatureTrustEngine*>(trust);
if (!sigTrust) {
delete trust;
throw MetadataFilterException("TrustEngine-based SignatureMetadataFilter requires a SignatureTrustEngine plugin.");
}
m_trust.reset(sigTrust);
- m_dummyResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr));
+ m_dummyResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr, deprecationSupport));
if (!m_dummyResolver.get())
throw MetadataFilterException("Error creating dummy CredentialResolver.");
return;
diff --git a/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp b/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp
index a0ec241..bdf6257 100644
--- a/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp
+++ b/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp
@@ -45,7 +45,7 @@ namespace opensaml {
class SAML_DLLLOCAL WhitelistMetadataFilter : public MetadataFilter
{
public:
- WhitelistMetadataFilter(const DOMElement* e);
+ WhitelistMetadataFilter(const DOMElement* e, bool deprecationSupport=true);
~WhitelistMetadataFilter() {}
const char* getId() const { return WHITELIST_METADATA_FILTER; }
@@ -59,7 +59,7 @@ namespace opensaml {
scoped_ptr<EntityMatcher> m_matcher;
};
- MetadataFilter* SAML_DLLLOCAL WhitelistMetadataFilterFactory(const DOMElement* const & e)
+ MetadataFilter* SAML_DLLLOCAL WhitelistMetadataFilterFactory(const DOMElement* const & e, bool deprecationSupport)
{
return new WhitelistMetadataFilter(e);
}
@@ -70,11 +70,11 @@ namespace opensaml {
};
-WhitelistMetadataFilter::WhitelistMetadataFilter(const DOMElement* e)
+WhitelistMetadataFilter::WhitelistMetadataFilter(const DOMElement* e, bool deprecationSupport)
{
string matcher(XMLHelper::getAttrString(e, nullptr, _matcher));
if (!matcher.empty())
- m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(matcher.c_str(), e));
+ m_matcher.reset(SAMLConfig::getConfig().EntityMatcherManager.newPlugin(matcher.c_str(), e, deprecationSupport));
e = XMLHelper::getFirstChildElement(e, Include);
while (e) {
diff --git a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
index 6eb70e9..e54e0b1 100644
--- a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
@@ -64,7 +64,7 @@ namespace opensaml {
: public AbstractMetadataProvider, public DiscoverableMetadataProvider, public ReloadableXMLFile
{
public:
- XMLMetadataProvider(const DOMElement* e);
+ XMLMetadataProvider(const DOMElement* e, bool deprecationSupport=true);
virtual ~XMLMetadataProvider() {
shutdown();
@@ -97,9 +97,9 @@ namespace opensaml {
time_t m_minRefreshDelay,m_maxRefreshDelay,m_lastValidUntil;
};
- MetadataProvider* SAML_DLLLOCAL XMLMetadataProviderFactory(const DOMElement* const & e)
+ MetadataProvider* SAML_DLLLOCAL XMLMetadataProviderFactory(const DOMElement* const & e, bool deprecationSupport)
{
- return new XMLMetadataProvider(e);
+ return new XMLMetadataProvider(e, deprecationSupport);
}
static const XMLCh discoveryFeed[] = UNICODE_LITERAL_13(d,i,s,c,o,v,e,r,y,F,e,e,d);
@@ -114,9 +114,9 @@ namespace opensaml {
#pragma warning( pop )
#endif
-XMLMetadataProvider::XMLMetadataProvider(const DOMElement* e)
- : MetadataProvider(e), AbstractMetadataProvider(e), DiscoverableMetadataProvider(e),
- ReloadableXMLFile(e, Category::getInstance(SAML_LOGCAT ".MetadataProvider.XML"), false),
+XMLMetadataProvider::XMLMetadataProvider(const DOMElement* e, bool deprecationSupport)
+ : MetadataProvider(e, deprecationSupport), AbstractMetadataProvider(e, deprecationSupport), DiscoverableMetadataProvider(e, deprecationSupport),
+ ReloadableXMLFile(e, Category::getInstance(SAML_LOGCAT ".MetadataProvider.XML"), false, deprecationSupport),
m_discoveryFeed(XMLHelper::getAttrBool(e, true, discoveryFeed)),
m_dropDOM(XMLHelper::getAttrBool(e, true, dropDOM)),
m_refreshDelayFactor(0.75), m_backoffFactor(1),
@@ -187,7 +187,7 @@ pair<bool,DOMElement*> XMLMetadataProvider::load(bool backup, string backingFile
XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
// Unmarshall objects, binding the document.
- scoped_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(raw.second, true));
+ scoped_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(raw.second, raw.first));
docjanitor.release();
if (!dynamic_cast<const EntitiesDescriptor*>(xmlObject.get()) && !dynamic_cast<const EntityDescriptor*>(xmlObject.get())) {
diff --git a/saml/saml2/profile/impl/BearerConfirmationRule.cpp b/saml/saml2/profile/impl/BearerConfirmationRule.cpp
index cc771a0..0353675 100644
--- a/saml/saml2/profile/impl/BearerConfirmationRule.cpp
+++ b/saml/saml2/profile/impl/BearerConfirmationRule.cpp
@@ -58,7 +58,7 @@ namespace opensaml {
bool m_validity, m_recipient, m_correlation, m_fatal;
};
- opensaml::SecurityPolicyRule* SAML_DLLLOCAL BearerConfirmationRuleFactory(const DOMElement* const & e)
+ opensaml::SecurityPolicyRule* SAML_DLLLOCAL BearerConfirmationRuleFactory(const DOMElement* const & e, bool)
{
return new BearerConfirmationRule(e);
}
diff --git a/saml/saml2/profile/impl/DelegationRestrictionRule.cpp b/saml/saml2/profile/impl/DelegationRestrictionRule.cpp
index 2faf209..480fa5c 100644
--- a/saml/saml2/profile/impl/DelegationRestrictionRule.cpp
+++ b/saml/saml2/profile/impl/DelegationRestrictionRule.cpp
@@ -67,7 +67,7 @@ namespace opensaml {
time_t m_maxTime;
};
- SecurityPolicyRule* SAML_DLLLOCAL DelegationRestrictionRuleFactory(const DOMElement* const & e)
+ SecurityPolicyRule* SAML_DLLLOCAL DelegationRestrictionRuleFactory(const DOMElement* const & e, bool)
{
return new DelegationRestrictionRule(e);
}
diff --git a/samlsign/samlsign.cpp b/samlsign/samlsign.cpp
index 2373fbf..c921741 100644
--- a/samlsign/samlsign.cpp
+++ b/samlsign/samlsign.cpp
@@ -77,7 +77,7 @@ template<class T> T* buildPlugin(const char* path, PluginManager<T,string,const
static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
auto_ptr_char type(doc->getDocumentElement()->getAttributeNS(nullptr,_type));
if (type.get() && *type.get())
- return mgr.newPlugin(type.get(), doc->getDocumentElement());
+ return mgr.newPlugin(type.get(), doc->getDocumentElement(), false);
throw XMLToolingException("Missing type in plugin configuration.");
}
@@ -99,7 +99,7 @@ CredentialResolver* buildSimpleResolver(const char* key, const char* cert)
root->setAttributeNS(nullptr, _certificate, widenit.get());
}
- return XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, root);
+ return XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, root, false);
}
class DummyCredentialResolver : public CredentialResolver
diff --git a/samltest/binding.h b/samltest/binding.h
index ad91bb4..2d36263 100644
--- a/samltest/binding.h
+++ b/samltest/binding.h
@@ -72,7 +72,7 @@ public:
doc->getDocumentElement()->setAttributeNS(nullptr,path.get(),file.get());
m_metadata.reset(
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER, doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER, doc->getDocumentElement(), false)
);
m_metadata->init();
@@ -81,14 +81,14 @@ public:
DOMDocument* doc2=XMLToolingConfig::getConfig().getParser().parse(in2);
XercesJanitor<DOMDocument> janitor2(doc2);
m_creds.reset(
- XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, doc2->getDocumentElement())
+ XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, doc2->getDocumentElement(), false)
);
- m_trust.reset(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr));
+ m_trust.reset(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr, false));
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(MESSAGEFLOW_POLICY_RULE,nullptr));
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SIMPLESIGNING_POLICY_RULE,nullptr));
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(XMLSIGNING_POLICY_RULE,nullptr));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(MESSAGEFLOW_POLICY_RULE,nullptr, false));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SIMPLESIGNING_POLICY_RULE,nullptr, false));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(XMLSIGNING_POLICY_RULE,nullptr, false));
}
catch (XMLToolingException& ex) {
TS_TRACE(ex.what());
diff --git a/samltest/encryption/EncryptedAssertionTest.h b/samltest/encryption/EncryptedAssertionTest.h
index 2148a38..71560a9 100644
--- a/samltest/encryption/EncryptedAssertionTest.h
+++ b/samltest/encryption/EncryptedAssertionTest.h
@@ -53,7 +53,7 @@ public:
m_metadata.reset(
opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(
- XML_METADATA_PROVIDER, doc->getDocumentElement()
+ XML_METADATA_PROVIDER, doc->getDocumentElement(), false
)
);
m_metadata->init();
diff --git a/samltest/saml1/binding/SAML1ArtifactTest.h b/samltest/saml1/binding/SAML1ArtifactTest.h
index adc1ed2..1a7dc54 100644
--- a/samltest/saml1/binding/SAML1ArtifactTest.h
+++ b/samltest/saml1/binding/SAML1ArtifactTest.h
@@ -66,7 +66,7 @@ public:
// Encode message.
scoped_ptr<MessageEncoder> encoder(
- SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, nullptr)
+ SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, nullptr, false)
);
Locker locker(m_metadata.get());
encoder->encode(
@@ -83,7 +83,7 @@ public:
// Decode message.
string relayState;
scoped_ptr<MessageDecoder> decoder(
- SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, nullptr)
+ SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT, nullptr, false)
);
decoder->setArtifactResolver(this);
scoped_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));
diff --git a/samltest/saml1/binding/SAML1POSTTest.h b/samltest/saml1/binding/SAML1POSTTest.h
index c79c9a9..8747cda 100644
--- a/samltest/saml1/binding/SAML1POSTTest.h
+++ b/samltest/saml1/binding/SAML1POSTTest.h
@@ -72,7 +72,7 @@ public:
encoder_config->getDocumentElement()->setAttributeNS(nullptr,lit2.get(),lit3.get());
scoped_ptr<MessageEncoder> encoder(
SAMLConfig::getConfig().MessageEncoderManager.newPlugin(
- samlconstants::SAML1_PROFILE_BROWSER_POST, encoder_config->getDocumentElement()
+ samlconstants::SAML1_PROFILE_BROWSER_POST, encoder_config->getDocumentElement(), false
)
);
@@ -91,7 +91,7 @@ public:
// Decode message.
string relayState;
scoped_ptr<MessageDecoder> decoder(
- SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_POST, nullptr)
+ SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML1_PROFILE_BROWSER_POST, nullptr, false)
);
scoped_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));
diff --git a/samltest/saml1/profile/SAML1PolicyTest.h b/samltest/saml1/profile/SAML1PolicyTest.h
index d967c44..a23ab87 100644
--- a/samltest/saml1/profile/SAML1PolicyTest.h
+++ b/samltest/saml1/profile/SAML1PolicyTest.h
@@ -33,8 +33,8 @@ class SAML1PolicyTest : public CxxTest::TestSuite {
public:
void setUp() {
m_policy = nullptr;
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, nullptr));
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SAML1BROWSERSSO_POLICY_RULE, nullptr));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, nullptr, false));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(SAML1BROWSERSSO_POLICY_RULE, nullptr, false));
m_policy = new SecurityPolicy();
m_policy->getRules().assign(m_rules.begin(), m_rules.end());
}
diff --git a/samltest/saml2/binding/SAML2ArtifactTest.h b/samltest/saml2/binding/SAML2ArtifactTest.h
index c2339c7..1c6cd72 100644
--- a/samltest/saml2/binding/SAML2ArtifactTest.h
+++ b/samltest/saml2/binding/SAML2ArtifactTest.h
@@ -67,7 +67,7 @@ public:
// Encode message.
scoped_ptr<MessageEncoder> encoder(
- SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_ARTIFACT, nullptr)
+ SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_ARTIFACT, nullptr, false)
);
Locker locker(m_metadata.get());
encoder->encode(
@@ -84,7 +84,7 @@ public:
// Decode message.
string relayState;
scoped_ptr<MessageDecoder> decoder(
- SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_ARTIFACT, nullptr)
+ SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_ARTIFACT, nullptr, false)
);
decoder->setArtifactResolver(this);
scoped_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));
diff --git a/samltest/saml2/binding/SAML2POSTTest.h b/samltest/saml2/binding/SAML2POSTTest.h
index 7d8b947..e6780e0 100644
--- a/samltest/saml2/binding/SAML2POSTTest.h
+++ b/samltest/saml2/binding/SAML2POSTTest.h
@@ -72,7 +72,7 @@ public:
encoder_config->getDocumentElement()->setAttributeNS(nullptr,lit2.get(),lit3.get());
scoped_ptr<MessageEncoder> encoder(
SAMLConfig::getConfig().MessageEncoderManager.newPlugin(
- samlconstants::SAML20_BINDING_HTTP_POST, encoder_config->getDocumentElement()
+ samlconstants::SAML20_BINDING_HTTP_POST, encoder_config->getDocumentElement(), false
)
);
Locker locker(m_metadata.get());
@@ -90,7 +90,7 @@ public:
// Decode message.
string relayState;
scoped_ptr<MessageDecoder> decoder(
- SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_POST, nullptr)
+ SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_POST, nullptr, false)
);
scoped_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));
@@ -149,7 +149,7 @@ public:
encoder_config->getDocumentElement()->setAttributeNS(nullptr,lit2.get(),lit3.get());
scoped_ptr<MessageEncoder> encoder(
SAMLConfig::getConfig().MessageEncoderManager.newPlugin(
- samlconstants::SAML20_BINDING_HTTP_POST_SIMPLESIGN, encoder_config->getDocumentElement()
+ samlconstants::SAML20_BINDING_HTTP_POST_SIMPLESIGN, encoder_config->getDocumentElement(), false
)
);
Locker locker(m_metadata.get());
@@ -167,7 +167,7 @@ public:
// Decode message.
string relayState;
scoped_ptr<MessageDecoder> decoder(
- SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_POST_SIMPLESIGN, nullptr)
+ SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_POST_SIMPLESIGN, nullptr, false)
);
scoped_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));
diff --git a/samltest/saml2/binding/SAML2RedirectTest.h b/samltest/saml2/binding/SAML2RedirectTest.h
index ee08c53..85bad24 100644
--- a/samltest/saml2/binding/SAML2RedirectTest.h
+++ b/samltest/saml2/binding/SAML2RedirectTest.h
@@ -63,7 +63,7 @@ public:
// Encode message.
scoped_ptr<MessageEncoder> encoder(
- SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_REDIRECT, nullptr)
+ SAMLConfig::getConfig().MessageEncoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_REDIRECT, nullptr, false)
);
Locker locker(m_metadata.get());
encoder->encode(
@@ -80,7 +80,7 @@ public:
// Decode message.
string relayState;
scoped_ptr<MessageDecoder> decoder(
- SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_REDIRECT, nullptr)
+ SAMLConfig::getConfig().MessageDecoderManager.newPlugin(samlconstants::SAML20_BINDING_HTTP_REDIRECT, nullptr, false)
);
scoped_ptr<Response> response(dynamic_cast<Response*>(decoder->decode(relayState,*this,policy)));
diff --git a/samltest/saml2/metadata/XMLMetadataProviderTest.h b/samltest/saml2/metadata/XMLMetadataProviderTest.h
index 939861e..4397dc0 100644
--- a/samltest/saml2/metadata/XMLMetadataProviderTest.h
+++ b/samltest/saml2/metadata/XMLMetadataProviderTest.h
@@ -61,7 +61,7 @@ public:
XercesJanitor<DOMDocument> janitor(doc);
scoped_ptr<MetadataProvider> metadataProvider(
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER, doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER, doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -83,7 +83,7 @@ public:
XercesJanitor<DOMDocument> janitor(doc);
scoped_ptr<MetadataProvider> metadataProvider(
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(CHAINING_METADATA_PROVIDER, doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(CHAINING_METADATA_PROVIDER, doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -105,7 +105,7 @@ public:
doc->getDocumentElement()->setAttributeNS(nullptr,path.get(),file.get());
scoped_ptr<MetadataProvider> metadataProvider(
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -149,7 +149,7 @@ public:
doc->getDocumentElement()->setAttributeNS(nullptr, path.get(), file.get());
#endif
scoped_ptr<MetadataProvider> metadataProvider(\
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER, doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER, doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -191,7 +191,7 @@ public:
doc->getDocumentElement()->setAttributeNS(nullptr,path.get(),file.get());
scoped_ptr<MetadataProvider> metadataProvider(
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -221,7 +221,7 @@ public:
doc->getDocumentElement()->setAttributeNS(nullptr,path.get(),file.get());
scoped_ptr<MetadataProvider> metadataProvider(
- SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement())
+ SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
diff --git a/samltest/saml2/profile/SAML2PolicyTest.h b/samltest/saml2/profile/SAML2PolicyTest.h
index 11bff02..b79c38b 100644
--- a/samltest/saml2/profile/SAML2PolicyTest.h
+++ b/samltest/saml2/profile/SAML2PolicyTest.h
@@ -33,8 +33,8 @@ class SAML2PolicyTest : public CxxTest::TestSuite {
public:
void setUp() {
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, nullptr));
- m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(BEARER_POLICY_RULE, nullptr));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(CONDITIONS_POLICY_RULE, nullptr, false));
+ m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(BEARER_POLICY_RULE, nullptr, false));
m_policy.reset(new SecurityPolicy());
m_policy->getRules().assign(m_rules.begin(), m_rules.end());
}
diff --git a/samltest/security/ExplicitKeyTrustEngineTest.h b/samltest/security/ExplicitKeyTrustEngineTest.h
index c12d1ae..14f5b25 100644
--- a/samltest/security/ExplicitKeyTrustEngineTest.h
+++ b/samltest/security/ExplicitKeyTrustEngineTest.h
@@ -53,7 +53,7 @@ public:
// Build metadata provider.
scoped_ptr<MetadataProvider> metadataProvider(
- opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement())
+ opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -65,7 +65,7 @@ public:
// Build trust engine.
scoped_ptr<TrustEngine> trustEngine(
- XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr)
+ XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(EXPLICIT_KEY_TRUSTENGINE, nullptr, false)
);
// Get signed assertion.
diff --git a/samltest/security/StaticPKIXTrustEngineTest.h b/samltest/security/StaticPKIXTrustEngineTest.h
index 0e56397..f9e55d1 100644
--- a/samltest/security/StaticPKIXTrustEngineTest.h
+++ b/samltest/security/StaticPKIXTrustEngineTest.h
@@ -52,7 +52,7 @@ public:
// Build metadata provider.
scoped_ptr<MetadataProvider> metadataProvider(
- opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement())
+ opensaml::SAMLConfig::getConfig().MetadataProviderManager.newPlugin(XML_METADATA_PROVIDER,doc->getDocumentElement(), false)
);
try {
metadataProvider->init();
@@ -68,7 +68,7 @@ public:
DOMDocument* doc2=XMLToolingConfig::getConfig().getParser().parse(in2);
XercesJanitor<DOMDocument> janitor2(doc2);
scoped_ptr<TrustEngine> trustEngine(
- XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(STATIC_PKIX_TRUSTENGINE,doc2->getDocumentElement())
+ XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(STATIC_PKIX_TRUSTENGINE,doc2->getDocumentElement(), false)
);
// Get signed assertion.
diff --git a/samltest/signature/SAMLSignatureTestBase.h b/samltest/signature/SAMLSignatureTestBase.h
index 17a4ad8..dbec11c 100644
--- a/samltest/signature/SAMLSignatureTestBase.h
+++ b/samltest/signature/SAMLSignatureTestBase.h
@@ -43,7 +43,7 @@ public:
XercesJanitor<DOMDocument> janitor(doc);
m_resolver.reset(
XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
- FILESYSTEM_CREDENTIAL_RESOLVER, doc->getDocumentElement()
+ FILESYSTEM_CREDENTIAL_RESOLVER, doc->getDocumentElement(), false
)
);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list