[cpp-sp] branch master updated: SSPCPP-739 - Attribute Resolver handler should propagate IdP errors to caller

Scott Cantor cantor.2 at osu.edu
Mon Apr 23 20:03:53 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=82eaaf949c7b18b1f42c3bb914d4527fc3f5a5de

The following commit(s) were added to refs/heads/master by this push:
       new  82eaaf9   SSPCPP-739 - Attribute Resolver handler should propagate IdP errors to caller
82eaaf9 is described below

commit 82eaaf949c7b18b1f42c3bb914d4527fc3f5a5de
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Apr 23 20:03:09 2018 -0400

    SSPCPP-739 - Attribute Resolver handler should propagate IdP errors to caller
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-739
    
    Add failFast option to chaining resolver.
---
 shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp b/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
index e7e6209..a66a4bb 100644
--- a/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
+++ b/shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
@@ -140,9 +140,11 @@ namespace shibsp {
 
     private:
         mutable ptr_vector<AttributeResolver> m_resolvers;
+        bool m_failFast;
     };
 
     static const XMLCh _AttributeResolver[] =   UNICODE_LITERAL_17(A,t,t,r,i,b,u,t,e,R,e,s,o,l,v,e,r);
+    static const XMLCh failFast[] =             UNICODE_LITERAL_8(f,a,i,l,F,a,s,t);
     static const XMLCh _type[] =                UNICODE_LITERAL_4(t,y,p,e);
 
     SHIBSP_DLLLOCAL PluginManager<AttributeResolver,string,const DOMElement*>::Factory QueryResolverFactory;
@@ -178,6 +180,7 @@ AttributeResolver::~AttributeResolver()
 }
 
 ChainingAttributeResolver::ChainingAttributeResolver(const DOMElement* e)
+    : m_failFast(XMLHelper::getAttrBool(e, false, failFast))
 {
     SPConfig& conf = SPConfig::getConfig();
 
@@ -232,6 +235,8 @@ void ChainingAttributeResolver::resolveAttributes(ResolutionContext& ctx) const
             Category::getInstance(SHIBSP_LOGCAT ".AttributeResolver." CHAINING_ATTRIBUTE_RESOLVER).error(
                 "caught exception applying AttributeResolver in chain: %s", ex.what()
                 );
+            if (failFast)
+                throw;
         }
     }
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list