[cpp-sp] branch master updated: SSPCPP-775 - Client-side session storage
Scott Cantor
cantor.2 at osu.edu
Tue Mar 13 11:42:39 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=e9c8f07515e20ef8d576dfee34a0ce63bc23bead
The following commit(s) were added to refs/heads/master by this push:
new e9c8f07 SSPCPP-775 - Client-side session storage
e9c8f07 is described below
commit e9c8f07515e20ef8d576dfee34a0ce63bc23bead
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Mar 13 11:41:18 2018 -0400
SSPCPP-775 - Client-side session storage
https://issues.shibboleth.net/jira/browse/SSPCPP-775
Configuration of DataSealer wired in.
---
schemas/shibboleth-3.0-native-sp-config.xsd | 15 +++++++++++++++
shibsp/impl/StorageServiceSessionCache.cpp | 2 +-
shibsp/impl/XMLServiceProvider.cpp | 15 +++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/schemas/shibboleth-3.0-native-sp-config.xsd b/schemas/shibboleth-3.0-native-sp-config.xsd
index 39a43e3..d874c13 100644
--- a/schemas/shibboleth-3.0-native-sp-config.xsd
+++ b/schemas/shibboleth-3.0-native-sp-config.xsd
@@ -85,6 +85,20 @@
</sequence>
</complexType>
+ <complexType name="DataSealerType">
+ <annotation>
+ <documentation>References DataSealer plugins</documentation>
+ </annotation>
+ <complexContent>
+ <restriction base="conf:PluggableType">
+ <sequence>
+ <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
<complexType name="StorageServiceType">
<annotation>
<documentation>References StorageService plugins</documentation>
@@ -822,6 +836,7 @@
<element name="Listener" type="conf:PluggableType"/>
</choice>
<element name="StorageService" type="conf:StorageServiceType" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="DataSealer" type="conf:DataSealerType" minOccurs="0" />
<element name="SessionCache" type="conf:SessionCacheType" minOccurs="0"/>
<element name="ReplayCache" type="conf:ReplayCacheType" minOccurs="0"/>
<element name="ArtifactMap" type="conf:ArtifactMapType" minOccurs="0"/>
diff --git a/shibsp/impl/StorageServiceSessionCache.cpp b/shibsp/impl/StorageServiceSessionCache.cpp
index bb2001d..829a39b 100644
--- a/shibsp/impl/StorageServiceSessionCache.cpp
+++ b/shibsp/impl/StorageServiceSessionCache.cpp
@@ -48,7 +48,7 @@
#include <boost/bind.hpp>
#include <xmltooling/io/HTTPRequest.h>
#include <xmltooling/io/HTTPResponse.h>
-#include <xmltooling/util/DataSealer.h>
+#include <xmltooling/security/DataSealer.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/Threads.h>
#include <xmltooling/util/URLEncoder.h>
diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp
index 0c93a3d..3882fc6 100644
--- a/shibsp/impl/XMLServiceProvider.cpp
+++ b/shibsp/impl/XMLServiceProvider.cpp
@@ -84,6 +84,7 @@
# include <saml/util/SAMLConstants.h>
# include <xmltooling/security/ChainingTrustEngine.h>
# include <xmltooling/security/CredentialResolver.h>
+# include <xmltooling/security/DataSealer.h>
# include <xmltooling/security/SecurityHelper.h>
# include <xmltooling/util/ReplayCache.h>
# include <xmltooling/util/StorageService.h>
@@ -470,6 +471,7 @@ namespace {
static const XMLCh Binding[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
static const XMLCh Channel[]= UNICODE_LITERAL_7(C,h,a,n,n,e,l);
static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r);
+ static const XMLCh _DataSealer[] = UNICODE_LITERAL_10(D,a,t,a,S,e,a,l,e,r);
static const XMLCh _default[] = UNICODE_LITERAL_7(d,e,f,a,u,l,t);
static const XMLCh _Extensions[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
static const XMLCh _fatal[] = UNICODE_LITERAL_5(f,a,t,a,l);
@@ -1827,6 +1829,7 @@ DOMNodeFilter::FilterAction XMLConfigImpl::acceptNode(const DOMNode* node) const
const XMLCh* name=node->getLocalName();
if (XMLString::equals(name,ApplicationDefaults) ||
XMLString::equals(name,_ArtifactMap) ||
+ XMLString::equals(name, _DataSealer) ||
XMLString::equals(name,_Extensions) ||
XMLString::equals(name,Listener) ||
XMLString::equals(name,_ProtocolProvider) ||
@@ -2123,6 +2126,18 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
outer->m_listener->regListener("set::PostData", outer);
outer->m_listener->regListener("get::PostData", outer);
}
+
+ if (child = XMLHelper::getFirstChildElement(e, _DataSealer)) {
+ string t(XMLHelper::getAttrString(child, nullptr, _type));
+ if (!t.empty()) {
+ log.info("building DataSealer of type %s...", t.c_str());
+ auto_ptr<DataSealerKeyStrategy> strategy(XMLToolingConfig::getConfig().DataSealerKeyStrategyManager.newPlugin(t, child));
+ auto_ptr<DataSealer> sealer(new DataSealer(strategy.get()));
+ strategy.release();
+ XMLToolingConfig::getConfig().setDataSealer(sealer.get());
+ sealer.release();
+ }
+ }
#endif
if (conf.isEnabled(SPConfig::Caching))
doCaching(e, outer, log);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list