[cpp-sp] branch master updated: SSPCPP-778 - Fork configuration and address backward compatibility
Scott Cantor
cantor.2 at osu.edu
Thu Jun 7 20:31: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=0252a6145fe4dfd84798e14d16dcb8c950bb391d
The following commit(s) were added to refs/heads/master by this push:
new 0252a61 SSPCPP-778 - Fork configuration and address backward compatibility
0252a61 is described below
commit 0252a6145fe4dfd84798e14d16dcb8c950bb391d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 7 20:31:09 2018 -0400
SSPCPP-778 - Fork configuration and address backward compatibility
https://issues.shibboleth.net/jira/browse/SSPCPP-778
Ignore aliases setting in non-legacy configurations.
---
schemas/shibboleth-2.0-attribute-map.xsd | 2 +-
.../resolver/impl/XMLAttributeExtractor.cpp | 28 ++++++++++++----------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/schemas/shibboleth-2.0-attribute-map.xsd b/schemas/shibboleth-2.0-attribute-map.xsd
index 8409f55..31ff798 100644
--- a/schemas/shibboleth-2.0-attribute-map.xsd
+++ b/schemas/shibboleth-2.0-attribute-map.xsd
@@ -84,7 +84,7 @@
</attribute>
<attribute name="aliases" type="am:listOfStrings">
<annotation>
- <documentation>Optional aliases for the internal attribute to which this SAML attribute maps.</documentation>
+ <documentation>DEPRECATED: Aliases for the internal attribute to which this SAML attribute maps.</documentation>
</annotation>
</attribute>
<attribute name="name" type="am:string" use="required">
diff --git a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
index b204130..b3366a7 100644
--- a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
+++ b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
@@ -365,20 +365,22 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log, bool depr
m_requestedAttrs.push_back(boost::tuple<xstring,xstring,bool>(entryKey.first, entryKey.second, required));
}
- name = child->getAttributeNS(nullptr, _aliases);
- if (name && *name) {
- m_log.warn("DEPRECATED: attribute mapping rule (%s) uses deprecated aliases feature", id.get());
- auto_ptr_char aliases(name);
- string dup(aliases.get());
- set<string> new_aliases;
- split(new_aliases, dup, is_space(), algorithm::token_compress_on);
- set<string>::iterator ru = new_aliases.find("REMOTE_USER");
- if (ru != new_aliases.end()) {
- m_log.warn("skipping alias, REMOTE_USER is a reserved name");
- new_aliases.erase(ru);
+ if (deprecationSupport) {
+ name = child->getAttributeNS(nullptr, _aliases);
+ if (name && *name) {
+ m_log.warn("DEPRECATED: attribute mapping rule (%s) uses deprecated aliases feature", id.get());
+ auto_ptr_char aliases(name);
+ string dup(aliases.get());
+ set<string> new_aliases;
+ split(new_aliases, dup, is_space(), algorithm::token_compress_on);
+ set<string>::iterator ru = new_aliases.find("REMOTE_USER");
+ if (ru != new_aliases.end()) {
+ m_log.warn("skipping alias, REMOTE_USER is a reserved name");
+ new_aliases.erase(ru);
+ }
+ decl.second.insert(decl.second.end(), new_aliases.begin(), new_aliases.end());
+ m_attributeIds.insert(m_attributeIds.end(), new_aliases.begin(), new_aliases.end());
}
- decl.second.insert(decl.second.end(), new_aliases.begin(), new_aliases.end());
- m_attributeIds.insert(m_attributeIds.end(), new_aliases.begin(), new_aliases.end());
}
child = XMLHelper::getNextSiblingElement(child, shibspconstants::SHIB2ATTRIBUTEMAP_NS, saml1::Attribute::LOCAL_NAME);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list