[cpp-sp COMMIT] in /branches/REL_2: schemas/shibboleth-2.0-native-sp-config.xsd shibsp/binding/impl/ArtifactResolver.cpp

noreply at shibboleth.net noreply at shibboleth.net
Sun Apr 29 23:53:52 BST 2012


Author: scantor
Date: Sun Apr 29 23:53:52 2012
New Revision: 3630

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3630&view=rev
Log:
Option to enable SSPCPP-437

Modified:
    branches/REL_2/schemas/shibboleth-2.0-native-sp-config.xsd
    branches/REL_2/shibsp/binding/impl/ArtifactResolver.cpp

Modified: branches/REL_2/schemas/shibboleth-2.0-native-sp-config.xsd
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/schemas/shibboleth-2.0-native-sp-config.xsd?rev=3630&r1=3629&r2=3630&view=diff
==============================================================================
--- branches/REL_2/schemas/shibboleth-2.0-native-sp-config.xsd (original)
+++ branches/REL_2/schemas/shibboleth-2.0-native-sp-config.xsd Sun Apr 29 23:53:52 2012
@@ -465,6 +465,7 @@
     <attribute name="requireTransportAuth" type="boolean"/>
     <attribute name="requireSignedAssertions" type="boolean"/>
     <attribute name="sessionHook" type="anyURI"/>
+    <attribute name="artifactByFilesystem" type="boolean"/>
   </attributeGroup>
     
   <complexType name="SessionsType">

Modified: branches/REL_2/shibsp/binding/impl/ArtifactResolver.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/binding/impl/ArtifactResolver.cpp?rev=3630&r1=3629&r2=3630&view=diff
==============================================================================
--- branches/REL_2/shibsp/binding/impl/ArtifactResolver.cpp (original)
+++ branches/REL_2/shibsp/binding/impl/ArtifactResolver.cpp Sun Apr 29 23:53:52 2012
@@ -162,6 +162,9 @@
         ep_end = ep_start + 1;
     }
 
+    const PropertySet* rp = sppolicy.getApplication().getRelyingParty(dynamic_cast<const EntityDescriptor*>(ssoDescriptor.getParent()));
+    pair<bool,bool> artifactByFilesystem = rp->getBool("artifactByFilesystem");
+
     for (vector<ArtifactResolutionService*>::const_iterator ep = ep_start; !response && ep != ep_end; ++ep) {
         try {
             if (XMLString::equals((*ep)->getBinding(), binding.get())) {
@@ -170,7 +173,7 @@
                 ArtifactResolve* request = ArtifactResolveBuilder::buildArtifactResolve();
                 Issuer* iss = IssuerBuilder::buildIssuer();
                 request->setIssuer(iss);
-                iss->setName(sppolicy.getApplication().getRelyingParty(dynamic_cast<EntityDescriptor*>(ssoDescriptor.getParent()))->getXMLString("entityID").second);
+                iss->setName(rp->getXMLString("entityID").second);
                 auto_ptr_XMLCh artbuf(artifact.encode().c_str());
                 Artifact* a = ArtifactBuilder::buildArtifact();
                 a->setArtifact(artbuf.get());
@@ -184,7 +187,7 @@
                     break;
                 }
             }
-            else if (XMLString::equals((*ep)->getBinding(), shibspconstants::SHIB2_BINDING_FILE)) {
+            else if (artifactByFilesystem.first && artifactByFilesystem.second && XMLString::equals((*ep)->getBinding(), shibspconstants::SHIB2_BINDING_FILE)) {
                 // This implements a resolution process against the local file system for custom integration needs.
                 // The local filesystem is presumed to be "secure" so that unsigned, unencrypted responses are acceptable.
                 // The binding here is not SOAP, but rather REST-like, with the base location used to construct a filename



More information about the commits mailing list