[java-identity-provider COMMIT] /branches/3.1/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/Ab...

noreply at shibboleth.net noreply at shibboleth.net
Mon Jun 22 07:06:29 EDT 2015


Author: rdw
Date: Mon Jun 22 07:06:28 2015
New Revision: 7584

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7584&view=rev
Log:
IDP-741 Better logging in Attribute Mapping

https://issues.shibboleth.net/jira/browse/IDP-741  Add a catch and rethrow of errors in the mapping process.  Makes it easier for deployers to debug issues in their metadata.

Manual merge of http://svn.shibboleth.net/view/java-identity-provider?view=revision&revision=7563


Modified:
    branches/3.1/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributesMapper.java

Modified: branches/3.1/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributesMapper.java
URL: http://svn.shibboleth.net/view/java-identity-provider/branches/3.1/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributesMapper.java?rev=7584&r1=7583&r2=7584&view=diff
==============================================================================
--- branches/3.1/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributesMapper.java	(original)
+++ branches/3.1/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributesMapper.java	Mon Jun 22 07:06:28 2015
@@ -149,7 +149,14 @@
         for (final InType prototype : prototypes) {
             for (final AttributeMapper<InType,OutType> mapper : mappers) {
 
-                final Map<String,OutType> mappedAttributes = mapper.mapAttribute(prototype);
+                final Map<String,OutType> mappedAttributes;
+                try {
+                    mappedAttributes = mapper.mapAttribute(prototype); 
+                } catch (Exception e) {
+                    log.error("{} Attempt to map SAML attribute '{}' with mapper '{}' failed: ", getLogPrefix(),
+                            prototype.getName(),mapper.getId(), e);
+                    throw e;
+                }
 
                 log.debug("{} SAML attribute '{}' mapped to {} attributes by mapper '{}'", getLogPrefix(),
                         prototype.getName(), mappedAttributes.size(), mapper.getId());



More information about the commits mailing list